I basically want to retrieve a list of city and state within a zipcode. Is Google's Geocode API capable of doing so? I've tried looking into the documentation but found the information overwhelming.
Any help would be appreciated. If there is another method of accomplishing such task, please let me know.
Thanks
EDIT: I was able to retrieve the City and State through: http://maps.google.com/maps/geo?output=xml&q=14606 but is there a limitation against that?
Just query the geocode API with the following string "zip XXXXX" and if you have a valid zip, they will send you back the lat/lon and more.
(We could force the locale – that the postcode is in the SG– by using"http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=POSTCODE,SG".) Simply call this url in a jquery-ajax and you will get the lat long in result.
The Geocoding API uses a pay-as-you-go pricing model. Geocoding API requests generate calls to one of two SKUs depending on the type of request: basic or advanced.
Use the GeoCoding API
For example, to lookup zip 77379 use a request like this:
https://maps.googleapis.com/maps/api/geocode/json?address=77379&sensor=true&key=YOUR_GOOGLE_PLATFORM_API_KEY
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With