-
Notifications
You must be signed in to change notification settings - Fork 389
Understanding YouTube API Quota Limits
ThioJoe edited this page Jan 9, 2022
·
4 revisions
⚠️ Important⚠️ : Especially if you're a larger channel dealing with thousands of spam comments, to make your life easier, read and understand this page!
- Usage of the YouTube API is not unlimited. For each Google Cloud project you create, there is a default limit of 10,000 "units"/day.
- The API cost of various actions can be found here
- The "cost" does not mean in terms of money, just API usage limits. Using the API is free.
- The daily quota resets at Midnight in Pacific Time
- Each comment deleted / reported / hiding costs 1 unit
- Each comment checked for deletion success costs 1 unit
- Note: Checking for comment deletion success can be disabled in the config file. Therefore, if you are handling large amounts of spam, you should probably disable this setting, as it effectively doubles the cost of deleting/hiding each comment.
- Each set of 100 comments fetched costs 1 unit
- Each set of 5 recent videos listed costs 100 units (before any comment scanning is even done)
- Scan 1,000,000 comments
- Delete/Report/Hide 10,000 comments
- If also checking for deletion success: Only 5,000 comments
- Fetch list of 500 most recent videos
-
For Example:
- If you scan 1,000,000 comments, you would have no remaining quota to actually delete any found comments
- If you choose to scan your 500 most videos, by the time the program got the list of those videos, you would not have enough quota to even be able to scan the comments
- There is actually a process by which you can request an increase to your project's API quota
- However, the request form is very elaborate, and I'm not sure they would grant an increase for most people
- However, if you are a large channel, I imagine you could work with a partner manager to help you through the process or help you get approved for example
- Actually on that form, it does say, "If you are looking for support or quota increments for Reporting and Content ID APIs, please contact your YouTube Partner Manager". So I assume it would be a similar story for needing an API quota increase for moderation on your own channel.
- The quota limit of 10,000 is for each project you create (which is what you did when you followed the "obtaining an API key" tutorial)
- You could theoretically create multiple projects in the Google Cloud console (following the same procedure), where each would generate it's own
client_secrets.json
file- You can think of the
client_secrets.json
file as the API key
- You can think of the
- Meaning if you run out of quota for one project / api key, you could swap out the
client_secrets.json
file with that of a different project- What you'd probably do is rename each one to something like
client_secrets1.json
orclient_secrets2.json
, then whichever one you want to use at the time, rename it toclient_secrets.json
- What you'd probably do is rename each one to something like
Note: If something on this page seems out of date or there is information missing, feel free to submit an issue.