We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

Using the ElementTree Module to Generate Google Requests

November 20, 2003 | Fredrik Lundh

The Google Web API is a SOAP interface to Google’s search service, and a few other services. The ElementSOAP library includes a Python interface for the Google API.

from elementsoap.ElementGoogle import GoogleService

key = getlicensekey()

g = GoogleService(key)

response = g.doGoogleSearch("elementsoap")

for item in response.findall(".//item"):
    print item.findtext("URL"), repr(item.findtext("title"))

For background information and more examples, see the Using the ElementTree Module to Generate SOAP Messages article series, especially part 2, Talking to Google.