Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I calculate my YouTube API usage?

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.

like image 891
Gordo Avatar asked Mar 22 '13 10:03

Gordo


People also ask

How do I find my YouTube API quota?

You can see your quota usage on the Quotas page in the API Console. If you would like to request additional quota beyond the default allocation, you must first complete an audit to show that your project is in compliance with the YouTube API Services Terms of Service.

How much does it cost to use YouTube API?

The YouTube Data API, is a free API google does not charge you for accessing this api. You are free to use it.

What data can I get from YouTube API?

The API provides the ability to retrieve feeds related to videos, users, and playlists. It also provides the ability to manipulate these feeds, such as creating new playlists, adding videos as favorites, and sending messsages. The API is also able to upload videos.


2 Answers

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.

like image 67
Matt Koskela Avatar answered Sep 19 '22 11:09

Matt Koskela


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

like image 30
Tushar Patel Avatar answered Sep 20 '22 11:09

Tushar Patel