Does Google Maps API offer a way to search for locations by name?

dclowd9901 picture dclowd9901 · May 8, 2011 · Viewed 36.1k times · Source

When one visits http://maps.google.com, they are able to type queries into the search field and receive results based on locations or places, and not hard search results, as they would in a normal Google Search query. They're a unique style of result (names of places, locations) suited to the Maps interface for obvious reasons.

I've been digging through both the Maps and standard Google Search API for a couple hours now, and have done multiple searches on this question, and I can't seem to find the answer.

They obviously have the Local Search, but that's been deprecated, and it only yields results if you provide an initial lat/long. I want to be able to find places or locations with no initial lat/long.

Essentially what I want to do is allow a user to type in an address, name of a place or name of a city or state or a zip code, or essentially any other kind of location that is allowable on Maps, and geocode it. I feel stupid because this seems like it has to be there, but nothing I've seen in the API seems to do this.

I don't need the AJAX suggested results, necessarily. Just a way for a user to type in a nice name and geocode from it, though results as a user types would be ideal.

What am I missing here?

Answer

rbawaskar picture rbawaskar · May 8, 2011

What you are looking is Geocoding API from google maps.

Find Documentation here

UPDATE 5/12/2011

Google just opened up public access to their Places API. This is more to the heart of the original question request:

http://code.google.com/apis/maps/documentation/places/autocomplete.html