Searching Google?

Curt Hash curt.hash at
Wed Feb 18 01:43:31 CET 2009

On Tue, Feb 17, 2009 at 4:15 PM, Oltmans <rolf.oltmans at> wrote:
> Hey all,
> I want to search using a specific keyword and I just want
> to read back the response using Pyhon. After some thorough Googling I
> realized that I probably need a Search API key to do that. Is that
> correct? Now, I don't have a search key so is there a workaround?
> Please enlighten me.
> Thanks,
> Oltmans
> --

You just need to change your User-Agent so that Google doesn't know a
Python script is making the request:

import urllib2
headers = {'User-Agent' : 'Mozilla/5.0 (X11; U; Linux i686; en-US;
rv: Gecko/2009020911 Ubuntu/8.04 (hardy) Firefox/3.0.6'}
query = 'foo'
req = urllib2.Request('' + query,
response = urllib2.urlopen(req)
results =

More information about the Python-list mailing list