Google api html

Google api

Like many others, Google provides access to some of it’s services by means of webservices. Just follow the instructions at the Google web api’s site:

  • download the developer’s kit
  • create an account and get a licence key
  • create a program

The developer’s kit contains a wsdl, webservice client libraries and some code examples for .NET and java.

For java, all you need to do is:

import com.google.soap.search.GoogleSearch;
import com.google.soap.search.GoogleSearchFault;
import com.google.soap.search.GoogleSearchResult;
import com.google.soap.search.GoogleSearchResultElement;
...
GoogleSearch search = new GoogleSearch();
search.setKey("key");
try {
    search.setQueryString("sql pathetic");
    GoogleSearchResult googleResults = search.doSearch();
} catch (GoogleSearchFault f){}

3 Comments

  1. Musa M January 18, 2008
  2. Aino August 9, 2005
  3. Peter Teoh August 9, 2005