Created
April 14, 2015 22:06
-
-
Save CptKirklnd/8dab9680497b82c825fe to your computer and use it in GitHub Desktop.
Google Maps Geocode API Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#testing an address search in the Google Maps Geocode API before using it in our BitCamp 2015 project | |
#http://maps.googleapis.com/maps/api/geocode/output?parameters | |
#using keyword paramters (street name, parsed in the superior script), rankby (distance) | |
import requests | |
import json | |
outputFormat = "json" | |
queryRoot = "https://maps.googleapis.com/maps/api/geocode/" | |
streetName = "54TH+STREET" | |
APIKey = "#####" | |
#add your own google API key here | |
perameters = "" | |
dc = "Washington,+DC" | |
query = queryRoot + outputFormat + "?address="+streetName+",+"+dc+"&key="+APIKey | |
r = requests.get(query) | |
print r.json() | |
print query |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment