Youtube Data API Wrongly Calculated, Quota Exceeded - youtube-api

I have a very simple message and getting the v3 youtube data api to get the list of comments. I am just fetching the list of videos and then fetching the comments (at frequency of 5 sec) to get updated messages. using the page token as needed to minimize the load and computaion.
Today after some time while internally testing the application i started getting the quota exceeded exception. I know the youtube provided by default 10000 units and since reading the comments (and videos as well) is just 1 unit, i should expect to get similar numbers.
However, the data is wrongly calculated.
Following are request details
If you see, there are 2895 total requests LiveChatMessages-> List.
However, when i go to IAM-> Quotas, it showed 14k earlier, then 12.6k in quota usage
There seems to be some problem either with the computation or with the Documentation that defines the units for queries. Can someone help please..
PS: Just using the two apis as mentioned above in screenshot. Both are list.

If you see, there are 2895 total requests LiveChatMessages-> List. However, when i go to IAM-> Quotas, it showed 14k earlier, then 12.6k in quota usage
Yes i can see that there are 2895 requests, but how do you know what the qutoa costs are for those requests. You are using the YouTube Live Streaming api for those requests. Not the YouTube-Data-api
There is no documentation of the quota cost for the YouTube Live Streaming api calls. If Google says you used all your quota then you probably have.
I would post an issue over on the issue forum asking them to document the quota cost for the calls Issue forum

Related

'defaultPerDayPerProject' to 'default/CLIENT_PROJECT-1d' [duplicate]

I got new YouTube quotas approved. But there is one problem. They do not work. It appears to me that there are actually two of them. In fact, there are new quotas, but they are not.
What could it be and how can I get out of this situation? Thanks
Currently this appears to be an internal issue with the YouTube API.
When you get a quota extension, either the old 10k quota should either be removed or the new higher quota should be the one applied when you are making requests.
There appears to be a bug some where in the system. where you have two quotas and only the lower one is being applied and the higher one is being ignored.
I am in contact with the team and they are looking into it. I have not heard anything positive back yet only that they are still trying to diagnose the issue.
I'm going placing this as an answer here as it was the first question regarding this issue. I can close vote all other questions as duplicate to this one. There by keeping everything in one place.
Currently there are four.
YouTube api does not apply quota extension, quota still limited to 10k
'defaultPerDayPerProject' to 'default/CLIENT_PROJECT-1d'
Youtube data API not using the correct quota
Why am I getting quota exceeded with enough quota remaining
There is also a report on the issue forum
Quota Increase Not Working

YouTube api does not apply quota extension, quota still limited to 10k

I got new YouTube quotas approved. But there is one problem. They do not work. It appears to me that there are actually two of them. In fact, there are new quotas, but they are not.
What could it be and how can I get out of this situation? Thanks
Currently this appears to be an internal issue with the YouTube API.
When you get a quota extension, either the old 10k quota should either be removed or the new higher quota should be the one applied when you are making requests.
There appears to be a bug some where in the system. where you have two quotas and only the lower one is being applied and the higher one is being ignored.
I am in contact with the team and they are looking into it. I have not heard anything positive back yet only that they are still trying to diagnose the issue.
I'm going placing this as an answer here as it was the first question regarding this issue. I can close vote all other questions as duplicate to this one. There by keeping everything in one place.
Currently there are four.
YouTube api does not apply quota extension, quota still limited to 10k
'defaultPerDayPerProject' to 'default/CLIENT_PROJECT-1d'
Youtube data API not using the correct quota
Why am I getting quota exceeded with enough quota remaining
There is also a report on the issue forum
Quota Increase Not Working

Quota exceeded for quota metric 'Requests' and limit 'Requests per minute' of service 'mybusinessbusinessinformation.googleapis.com' for consumer

I'm trying to collect and update data using the Business Information API.
In order to get the API Calls to work, I'm only trying to get information from my business by using "Get-requests". However when calling several methods, I keep receiving the following errors:
"Quota exceeded for quota metric 'Requests' and limit 'Requests per minute' ".
Both in the Postman-calls or the OAuth 2.0 Playground (which in my eyes: should be a sandbox, ready for testing - very frustrating…).
When I look for my quota in the API settings: I'm not even able to change the requests per minute other than '0'. This makes it really hard to test/use the API.
I can't even find out which categories there are for a business location… 
For your information: I've already asked for increase of the quota using the forms. But it seems google isn't really responsive in this matter.
Can this be solved?
The API shall be used to update a group of 50 (or more) locations, this instead of bulk-editing with a csv-file.
Any help would be welcome.
Thanks in advance,
Kind Regards,
Seppe
If the quota approval form was ignored, you might still have a chance via the API support (https://support.google.com/business/contact/api_default).
They might be reluctant to grant you a quota if your maximum location count is this low though - the API is designed for larger use cases.
Is it documented anywhere that it's meant for larger users? I got approved being very clear it was only for a handful of locations.
BUT even though I got approved and have access there are 3 specific quotas (all per-minute) that are set to zero, even though I have tonnes of allowance for all the non-per-minute quotas. Seems like a bug to me.
I can make 10000 "Update Location requests per day" but zero per minute.

Listing large amount of subscriptions of a youtube channel

I am trying to fetch all the subscriptions ids of a youtube channel that has 100k+ subscribers. When fetching the first page of results, youtube returns properly the total amount of subscriptions and the next page token.
After a few hundred calls (because you can only fetch 50 results per call), the api doesn't provide anymore the nextPageToken, and the listing stops with only ~20k subscriptions listed.
I tried this on several big youtube channels, and always the same behaviour when I reach around 20k subscriptions listed.
In the documentation I couldn't find anything about any limit on listing subscriptions...
Anybody encountered the same issue ? :-)
Thanks
I think you need to check for an error, If you have reached the quota limit you should get an error when you try and make another request.
Daily quota is 50,000,000 units/day
depending upon which part you request from subscriptions.list some of them like snippet count double against the quota.
Math time
If you have 100000 subscriptions and you have to fetch them in 50 subscription bites that's going to take you 2000 requests. Even if you are using one of the double parts its still should only be around 4000 requests.
I don't think the problem is quota check to see if you are getting an error.
Googling found
issue request might be related. Youtube api impossible to get all results
YouTube api page tokens
possible hack

YouTube API V2 Quota Limits

For V2 of the YouTube Data API what are the exact limits for the quota?
I am aware that this is a frequent question, however I am yet to find any concrete answers.
Reason for Question:
I am going to querying a large pool of videos for their comments on a regular basis and would like to know when I am coming close to my quota limit, so the system can slow down. In V3 of the YouTube API, the quota limits are clearly documented. However I'm unable to use V3 of the API as it does not support the retrieval of comments (sidenote - does anyone know why?)
In v2 of the data API, the quota was not a fixed number per day as it is in v3, but instead was a limit that prevented too many requests within a short period of time. Unfortunately, I don't believe that there exists anywhere some firm documentation as to how many requests that would be or what the short period of time would be, either; generally, Youtube has always stated that if you get a quota error while making a call to v2 of the data API you should wait "a few minutes" before trying again. Here's the only official statement.
https://developers.google.com/youtube/2.0/developers_guide_protocol_error_responses?hl=en#Quota_errors
It is possible that one of the reasons for this lack of direct documentation is that there isn't a hard and fast number, but it changes in response to the current load.
In answer to your side question, there haven't been any official statements from the YouTube team about why comment retrieval hasn't yet been implemented, but it likely will be in time (as will other pieces of data retrievable via v2 but not yet via v3).

Resources