Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Google Site Search API

Status
Not open for further replies.

ciscouser3

Technical User
Jan 7, 2003
25
0
0
US
Has anyone installed the Google Search API for their intranet? If so, what kind of hurdles did you faced if any?
 
You can actually access the Google Search API as a web service and call the search methods.




You then have to register which then will entitle you to receive a license key. This key is then accessed within your code to enable you to access their web service.

You create a proxy class for the Google service WSDL.

wsdl /l:cs (I did this from the command line but you could just as easily do it from a VS web project by creating a web service reference)

The main web method you access is the doGoogle method which has about 8 different parameters you need to fill in including the license key, which is good to keep in your web config.

The wisest people are those who are smart enough to realize they don't know it all.
 
The name of the web service is GoogleSearchService, and the main web method is doGoogleSearch().

I then compiled the proxy class into an assembly which I called GoogleSearch.

Then in your code you have to create an instance of your GoogleSearchService web service.

You can create a panel control to contain the results of your search. The results of your search by calling the doGoogleSearch method returns a collection of resultElements objects. You interate through the collection appending each resultElement into a string builder.

I can provide a code example if you like but that's kind of the nuts and bolts of it.

The wisest people are those who are smart enough to realize they don't know it all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top