Skip to content

Instantly share code, notes, and snippets.

@bengolder
Created July 22, 2011 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bengolder/1099735 to your computer and use it in GitHub Desktop.
Save bengolder/1099735 to your computer and use it in GitHub Desktop.
Google maps geocoding API
import urllib2 as url
import json
h = "http://maps.googleapis.com/maps/api/geocode/json?address=9341+Venice+Boulevard+Culver+City,+California&sensor=false"
f = url.urlopen(h) # open the connection
s = f.read() # read the results as a string
d = json.loads(s) # convert the json string to a python dictionary
print d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment