64

I'm building a pretty large app for a client that is going to aggregate feeds from various sources. My client estimates around 900 follow-able users will be in this system to start out, with more being added over time. He wants to update the feed data every 15 minutes, so we would need to update one user feed per second, assuming 900 feeds and a 15 minute TTL. As the requests take a few seconds to complete, we would then need to load balance across a few threads to tackle the queue asynchronously.

Should I be worried about quota errors or hitting any kind of limitations? If so, what are our options?

I've already read their help pages and documentation, but it's very vague; I need concrete numbers. It's not feasible to load test their API to figure out the limitation.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Gordo
  • 778
  • 1
  • 6
  • 10

3 Answers3

118

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 10,000 units per day. Projects that had enabled the YouTube Data API before April 20, 2016, have a default quota of 50,000,000 per day.

You can read about what a unit is here: https://developers.google.com/youtube/v3/getting-started#quota

  • 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 1,000,000 requests per day, but you will have to pay for those extra requests.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Matt Koskela
  • 5,269
  • 3
  • 26
  • 29
  • Are these the anonymous limits, and where can I find concrete quota numbers for requests with a valid OAuth token? – Brandon May 14 '13 at 22:09
  • 5
    According to their documentation here: https://developers.google.com/youtube/v3/getting-started, 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. – Matt Koskela Dec 10 '13 at 17:54
  • This doesn't answer what are the options, if you do hit the limitation... Does it mean there are none?! :( – cregox Nov 13 '14 at 18:48
  • 4
    @Cawas 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. – Matt Koskela Nov 13 '14 at 22:22
  • @MattKoskela Can I use multiple api key in same app to get more quota? – Vikash Kumar Verma Jun 09 '17 at 05:51
  • @VikashKumarVerma I'm sure that's against their TOS, but either way it would defeat the entire purpose of having quota's in the first place. I would suggest requesting an increase in quota. – Matt Koskela Jun 09 '17 at 17:13
  • Hi @MattKoskela How can i apply for pay for those extra requests ? Not found any related documentation – Rajesh Smartwebtech Jul 21 '21 at 08:38
  • 1
    @RajeshSmartwebtech you can see that documentation here: https://developers.google.com/youtube/v3/guides/quota_and_compliance_audits – Matt Koskela Jul 21 '21 at 17:54
24

There is a calculator provided by YouTube to check your usage. It is a good tool to estimate your usage.

https://developers.google.com/youtube/v3/determine_quota_cost

screenshot of calculator page on the Google Developers site

TylerH
  • 20,799
  • 66
  • 75
  • 101
Tushar Patel
  • 573
  • 3
  • 17
3

If you need to make more requests than allotted, you can request a higher quota here: https://support.google.com/youtube/contact/yt_api_form

TylerH
  • 20,799
  • 66
  • 75
  • 101
Marco
  • 3,470
  • 4
  • 23
  • 35