Geocoding 5000 addresses in a PHP script

I am looking for geocoding more than 5000 addresses at once in a PHP script (this will only be done once).

I studied Google as a potential resource for this, but I read reports that after you have passed about 200 requests through Google, you will let you go within a day.

I'm just wondering if there is any other way to geocode 5000 or so addresses, another service like Google or something similar that I could use?

Or do I just need to stagger it? The problem is that I don’t have much time and 200 or 300 per day for 5000 results will take almost 5 (working) weeks.

thanks

Tom

+6
php geocode
source share
5 answers

Instead, you can use Bing Maps: the spatial data API is designed to batch geocode thousands of addresses at once (this link is even a detailed tutorial on how to use it with PHP).

You just need to register the key at http://www.bingmapsportal.com , but it’s free and fast (you will receive a confirmation email in a few minutes).

+12
source share

Is there a limit on the number of geocode requests I can send?

If more than 2500 geocoding requests are received from a single IP address within a 24-hour period, or geocode requests come from a single IP address at too high a speed, the Google Maps API geocoder will start responding with a status code of 620.

[...]

If you need to send a very large set of addresses to the geocoding web service for caching for later use, you should consider the Google Maps API Premier , which provides a separate batch geocoding quota for this purpose.

- http://code.google.com/apis/maps/faq.html#geocoder_limit

As @Pekka noted: Please note that Google’s terms of use prohibit the use of geocoding for purposes other than displaying on a map.

+6
source share

As @Bart Kiers says, there is a limit to the number of requests you can make within 24 hours; there is also a “not too fast” per hour (?) limit. I would suggest that you split (seconds per day) 86400/2500 (limit) to get a request speed that should not exceed the "too fast" per / hour limit. It issues approximately one request in 35 seconds, which should receive results within two days.

However, check the return codes: if the service starts returning 620, stop and let it rest for a while, otherwise you risk a ban.

+1
source share

What you are trying to do is really not consistent with Google’s terms of service.

However, Google will start returning "over-quota" responses if you do not pause at least 250 ms between geocoding requests.

In practice, if you only make 2 requests per second, you will not be throttled to the limit of 2'500 days.

0
source share

All Articles