Geocoding at last!

Tuesday, June 13, 2006 at 1:33:00 PM

On Sunday night we silently updated the Google Maps API to include geocoding, our #1 most requested feature by developers. It took just 4 hr 32 min 19 sec for curious developers (Mike Williams in this case) to discover it in our new JavaScript files.

The Maps API provides two ways to access the geocoder. You can talk to our geocode servers directly via HTTP request, or you can have the JavaScript do the dirty work for you from the browser. Some cool features of our geocoder are:

  • We don't require you to break up the address into components such as street, city, country. Just send us the address as a single string and let us take care of the parsing.

  • Don't worry about capitalization or punctuation or abbreviations. The geocoder is smart enough to figure out that "Pky" means "Parkway" and "Mtn View" means "Mountain View".

  • The geocoder returns a nicely formatted version of the address you sent. So if your users are typing in things like "1600 aMPhiTheatrE pkWy 94043 USa", we'll send you back a cleaned-up version that you can store & display back to users: "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA".

  • The geocoder also returns the address broken up into components, like street, country, province, prefecture, postal code, etc. This allows you to do things like sort all your addresses by zip code. The geocoder response uses the eXtensible Address Language format, is an international address standard that works for 200+ countries.

  • There's also a simpler version of the geocoder that returns a GLatLng. If you don't need any fancy extra features like address components or cleaned-up strings, just use the getLatLng method of GClientGeocoder to get back a geocoded point.

  • The client-side JavaScript geocoder comes equipped with a built-in cache. This makes the user experience faster and means you'll use up less of your geocode request quota.

  • Street-level geocoding is available for the US, Canada, France, Germany, Italy, Spain and Japan. More countries will be added as Google Maps launches in new countries.

For now, geocode requests are limited to 50,000 requests per day per API key. Since this is a new service, we've set a conservative limit and will reassess as usage picks up. For more information on the geocoder and example code, check out the documentation. As always, we welcome your feedback on the feature and the documentation.

API v1 Current: 1.31
API v1 Default: 1.31
API v2 Current: 2.55a
API v2 Default: 2.54

Update: Removed Japan from the list of countries for which we offer street-level geocoding, as it is not available there. たいへん申し訳ございません。 m(_ _)m