• Blog
  • Reviews
  • YouTube Data API (v3): limits, operations, resources, methods etc.

YouTube Data API (v3): limits, operations, resources, methods etc.

Share
Read our detailed review to find out the best practices of working with YouTube API. Let’s analyze all the limits applicable to API requests, as well as the supported operations and request methods.
*The detailed article is under the infographic.
how to work with YouTube Data API

Where is YouTube API applied?

In what fields is YouTube Data applied? First of all, we’re talking about the developers of website products and unique solutions. The other user groups are not so large: webmasters who use YouTube as the source of content for their sites, and researched who need to conduct a research with a large audience.

API key usage examples:

• Plugin

Add API Key to ensure a YouTube plugin’s stable performance.

• Your Product

Add the key to your product to get access to YouTube Data.

• Parsing

Use the key to parse YouTube data in a more efficient way.

See also: detailed guide on getting a YouTube API Key

YouTube API limits

These limits are the restrictions to requests, sent out with a YouTube API. When the quota on your personal YouTube API Key is exceeded, your actions will be suspended until you get a new quota.

You can find out the quota required for each action in the quota calculator.

Daily quota: 1 000 000 units.

Cost of operations:

  • Read operation – 1 unit;
  • Write operation – 50 units;
  • Video upload – 1600 units.

*Please, keep in mind that when you perform insert and update operations, they write data and so also return a resource. So the operation of inserting a playlist requires a quota of 50 units for the write operation, and the cost of the returned playlist resource.

What can you do with the 1 000 000 units a day limit:

– 200 000 read operations;

– 10 000 write operations and 90 000 read operations;

– 400 video uploads, 1500 write operations and 50 000 read operations;

*operations that each retrieve two resource parts

Actions available with YouTube API

YouTube allows to apply 4 different methods to each information source:

  • List (GET) – Returns a list of information’s that match the API request parameters.
  • Insert (POST) – Uploads an element to YouTube and optionally sets the video’s metadata.
  • Update (PUT) – Updates a video’s information.
  • Delete (DELETE) – Deletes a YouTube element.

This is how you can apply a method to a source:

ListInsertUpdateDelete
activity++
caption++++
channel+
channelBanner+
channelSection++++
comment++++
commentThread+++
guideCategory+
i18nLanguage+
i18nRegion+
playlist++++
playlistItem++++
search result+
subscription+
thumbnail
video++++
videoCategory+
watermark
Keep in mind that there are additional requirements for the videos uploaded via API.
Read more: YouTube requirements to uploaded videos.

Resource types

Below are the resource types and the information you can get from these resources.

activityLikes, marking videos as favorites, channel videos and other activities of a specific user.
channelChannel information.
channelBannerIdentifies the URL of a channel’s banner image.
channelSectionChannel’s latest uploads, most popular videos, playlists and other sets of videos from the channel.
guideCategoryChannel category, as defined by YouTube based on the content, popularity and other factos.
i18nLanguageIdentifies user interface language.
i18nRegionIdentifies the perferrable content geographical area.
playlistProvides one playlist (set of videos).
playlistItemIdentifies a specific video from the playlist and the way it is used in the playlist.
search resultVideo, playlist or channel that match the search criteria.
subscriptionUser subscription information.
thumbnailIdentifies the resource’s thumbnail image.
videoProvides one specific video.
videoCategoryIdentifies the uploaded videos category
watermarkVideo watermark during playback.

Optimizing work with YouTube API

  • Use ETags – a standard part of HTTP protocol that lets you cache the requests, thus making the API reply faster, and also prevents your apps from writing the changes from 3rd-party APIs.
  • Use GZIP – compression that reduces the cost of each API response, but does spend additional CPU resources for decompressing.