I am getting “dailyLimitExceeded” errors with barely 300 total requests

社会主义新天地 提交于 2021-02-17 06:55:31

问题


I am getting "dailyLimitExceeded" errors with barely 300 total requests... I created this api project a few hours ago and everything was working fine at the beginning until I hit about 200 requests and from there every request failed

this is the type of request I am currently trying

https://www.googleapis.com/youtube/v3/search?order=date&part=snippet&channelId={{channel_id}}&maxResults=25&key={{api_key}}

What am I missing? Why was my API key locked so quickly?

Thank you!


回答1:


The Search endpoint is kind of expensive: according to the docs, each one of your search query costs 100 units of quota. Multiply that with 200 and you're quite likely to exceed the daily quota allocated.

If you're only interested to find the new video entries of a given channel, then you better use the PlaylistItems endpoint queried appropriately (see my answer to a related question) that have a quota cost of only 3 units.

Also you should be aware about one of the issues of the API w.r.t. published vs. upload date time of any given video.



来源:https://stackoverflow.com/questions/61024599/i-am-getting-dailylimitexceeded-errors-with-barely-300-total-requests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!