问题
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