Google references this: https://developers.google.com/maps/documentation/javascript/geocoding
And states:
The per-session rate limit prevents the use of client-side services for batch requests, such as batch geocoding. For batch requests, use the Geocoding API web service.
However, when you go to the Geocoding API web services page, I see no reference to batch processing. The above sentence infers that you can do batch processing. I need to send a large number of addresses to get lat and longitude, but doing individual calls for each address is taking extremely long periods of time and need a more efficient method. Hopefully, a single batch call to send all the addresses.
Any ideas of how to batch process addresses on google to get lat and longitude?
I have seen this Google Batch Geocoding API
However, it states you can not which is not what the above google statement infers.
Per the Geocoding API web service documentation:
Other Usage Limits
While you are no longer limited to a maximum number of requests per day (QPD), the following usage limits are still in place for the Geocoding API:50 requests per second (QPS), calculated as the sum of client-side and server-side queries.
You are just limited to 50 requests per second and have to pay for them (after you use up the $200 credit)
The best way I found to solve this problem is to use the Directions API with up to 27 destinations (origin, destination and 25 waypoints) and get your geolocation for the response legs. The position accuracy is slightly lower than in the geocode case from what I observed, but it is still a great tradeoff.
In the worst case you will have to call the Directions API twice when one or more addresses are not found in your call. The good thing in this case is that the Directions API will give you a response with the geocoded_waypoints which will specify the NOT_FOUND locations with a geocoder_status. After that, you can eliminate the bad ones and call again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With