YouTube 数据 API,仅几百次 PUT 更新就达到了 10,000 个配额

YouTube Data API, 10,000 quota reached with just a few hundred PUT updates

我有一个包含近 800 个视频的 YouTube 频道。我正在使用 YouTube 数据 API V3 来更新每个视频的标题和描述。

这是我正在执行的更新类型的 cURL 示例:

curl --request PUT \
  'https://www.googleapis.com/youtube/v3/videos?part=snippet' \
  --header 'Authorization: Bearer ACCESS_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"id":"xxxxxxxxxxx","snippet":{"description":"Updated description, often quite long","title":"Updated title","channelId":23}}' \
  --compressed

这(终于)工作得很好。因此,我着手进行批量更新,为每个视频生成新的标题和描述,并发出单独的 PUT 请求。

问题是,在我收到警告之前,我进行了大约 175 次成功更新:

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "dailyLimitExceeded",
    "message": "Daily Limit Exceeded. The quota will be reset at midnight Pacific Time (PT). You may monitor your quota usage and adjust limits in the API Console: https://console.developers.google.com/apis/api/youtube.googleapis.com/quotas?project=xxxxxxxxxxxxx",
    "extendedHelp": "https://console.developers.google.com/apis/api/youtube.googleapis.com/quotas?project=xxxxxxxxxxxxx"
   }
  ],
  "code": 403,
  "message": "Daily Limit Exceeded. The quota will be reset at midnight Pacific Time (PT). You may monitor your quota usage and adjust limits in the API Console: https://console.developers.google.com/apis/api/youtube.googleapis.com/quotas?project=xxxxxxxxxxxxx"
 }
}

我在不到 200 次更新中用完了每日 10,000 次的请求配额。这怎么可能?

有没有一种方法可以在一个 PUT 请求期间更新多个视频 ID。配额计数是如何统计的?我似乎找不到任何关于它的数据。

文档的 quota calculator 说在 snippet 部分调用 Videos.update 端点的配额成本为 53 个单位。

因此,每日配额为 10000 个单位(如果仅考虑更新),您无法在任何一天更新超过 188 个视频的 snippet 元数据。