0
votes

According to Google Geocoding API (https://developers.google.com/maps/documentation/geocoding/#Limits) there are limits per running requests. How to get programmatically these limits?

The only variant, is to get from Google Developers Console.

Thanks!

1

1 Answers

0
votes

You can check the status code returned with the result, for instance I'm using geocoder library in Python:

import geocoder
:
g = geocoder.google(location)
if (g.status == "OVER_QUERY_LIMIT") or (ggl_req == 2500):
  sys.exit(0) 

Where ggl_req is a counter I use to keep track of the number of request performed so far.

Best..