Olga Convey
Olga Convey

Reputation: 81

Understanding YouTube quota limits: total per day vs. per 100 seconds?

YouTube imposes the following quota cost limits (default values listed):

What is the meaning of the last limit? How can the quota per 100 seconds exceed the total quota per day?

Upvotes: 8

Views: 5004

Answers (3)

nascente_diskreta
nascente_diskreta

Reputation: 79

I was also looking for this, as the documentation from YouTube is not clear at all. Some answers, such as @nightsurgex2's, hinted at the fact that only the daily limit counts, but I wanted to be sure before sending this to production, so I wrote and ran some custom tests. I'm not going to speak about the "per user" limits, as the application we are developing does not use this.

The test application just sends a lot of dummy requests (each worth 1 quota point) and breaks when API returns an error. Please keep in mind that this will exhaust your application quota for that day, so use a dummy project if you want to try anything similar. The results were:

Finished YouTube Data: 03/17/2022 15:24:13
Took: 51759.2994 ms
Total requests: 10451


Finished YouTube Analytics: 03/17/2022 15:29:29
Took: 16080.7929 ms
Total requests: 892

Finished YouTube Analytics: 03/17/2022 18:29:57
Took: 10478830.055 ms
Total requests: 98927
  • The limit for YouTube Data v3 is 10k points per day. The number we got is very close to this. Trying to send further requests, even hours later, will fail. There is no per-minute limit.
  • YouTube Analytics v2 enforces both a per-minute and a per-day limit. These values are consistent with Google's documentation and with the test above: 720 requests per minute, or 100k per day (reset at midnight US West Coast). If you go steadily at the maximum per-minute rate, you will exhaust your daily quota in around 2 hours and 20 minutes.
  • YouTube Data has a much smaller quota, however, you are not likely to use it as often. You only use it to get playlist ids, video ids, and the like. The bulk of data (viewers, demographics, subscribers, etc) will come from Analytics. Even then, you will possibly have to phase our your requests or cache their result, depending on your needs.

Upvotes: 1

nightsurgex2
nightsurgex2

Reputation: 250

I believe the "Queries per 100 seconds = 3,000,000" is a inaccurate/left over/a mistake from Google's old Query limits. Clearly 3,000,000 in 100 seconds is 3x your total per day and makes no sense!

The "old" limits used to be much higher: 50,000,000 Queries per day

The per 100 seconds limits, however, did not change (or at least were not updated properly).

Upvotes: 1

KENdi
KENdi

Reputation: 7741

Here are the meaning of the different quota in the YouTube Data API

QPD(quota per day) - meaning the maximum numbers of request over a 24 hour period a client id is able to make to an API.

QPS(quota per second) - meaning a global quota per second for the application, meaning how many calls per second an application can make.

quota per seconds per user - meaning the number of queries a user, in the application can make.

The quota of 3,000,000 per 100 sec did not exceed the 1M QPD because you need to divide the 3M QPS to 100.

So meaning you only have 30,000 QPS or queries per second.

I hope this information helps you.

Upvotes: 3

Related Questions