Google Batch Geocoding API
Asked Answered
D

3

3

I am using Google Geocoding API to conduct both forward and reverse geocoding work in my projects. While this API is only working for a single address or a single pair of geo coordinates per request, not for batch processing. I know I can copy and paste lines of addresses up to 250 to the Batch Geo Website to process, but it would be so limited and ineffectively to me if I did that. Initially, I called REST API by PHP curl in my codes, while for batch data I have no idea how to handle and I did not find the Batch Processing API document defining call URL, parameters, response, or status. Is there any resource I can find concerning Batch Geocoding API? By the way, I found the same issue on Timezone API.

David answered 25/7, 2018 at 18:12 Comment(1)
Did you find any solution for this? Even am looking for the sameTatary
C
0

Google Maps APIs support 1 query per request. To batch geocoding multiple address, you need to send 1 request per address. Implementation is entirely up to you.

Constrictive answered 28/9, 2018 at 12:46 Comment(0)
N
0

As miguev mentioned, Google does not allow batch geocoding. However, HERE does have a batch geocoder that you can use go geocode multiple addresses in one call.

Nad answered 7/7, 2020 at 22:59 Comment(0)
P
0

I think there is some misunderstanding when you use the word "batch geocoding". Sending one request at the time is the way to go to implement batch geocoding service. You think the vendor would handle the batch, where in your case, the vendor lets you implement it locally.

Because your volume amount is so small,simply create a loop that runs all of your rows, one at the time, send them to the API, and gets the result back.

There are plenty API for batch geocoding our there and you should be ok using any of them.

In your case it would be like that:

start loop until end of collection $ curl -X GET 'https://csv2geo.com/api/geocode?id={email}&key={key}&searchtext={search_text}'

get response back

{ "hum_address": "781 Tremont Street,Boston,MA,2118", "address_components": { "number": "781", "street": "Tremont St", "city": "Boston", "state": "MA", "country": "USA", "zip": "02118" }, "full_address": "781 Tremont St, Boston, MA 02118, United States", "lat": 42.33957, "lon": -71.08034, "relevance": 1 }

and store it in a array collection end look

Prefiguration answered 26/1, 2021 at 13:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.