Google Apps Reporting API Limits and Quotas

Limits and quotas protect the Google infrastructure from an automated process that uses the Reporting API in an inappropriate way. Excessive requests from an API might result from a harmless typo, or may result from an inefficiently designed system that makes needless API calls. Regardless of the cause, blocking traffic from a specific source once it reaches a certain level is necessary for the overall health of the Google Apps system. It ensures that one developer's actions cannot negatively impact the larger community.

In the unlikely event that your API request fails, you'll receive an HTTP status code response. A status code of 403 has error information about incorrect input and an HTTP status code of 503 has error information indicating which API quotas have been exceeded. These responses allow your custom application to detect these errors and take appropriate action.

If your requests need to be completed in a fixed period of time, send your requests in parallel or use multiple threads in your Java or C# application. An example of parallel requests is requesting parallel operations across different groups, rather than adding or removing lots of members from one group simultaneously. In the case of threads, try starting with 10 threads. Note, the thread recommendation has trade-offs and is not useful for all API situations. If the number of requests gets too high, quota errors will occur. Another trade-off example is the Email Migration API's quota for the maximum overall message upload rate. The upload rate is one message - per second - per user, no matter how many threads are making upload requests.

For all errors that are time based (maximum of N things for N seconds per thread), especially the 503 status code errors, we recommend your code catch the exception and, using an exponential backoff algorithm, wait for a small delay before retrying the failed call. A Reporting API example for one thread is to wait 5 seconds and retry the failed call. If the request is successful, repeat this pattern for the other threads. If the second request is not successful, your application should scale back on the frequency of the request until a call is successful. For example, increase the initial 5 second delay to 10 seconds and retry your failed call again. Also, decide on a retry limit. For example retry a request 5 to 7 times with different delay times before your application returns an error to the user.

API Quota Categories Quotas
Account ID The Account report's account_id tag is a 16-character hexadecimal string.
ClientLogin authentication tokens Valid for 24 hours. If the token is expired, the system returns the AuthenticationFailure(1006) error. Note:The ClientLogin authentication has been officially deprecated. For OAuth information, see Authorize Requests.
Disk space In the disk space report, mailboxes that occupy less than 1GB of disk space are grouped in increments of 100MB, and mailboxes that occupy between 1GB and 10GB of disk space are grouped in increments of 500MB.
Pagination If set for pagination (set page=1), the API returns a maximum of 10 entries per page using a tag which retrieves a page of specific details.Call the next page if the feed returns more than 10 entries. This optional property is used for primary accounts with a large number of user accounts. For primary accounts with more than 100,000 user accounts, these reports will only be available using pagination.
Quota limit The Account report returns any account with less than 5 percent of its quota remaining. This information does not include suspended accounts.

Other Types of Limits Limitations and Guidelines
Date availability The Account report's dates are not available until 12 p.m. Pacific Time (PT) the following day. For example, reports for June 10, 2006, would not be available until 12 p.m. Pacific time on June 11, 2006. If requesting a report before this time, a ReportNotAvailableForGivenDate(1059) error is returned
Dates of reports For the Accounts report, the value of the date tag must fall within the 30-day window that ends the day prior to the day that you request the report. (If your request occurs before 12 p.m. Pacific time, the date must fall within a 29-day window ending two days prior to the day you request the report.)

For the Activity, Disk Space, Email Client or Summary reports, Google returns data for all days prior to and including the requested day in the requested month and year. For example, if you request data for October 10, 2006, your report would include data for October 1, 2006, through October 10, 2006.

Suspended accounts The Accounts report returns suspended account information except for a suspended account's quota limit information.

The Summary, Email Clients reports do not include information for suspended accounts. The Accounts report does not return quota limit information for suspended accounts.