[GIS] How to return multiple results from the Google Maps geocoding API

geocodinggoogle-maps-api

The Google Maps API Geocoding Developers Guide page shows an example of how to geocode an address.

How can I return multiple address suggestions, so that I can pick the correct response?

For example, a search for "Richmond" should return multiple Richmonds across the world. However, this request only returns a single response (when I use a valid API key):

https://maps.googleapis.com/maps/api/geocode/json?address=Richmond&key=YOUR_API_KEY

enter image description here

The example given at https://developers.google.com/maps/documentation/geocoding/intro#RegionCodes even suggests that multiple results should be returned for address=Toledo but I'm still only seeing one result for Toledo.

Is there a parameter to specify the number of results to return?

Best Answer

Looks like someone asked this on SO and didn't get an answer. The Google Maps API blog says:

The Geocoding API is best for handling unambiguous queries such as complete postal address strings... Geocoding API is not recommended if your application handles ambiguous or incomplete queries

and suggests you might want to look at the Places API as the Geocoding API is more for complete postal address strings.