Google 课堂插件现已面向开发者正式推出!如需了解详情,请参阅
插件文档。
使用限制
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
配额检查基于 60 秒的移动平均值,这允许使用量出现峰值。默认情况下,Classroom API 会受到下表中列出的限制:
限制 |
配额标准 |
每个客户每天的查询次数 |
4,000,000(平均 46 QPS) |
每位客户每分钟的查询次数 |
3,000 (50 QPS) |
每位用户每分钟的查询数 |
1,200(20 QPS) |
允许的 QPS 可能会根据多种运营因素而增加或减少。
如果您需要发出的请求数量超出适用于您项目的限制:
- 首先,请确保您通过重试请求(最好使用指数退避算法)来响应可重试的错误(例如当请求超出您的限制时返回的
RESOURCE_EXHAUSTED
错误)。
- 如果您在提供此功能的端点上轮询更改,请考虑改用推送通知。
- 如果您仍需发出超出项目所分配限额的请求,请参阅下文,了解如何申请提高限额。
如需查看或更改项目的用量限制,或申请增加配额,请按以下步骤操作:
- 如果您的项目还没有结算账号,请创建一个。
- 在 API 控制台中访问 API 库中的“已启用的 API”页面,然后从列表中选择一个 API。
- 如需查看和更改配额相关设置,请选择配额。如需查看用量统计信息,请选择使用量。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-01。
[null,null,["最后更新时间 (UTC):2025-08-01。"],[],[],null,["# Usage Limits\n\nQuota is checked on a **60-second moving average** , which **allows for spikes in\nusage**. By default, the Classroom API is subject to the limits in the following\ntable:\n\n| Limit | Quota Standard |\n|-------------------------------|-------------------------|\n| Queries per day per client | 4,000,000 (Avg. 46 QPS) |\n| Queries per minute per client | 3,000 (50 QPS) |\n| Queries per minute per user | 1,200 (20 QPS) |\n\nThe permitted QPS may be increased or decreased depending on a number of\noperational factors.\n\nIf you need to make more requests than the limits applied to your project:\n\n1. First, ensure that you respond to retryable errors (such as the `RESOURCE_EXHAUSTED` error that is returned when a request exceeds your limits) by retrying the request, preferably using exponential backoff.\n2. If you are polling for changes on an endpoint where this is offered, consider using [push notifications](/workspace/classroom/guides/push-notifications) instead.\n3. If you still need to make more requests than the limits assigned to your project, see below for instructions on requesting higher limits.\n\nTo view or change usage limits for your project, or to request an increase to\nyour quota, do the following:\n\n1. If you don't already have a [billing account](//cloud.google.com/billing/docs/how-to/manage-billing-account) for your project, then create one.\n2. [Visit the Enabled APIs page of the\n API library](https://console.cloud.google.com/apis/enabled) in the API Console, and select an API from the list.\n3. To view and change quota-related settings, select **Quotas** . To view usage statistics, select **Usage**."]]