2
votes

I have a server application that calls the google maps geocoding API at http://maps.googleapis.com/maps/api/geocode/json

I experience that when the server application invokes such an URL, the response is sometimes ZERO_RESULTS.

If I take the exact same URL and paste in a browser, I get a valid result back.

Any ideas to what differences can cause this? HTTP headers? Something else?

1
whats an example URL for this? I haven't seen that happen.Nael El Shawwa
Also: Your code that calls the API?Trott
Very late but in case someone else comes across this, the answer is probably Google's soft rate limiting as described in the API docs.Jamie Bull
Same thing happening for meDavid Callanan

1 Answers

0
votes

In the link you provided it is missing the address, components, latlng or place_id parameters, besides the Google Map API KEY.

You need at least one of the parameters and the Key to get a proper response.

e.g.

https://maps.googleapis.com/maps/api/geocode/json?place_id=ChIJ1xwGTLE1K4gRmzFDd_1HzPc&key=xxx

Just add your KEY and it should work.