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.
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.
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.
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
© 2022 - 2024 — McMap. All rights reserved.