3

To get the altitude of several points, I use the Elevation API provided by Google. The problem I'm facing is that I regularly receive an OVER_QUERY_LIMIT error message, certainly because I'm asking altitudes at a too high rate.

The Google documentation speaks about such a limit but doesn't give any value for it. Does anyone know at what level this maximum interrogation rate is set?

djechlin
  • 59,258
  • 35
  • 162
  • 290
Zelig63
  • 1,592
  • 1
  • 23
  • 40

2 Answers2

2

The Google Elevation page gives you this:

Usage Limits

Use of the Google Elevation API is subject to a limit of 2,500 requests per day (Maps API for Business users may send up to 100,000 requests per day). In each given request you may query the elevation of up to 512 locations, but you may not exceed 25,000 total locations per day (1,000,000 for Maps API for Business users). This limit is enforced to prevent abuse and/or repurposing of the Elevation API, and this limit may be changed in the future without notice. Additionally, we enforce a request rate limit to prevent abuse of the service. If you exceed the 24-hour limit or otherwise abuse the service, the Elevation API may stop working for you temporarily. If you continue to exceed this limit, your access to the Elevation API may be blocked.

You could have found this yourself if you had Googled for it.

NickT
  • 23,844
  • 11
  • 78
  • 121
  • I had already found this. But the only limitations indicated are related to the number of requests per day. It's only said "Additionally, we enforce a request rate limit..." but no value associated with it. My number of request is far less than the 2500 requests per day limit and I still receive the "OVER_QUERY_LIMIT" error. This let me think that another limit exists. – Zelig63 Feb 04 '13 at 18:00
  • I think this 2,500 limit is known as their daily quota, however Zelig63 is probably being caught by their "rate limit", which is not published anywhere but is likely somewhere from 10 requests per second to 1 request per second. – dodgy_coder Feb 12 '13 at 07:14
1

You are likely making too many requests per minute; this is known as a rate limiting, but the actual limit per minute is not published anywhere. I have seen some talk about a limit of 10 requests per second (i.e. 600 per minute) as an absolute limit on all Google APIs.

For their free APIs, such as the one you are using, and their Geocoding API, they just say they have a limit of what they deem to be a reasonable amount of requests per minute. This may go up and down depending on server load and/or time of the day.

This recent post seems to be suggesting that you require a delay of a clean 1 second between batches of 10 requests, where each of the 10 are individually separated by 0.1 second.

The answers to this question also backup the above: How do I Geocode 20 addresses without receiving an OVER_QUERY_LIMIT response?

Community
  • 1
  • 1
dodgy_coder
  • 12,407
  • 10
  • 54
  • 67