API 请求的限制和配额
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
为确保 Google Analytics 系统收到的数据量不超出其处理能力,并确保系统资源能够公平分配给各用户,Google Analytics API 会对您的使用情况施加一些限制和配额。
以下限制和配额适用于 Google Cloud 项目一级的总体 Google Analytics API 用量(不包括 Data API 调用):
- 每个项目每日的请求数不得超过 50,000 次。
- 每个 IP 地址的每秒查询数 (QPS) 不得超过 10 次。
- 在 API 控制台中,有一个类似的配额,称为每个用户每 100 秒请求数。默认情况下,此配额设置为每个用户每 100 秒 100 个请求,可调整为上限为 1,000 的值。但对该 API 的请求数量限制为每位用户每秒最多 10 个请求。
- 如果您的应用通过单个 IP 地址发出所有 API 请求(例如,代表用户发出请求),请在每个请求中使用
userIP
或 quotaUser
参数,以便为每个用户获取完整的 QPS 配额。如需了解详情,请参阅标准查询参数摘要。
某些 API 还存在其他限制。如需详细了解特定于 API 的限制和配额,请参阅以下页面:
与限制和配额相关的错误
如果已超出 Google Analytics API 请求的配额,则该 API 将返回错误代码 403
或 429
以及账号已超出配额的消息。如需了解详情,请参阅服务条款。
如需详细了解配额管理以及如何优化应用以控制配额用量,请参阅监控 API 和限制用量。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[],[],null,["# Limits and quotas on API requests\n\nTo ensure the Google Analytics system doesn't receive more data than it can\nhandle, and to ensure equitable distribution of the system's resources across\nusers, Google Analytics APIs enfore some limits and quotas on your usage. \n\nThe following limits and quotas apply to your overall Google Analytics API usage\n(excluding Data API calls) at the Google Cloud project level:\n\n- 50,000 requests per *project* per day.\n- 10 queries per second (QPS) per *IP address* .\n - In the [API Console](https://console.cloud.google.com/), there is a similar quota referred to as *Requests per 100 seconds per user*. By default, it is set to 100 requests per 100 seconds per user and can be adjusted to a maximum value of 1,000. But the number of requests to the API is restricted to a maximum of 10 requests per second per user.\n - If your application makes all API requests from a single IP address (for example, on behalf of your users), use the `userIP` or `quotaUser` parameter with each request to get full QPS quota for each user. See The [standard query parameters summary](/analytics/devguides/parameters) for details.\n\n| **Note:** Daily quotas are refreshed at midnight Pacific Standard Time.\n\nSome APIs have additional restrictions. For details on API-specific limits and\nquotas, see the following pages:\n\n- [Admin API](/analytics/devguides/config/admin/v1/quotas)\n- [Data API](/analytics/devguides/reporting/data/v1/quotas)\n- [User Deletion API](/analytics/devguides/config/userdeletion/v3/limits-quotas)\n\nErrors related to limits and quotas\n-----------------------------------\n\nIf the quota of requesting a Google Analytics API is exceeded, the API returns\nan error code `403` or `429` and a message that the account has exceeded the\nquota. See the [terms of service](/terms) for more information.\n\nFor more information on quota management and how to fine-tune your application\nfor quota usage, see [Monitoring APIs and capping\nusage](https://support.google.com/cloud/answer/6158858)."]]