Lefty
Lefty

Reputation: 695

Batch process with google geocoding api webservices (looking for updates)

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.

Upvotes: 9

Views: 9906

Answers (4)

Alvaro Aliaga
Alvaro Aliaga

Reputation: 111

To use batch geocoding you should use Mapbox Batch Geocoding, is simple and good performance

documentation: Batch geocoding

Upvotes: 0

Daniel T.
Daniel T.

Reputation: 489

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.

Upvotes: 4

Shawn Domingo
Shawn Domingo

Reputation: 1401

There are currently no available feature for a Geocoding API to handle multiple address at a single call, however, you may implement the batch process via cURL, by doing this, you can call multiple requests at once automatically. Implementation will be up to your use case as well.

Upvotes: 1

geocodezip
geocodezip

Reputation: 161334

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)

Upvotes: 1

Related Questions