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:
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.
Use the key to parse YouTube data in a more efficient way.
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:
Keep in mind that there are additional requirements for the videos uploaded via API.
Read more: YouTube requirements to uploaded videos.
Below are the resource types and the information you can get from these resources.
|activity||Likes, marking videos as favorites, channel videos and other activities of a specific user.|
|channelBanner||Identifies the URL of a channel’s banner image.|
|channelSection||Channel’s latest uploads, most popular videos, playlists and other sets of videos from the channel.|
|guideCategory||Channel category, as defined by YouTube based on the content, popularity and other factos.|
|i18nLanguage||Identifies user interface language.|
|i18nRegion||Identifies the perferrable content geographical area.|
|playlist||Provides one playlist (set of videos).|
|playlistItem||Identifies a specific video from the playlist and the way it is used in the playlist.|
|search result||Video, playlist or channel that match the search criteria.|
|subscription||User subscription information.|
|thumbnail||Identifies the resource’s thumbnail image.|
|video||Provides one specific video.|
|videoCategory||Identifies the uploaded videos category|
|watermark||Video 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.