Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lookup City and State by Zip Google Geocode Api [closed]

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?

like image 779
meenxo Avatar asked Jan 20 '11 16:01

meenxo


People also ask

How can I get Google map API zip code?

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.

How do I find the latitude and longitude of a zip code using Google API?

(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.

Is Google geocoding API free?

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.


1 Answers

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

like image 102
Jason Avatar answered Oct 02 '22 11:10

Jason