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



我有一个YouTube频道,里面有将近800个视频。我正在使用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次更新中使用了我每天10000次的请求配额。这怎么可能?

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

文档的配额计算器表示,调用snippet部件上的Videos.update端点的配额成本为53个单位。

因此,由于每天的配额高达10000个单元——如果只计算更新的话——你在任何一天都无法获得超过188个视频的snippet元数据更新。

最新更新