views:

3757

answers:

4

Does Google offer a RESTful API where I can pass it a city name (or zip) and it returns the longitude & latitude.

I know how to do this with using the Google Maps API, but I really don't want to have my users download the huge 200k Google Maps API solely so that I can geocode a location.

Does anyone know of a URL based (REST) city/zip to longitude & latitude API?

Since geocoding this information then kicks off multiple other processes, doing this first step is of critical importance to have it perform quickly b/c its a bottleneck right now using the Google Maps API b/c of the huge download and JavaScript loadup.

+3  A: 

I found the answer at http://code.google.com/apis/maps/documentation/services.html#Geocoding_Direct

+1  A: 

I've used Yahoo for this: http://developer.yahoo.com/maps/rest/V1/geocode.html

Wilka
+1  A: 

As long as I've pointed this out already today - note that you're technically not permitted to use Google's geocoder unless you'll be displaying the data on a Google Map. The same goes for Yahoo. I don't know if they'll actually check on you, though.

Chris B
A: 

Also keep in mind that you will likely run over your quotas for the day if you have heavy traffic using the direct HTTP call method. Google limits usage based on IP address, so using the client side code will greatly increase the number of geocode lookups you can do per day since they'll be associated with user's computers rather than your server(s).

Kevin Pang
The Premier API does not have any limits for the number of Geocode lookups.
Luke Antins