6
votes

I have a script at parse.com which imports a fresh information about recent videos from ~10 channels with YouTube v3 API. It worked well for some time, but about a month ago it started to fail once or twice per day with an error:

Error: can't fetch https://www.googleapis.com/youtube/v3/... "error": { "errors": [ { "domain": "usageLimits", "reason": "servingLimitExceeded", "message": "Serving Limit Exceeded" } ], "code": 403, "message": "Serving Limit Exceeded" }

As you can see from the following screenshot I use maximum 37k of 50000k units available per day. I estimate one script run could take maximum 2k units. To make absolutely sure I'm not hitting 3k units/second/user limit I've added 1 second delay before every call to YouTube API, but I still see those errors occasionally.

What's going on? Does YouTube v3 API have some other limits, for example units per IP? (one IP at Parse could host thousands of installations)

google developer console screenshot

3
Just got slightly different kind of error 403 quotaExceededAlexander Vasenin

3 Answers

5
votes

I think this is a issue on YouTube's end and doesn't seem related to the actual quota used.

I have been getting quite a few of these errors sporadically, and seemingly for no reason, over the last few weeks - see YouTube Data API - “Serving Limit Exceeded”

2
votes

I've just filed a bug report with YouTube. Please "star" that issue to draw attention to it and track updates, if you'd like.

0
votes

Version 3 of the YouTube Data API has concrete quota numbers listed in the Google API Console where you register for your API Key. You can use 30,000 units/second/user and 50,000,000 per day.

You can read about what a unit is here.

A simple read operation that only retrieves the ID of each returned resource has a cost of approximately 1 unit.

A write operation has a cost of approximately 50 units.

A video upload has a cost of approximately 1600 units.

If you hit the limits, Google will stop returning results until your quota is reset. You can apply for more than 50M requests per day, but you will have to pay for those extra requests.

Also, you can read about why Google has deferred support to StackOverflow on their YouTube blog here.

There are a number of active members on the YouTube Developer Relations team here including Jeff Posnick, Jarek Wilkiewicz, and Ibrahim Ulukaya who all have knowledge of YouTube internals...