Search code examples
apiquotadefinitions

How does Google define "day" for Google API quotas?


Google Cloud Translate API, for example, sets a default quota of 2 million characters "per day".

However, I can't find their definition of "day" anywhere.

Is this calendar-based, or is it a sliding time interval?

(Observation suggests that it is a sliding time window.)

If calendar-based, when does each day begin?

Is this immutable or does it vary?

Can developers set the start or end time of a project's "days"?

If it is a sliding window, can developers reset it? This could help us manage usage that comes in bursts, and could help us test limiting situations.

Thanks in advance for any information you can provide.


Solution

  • I found one answer in Google's online documentation, and it is specific to the Google Analytics API.

    This API's daily quota is calendar-based and immutable:

    • Daily quotas are refreshed at midnight Pacific Standard Time.

    From: Google Developers | Analytics Real Time Reporting API | Limits and Quotas on API Requests

    I assume that this definition probably applies to the other Google APIs, as well.