Geocode multiple addresses

ace2600 picture ace2600 · Dec 29, 2008 · Viewed 47.8k times · Source

I need to geocode around 200 addresses per request and do around 3,000 request per day. I will be doing this server side using PHP. I have looked at How to convert an address to a latitude/longitude?, but could not find a way for either Google Maps HTTP Request API or the Yahoo Geocoding REST API (cannot use JavaScript as this is server side) to send multiple addresses.

I will be primarily using this to sort addresses based on the coordinates and if the API supports, fill in any missing data for each address. The addresses will be in the United States only. The addresses to geocode will be from user input, so be free form, like "street address, postal code", or "city, state", etc. Accuracy is not too important for the coordinates, say within five hundred feet or so.

Is there a free API to handle this? Is there a way to get Yahoo or Google to do multiple locations in a request?

Answer

Chris Brandsma picture Chris Brandsma · Dec 29, 2008

I've looked at the Google Maps api, Yahoo Maps Api, MapQuest API, and the Microsoft Virtual Earth API. None of these free services allow bulk geocoding.

But, Google Maps api allows 15,000 goecodes per day. But they don't like it when you send too many at one time. They suggest waiting 200ms between requests. They track you by IP address btw.

Yahoo allows 5,000 per day, and is also an easy api to use. Microsoft Virtual Earth allows 5,000 per day, but the api documentation is a pain in the butt.

MapQuest is just strange, and doesn't seem to give good results (least accurate of all that I've seen).

I've actually set up my code to alternate between several services so I can make multiple requests at once. This - sort of - simulates bulk encoding.