Google Youtube Data Catalogue
https://developers.google.com/youtube/v3/getting-startedChange History
The change involved a toggle between hyperlinked and plain-text rendering of language selector links, which is consistent with the platform's recurring UI element pattern. This makes the change insignificant because it does not represent a real or substantive change to the page's content.
| Timestamp | Status | Significance | Links ± | |
|---|---|---|---|---|
|
16 Nov 2026, 18:02 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
14 Nov 2026, 18:02 (Berlin)
Content updated
|
Changed | significant | — | › |
|
12 Nov 2026, 18:02 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
10 Nov 2026, 18:02 (Berlin)
75 links added · 2 links removed
|
Changed | significant | +75 −2 | › |
|
8 Nov 2026, 18:02 (Berlin)
|
Unchanged | — | — | |
|
6 Nov 2026, 18:02 (Berlin)
|
Unchanged | — | — | |
|
4 Nov 2026, 18:03 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
2 Nov 2026, 18:02 (Berlin)
|
Unchanged | — | — | |
|
31 Oct 2026, 18:02 (Berlin)
|
Unchanged | — | — | |
|
29 Oct 2026, 18:03 (Berlin)
|
Unchanged | — | — | |
|
27 Oct 2026, 18:03 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
25 Oct 2026, 18:02 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
23 Oct 2026, 18:02 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
21 Oct 2026, 18:02 (Berlin)
62 links removed
|
Changed | insignificant | −62 | › |
|
19 Oct 2026, 18:02 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
17 Oct 2026, 18:02 (Berlin)
68 links added · 6 links removed
|
Changed | insignificant | +68 −6 | › |
|
15 Oct 2026, 18:02 (Berlin)
|
Unchanged | — | — | |
|
13 Oct 2026, 18:02 (Berlin)
|
Unchanged | — | — | |
|
11 Oct 2026, 18:03 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
9 Oct 2026, 18:02 (Berlin)
|
Unchanged | — | — | |
|
7 Oct 2026, 18:02 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
5 Oct 2026, 18:02 (Berlin)
|
Unchanged | — | — | |
|
3 Oct 2026, 18:02 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
1 Oct 2026, 18:02 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
29 Sep 2026, 18:02 (Berlin)
|
Unchanged | — | — | |
|
27 Sep 2026, 18:02 (Berlin)
|
Unchanged | — | — | |
|
25 Sep 2026, 18:02 (Berlin)
|
Unchanged | — | — | |
|
23 Sep 2026, 18:02 (Berlin)
62 links removed
|
Changed | insignificant | −62 | › |
|
21 Sep 2026, 09:42 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
16 Sep 2026, 22:32 (Berlin)
2 links added
|
Changed | insignificant | +2 | › |
|
14 Sep 2026, 22:28 (Berlin)
1 link added · 2 links removed
|
Changed | insignificant | +1 −2 | › |
|
12 Sep 2026, 22:22 (Berlin)
2 links added
|
Changed | insignificant | +2 | › |
|
10 Sep 2026, 22:15 (Berlin)
2 links removed
|
Changed | insignificant | −2 | › |
|
8 Sep 2026, 22:10 (Berlin)
|
Unchanged | — | — | |
|
6 Sep 2026, 22:05 (Berlin)
|
Unchanged | — | — | |
|
4 Sep 2026, 21:55 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
2 Sep 2026, 21:48 (Berlin)
6 links added · 8 links removed
|
Changed | insignificant | +6 −8 | › |
|
31 Aug 2026, 21:44 (Berlin)
1 link removed
|
Changed | insignificant | −1 | › |
|
29 Aug 2026, 21:40 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
27 Aug 2026, 21:34 (Berlin)
1 link added
|
Changed | significant | +1 | › |
|
25 Aug 2026, 21:30 (Berlin)
1 link added
|
Changed | insignificant | +1 | › |
|
23 Aug 2026, 21:25 (Berlin)
1 link removed
|
Changed | insignificant | −1 | › |
|
21 Aug 2026, 21:21 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
19 Aug 2026, 21:16 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
17 Aug 2026, 21:11 (Berlin)
|
Unchanged | — | — | |
|
15 Aug 2026, 21:06 (Berlin)
1 link added
|
Changed | insignificant | +1 | › |
|
14 Aug 2026, 12:33 (Berlin)
1 link removed
|
Changed | insignificant | −1 | › |
|
13 Aug 2026, 21:01 (Berlin)
|
Error | — | — | |
|
11 Aug 2026, 20:57 (Berlin)
|
Unchanged | — | — | |
|
9 Aug 2026, 20:52 (Berlin)
|
Unchanged | — | — | |
|
7 Aug 2026, 20:47 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
5 Aug 2026, 20:42 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
3 Aug 2026, 20:37 (Berlin)
|
Unchanged | — | — | |
|
1 Aug 2026, 20:34 (Berlin)
2 links added
|
Changed | insignificant | +2 | › |
|
30 Jul 2026, 20:30 (Berlin)
1 link removed
|
Changed | insignificant | −1 | › |
|
28 Jul 2026, 19:23 (Berlin)
1 link added
|
Changed | insignificant | +1 | › |
|
26 Jul 2026, 21:16 (Berlin)
|
Unchanged | — | — | |
|
24 Jul 2026, 21:13 (Berlin)
1 link removed
|
Changed | insignificant | −1 | › |
|
22 Jul 2026, 21:09 (Berlin)
1 link added
|
Changed | insignificant | +1 | › |
|
20 Jul 2026, 21:06 (Berlin)
|
Unchanged | — | — | |
|
18 Jul 2026, 21:03 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
16 Jul 2026, 20:59 (Berlin)
|
Unchanged | — | — | |
|
14 Jul 2026, 20:55 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
12 Jul 2026, 20:51 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
9 Jul 2026, 15:52 (Berlin)
|
Unchanged | — | — | |
|
7 Jul 2026, 15:48 (Berlin)
|
Unchanged | — | — | |
|
5 Jul 2026, 15:44 (Berlin)
1 link removed
|
Changed | insignificant | −1 | › |
|
3 Jul 2026, 15:41 (Berlin)
1 link added
|
Changed | insignificant | +1 | › |
|
1 Jul 2026, 15:36 (Berlin)
2 links removed
|
Changed | insignificant | −2 | › |
|
29 Jun 2026, 15:29 (Berlin)
2 links added
|
Changed | insignificant | +2 | › |
|
27 Jun 2026, 13:48 (Berlin)
1 link removed
|
Changed | insignificant | −1 | › |
|
24 Jun 2026, 21:50 (Berlin)
1 link added
|
Changed | insignificant | +1 | › |
|
18 Jun 2026, 09:00 (Berlin)
|
Unchanged | — | — | |
|
17 Jun 2026, 11:31 (Berlin)
1 link removed
|
Changed | insignificant | −1 | › |
|
15 Jun 2026, 13:09 (Berlin)
1 link added
|
Changed | insignificant | +1 | › |
|
11 Jun 2026, 13:56 (Berlin)
|
Unchanged | — | — | |
|
10 Jun 2026, 09:50 (Berlin)
2 links added · 1 link removed
|
Changed | insignificant | +2 −1 | › |
|
1 Jun 2026, 11:46 (Berlin)
1 link added
|
Changed | insignificant | +1 | › |
|
29 May 2026, 13:37 (Berlin)
1 link removed
|
Changed | insignificant | −1 | › |
|
28 May 2026, 17:02 (Berlin)
1 link added
|
Changed | insignificant | +1 | › |
|
27 May 2026, 11:12 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
26 May 2026, 11:03 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
22 May 2026, 18:14 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
21 May 2026, 11:40 (Berlin)
1 link added
|
Changed | insignificant | +1 | › |
|
20 May 2026, 11:19 (Berlin)
|
Unchanged | — | — | |
|
19 May 2026, 09:09 (Berlin)
|
Unchanged | — | — | |
|
17 May 2026, 09:10 (Berlin)
|
Unchanged | — | — | |
|
15 May 2026, 10:14 (Berlin)
1 link removed
|
Changed | insignificant | −1 | › |
|
14 May 2026, 19:41 (Berlin)
1 link added
|
Changed | insignificant | +1 | › |
|
12 May 2026, 11:23 (Berlin)
1 link added
|
Changed | insignificant | +1 | › |
|
5 May 2026, 16:06 (Berlin)
Content updated
|
Changed | insignificant | — | › |
|
4 May 2026, 14:47 (Berlin)
|
Unchanged | — | — | |
|
3 May 2026, 18:54 (Berlin)
|
Unchanged | — | — | |
|
2 May 2026, 20:36 (Berlin)
2 links removed
|
Changed | insignificant | −2 | › |
|
27 Apr 2026, 18:51 (Berlin)
2 links added
|
Changed | insignificant | +2 | › |
|
26 Apr 2026, 18:59 (Berlin)
|
Unchanged | — | — | |
|
23 Apr 2026, 12:21 (Berlin)
|
Unchanged | — | — | |
|
22 Apr 2026, 11:26 (Berlin)
52 links added
|
Changed ⓘ | insignificant | +52 | › |
| 24 Nov 2025, 12:14 (Berlin) | New ⓘ | insignificant | — | › |
Current Content
- Overview
- All APIs and services
-
Players and widgets
- IFrame Player API
- iOS Helper Library
- Player Parameters
- YouTube Subscribe Buttons
-
Data and reporting APIs
- YouTube Data API
- YouTube Analytics & Reporting APIs
- YouTube Live Streaming API
- YouTube Content ID API
-
Devices and integrations
- Cobalt
- Overview
-
Tools and samples
- Google APIs Explorer
- Google Cloud console
- Quota Calculator
- YouTube Player Demo
- Configure a Subscribe Button
- Code samples
-
Support and updates
- Issue Tracker
- File a bug
- YouTube Blog
-
Terms and policies
- YouTube API Services Terms of Service
- Developer Policies
- Complying with the YouTube Developer Policies
- Required Minimum Functionality
- Branding Guidelines
/
- English
- Deutsch
- Español
- Español – América Latina
- Français
- Indonesia
- Italiano
- Polski
- Português – Brasil
- Tiếng Việt
- Türkçe
- Русский
- עברית
- العربيّة
- فارسی
- हिंदी
- বাংলা
- ภาษาไทย
- 中文 – 简体
- 中文 – 繁體
- 日本語
-
한국어
YouTube Studio
Sign in
- Data API
- Guides
- Reference
- Samples
- APIs & services
- More
- Resources
- More
- Overview
- Client Libraries
- Implement authorization
- Quickstarts
- Android
- Apps Script
- Go
- iOS
- Java
- JavaScript
- Node.js
- PHP
- Python
- Ruby
- Guides and Tutorials
- Quota costs for API requests
- Quota and Compliance Audits
- Upload a Video
- Send Resumable Uploads
- Find MadeForKids video status
- Subscribe to Push Notifications
- Work with Channel IDs
- Sample Requests
- Implementation Guide
- Overview
- Activities
- Captions
- Channels
- Comments
- Pagination
- Partial responses
- Playlists
- Ratings
- Search requests
- Subscriptions
- Videos
- Tools
-
Overview
- All APIs and services
- Authentication
- Players and widgets
- IFrame Player API
- iOS Helper Library
- Player Parameters
- YouTube Subscribe Buttons
- YouTube Playables
- Data and reporting APIs
- YouTube Data API
- YouTube Analytics & Reporting APIs
- YouTube Live Streaming API
- YouTube Content ID API
- YouTube Video Third-Party Trainability API
- Devices and integrations
-
Overview
- All developer resources
- Tools and samples
- Google APIs Explorer
- Google Cloud console
- Quota Calculator
- YouTube Player Demo
- Configure a Subscribe Button
- Code samples
- Client libraries
- Support and updates
- Issue Tracker
- File a bug
- YouTube Blog
- YouTube Researcher Program
- Terms and policies
- YouTube API Services Terms of Service
- Developer Policies
- Complying with the YouTube Developer Policies
- Required Minimum Functionality
- Products
- YouTube
- Data API
- Guides
YouTube Data API Overview Stay organized with collections Save and categorize content based on your preferences.
Introduction
This document is intended for developers who want to write applications that
interact with YouTube. It explains basic concepts of YouTube and of the API
itself. It also provides an overview of the different functions that the API
supports.
Before you start
- You need a Google Account to access the Google Cloud console, request an API key, and register your application.
- Create a project in the Google Cloud console and obtain authorization credentials so your application can submit API requests.
-
After creating your project, make sure the YouTube Data API is one of the services that your application is registered to use:
-
Go to the Cloud console and select the project that you just registered.
- Visit the Enabled APIs page.
Make sure that the YouTube Data API is on the list of enabled APIs. If it
isn't, then open the API Library and enable the API. - If your application will use any API methods that require user authorization, read the authentication guide to learn how to implement OAuth 2.0 authorization.
- Select a client library to simplify your API implementation.
- Familiarize yourself with the core concepts of the JSON (JavaScript Object Notation) data format. JSON is a common, language-independent data format that provides a text representation of arbitrary data structures. For more information, see json.org.
Resources and resource types
A resource is an individual data entity with a unique identifier. The following
table describes the different types of resources that you can interact with
using the API.
| Resources | |
|---|---|
activity |
Contains information about an action that a particular user has taken on the YouTube site. User actions that are reported in activity feeds include rating a video, sharing a video, marking a video as a favorite, and posting a channel bulletin, among others. |
channel |
Contains information about a single YouTube channel. |
channelBanner |
Identifies the URL to use to set a newly uploaded image as the banner image for a channel. |
channelSection |
Contains information about a set of videos that a channel has chosen to feature. For example, a section could feature a channel's latest uploads, most popular uploads, or videos from one or more playlists. |
guideCategory |
Identifies a category that YouTube associates with channels based on their content or other indicators, such as popularity. Guide categories seek to organize channels in a way that makes it easier for YouTube users to find the content they're looking for. While channels could be associated with one or more guide categories, they are not guaranteed to be in any guide categories. |
i18nLanguage |
Identifies an application language that the YouTube website supports. The application language can also be referred to as a UI language. |
i18nRegion |
Identifies a geographic area that a YouTube user can select as the preferred content region. The content region can also be referred to as a content locale. |
playlist |
Represents a single YouTube playlist. A playlist is a collection of videos that can be viewed sequentially and shared with other users. |
playlistItem |
Identifies a resource, such as a video, that is part of a playlist. The playlistItem resource also contains details that explain how the included resource is used in the playlist. |
search result |
Contains information about a YouTube video, channel, or playlist that matches the search parameters specified in an API request. While a search result points to a uniquely identifiable resource, like a video, it does not have its own persistent data. |
subscription |
Contains information about a YouTube user subscription. A subscription notifies a user when new videos are added to a channel or when another user takes one of several actions on YouTube, such as uploading a video, rating a video, or commenting on a video. |
thumbnail |
Identifies thumbnail images associated with a resource. |
video |
Represents a single YouTube video. |
videoCategory |
Identifies a category that has been or could be associated with uploaded videos. |
watermark |
Identifies an image that displays during playbacks of a specified channel's videos. The channel owner can also specify a target channel to which the image links as well as timing details that determine when the watermark appears during video playbacks and the length of time it is visible. |
In many cases, a resource contains references to other resources. For example, a
playlistItem resource's snippet.resourceId.videoId property identifies a
video resource that, in turn, contains complete information about the video. As
another example, a search result contains either a videoId, playlistId, or
channelId property that identifies a particular video, playlist, or channel
resource.
Supported operations
The following table shows the most common methods that the API supports. Some
resources also support other methods that perform functions more specific to
those resources. For example, the videos.rate method associates a user rating
with a video, and the thumbnails.set method uploads a video thumbnail image to
YouTube and associates it with a video.
| Operations | |
|---|---|
list |
Retrieves (GET) a list of zero or more resources. |
insert |
Creates (POST) a new resource. |
update |
Modifies (PUT) an existing resource to reflect data in your request. |
delete |
Removes (DELETE) a specific resource. |
The API supports methods to list each of the supported resource types, and it
supports write operations for many resources as well.
The following table identifies the operations that are supported for different
types of resources. Operations that insert, update, or delete resources always
require user authorization. In some
cases, list methods support both authorized and unauthorized requests, where
unauthorized requests only retrieve public data while authorized requests can
also retrieve information about or private to the authenticated user.
| Supported Operations | ||||
|---|---|---|---|---|
| list | insert | update | delete | |
activity |
✓ | ✗ | ✗ | ✗ |
caption |
✓ | ✓ | ✓ | ✓ |
channel |
✓ | ✗ | ✗ | ✗ |
channelBanner |
✗ | ✓ | ✗ | ✗ |
channelSection |
✓ | ✓ | ✓ | ✓ |
comment |
✓ | ✓ | ✓ | ✓ |
commentThread |
✓ | ✓ | ✓ | ✗ |
guideCategory |
✗ | ✗ | ✗ | ✗ |
i18nLanguage |
✓ | ✗ | ✗ | ✗ |
i18nRegion |
✓ | ✗ | ✗ | ✗ |
playlist |
✓ | ✓ | ✓ | ✓ |
playlistItem |
✓ | ✓ | ✓ | ✓ |
search result |
✓ | ✗ | ✗ | ✗ |
subscription |
✓ | ✗ | ✗ | ✗ |
thumbnail |
✗ | ✗ | ✗ | ✗ |
video |
✓ | ✓ | ✓ | ✓ |
videoCategory |
✓ | ✗ | ✗ | ✗ |
watermark |
✗ | ✗ | ✗ | ✗ |
Quota usage
The YouTube Data API uses a quota to ensure that
developers use the service as intended and don't create applications that
unfairly reduce service quality or limit access for others. All API requests,
including invalid requests, incur at least a one-point quota cost. You can find
the quota available to your application in the
API Console.
Projects that enable the YouTube Data API have a default quota allocation of
100 search.list calls, 100 videos.insert calls, and 10,000 units per day combined for all other endpoints. Default quota, which is subject to change, helps us
optimize quota allocations and scale our infrastructure in a way that is more
meaningful to our API users. You can see your quota usage on the
Quotas page in the
API Console.
If you reach the quota limit, you can request additional quota by completing the
Quota extension request form
for YouTube API Services.
Calculate quota usage
Google calculates your quota usage by assigning a cost to each request.
Different types of operations have different quota costs. For example:
- A read operation that retrieves a list of resources -- channels, videos,
playlists -- usually costs 1 unit. - A write operation that creates, updates, or deletes a resource usually costs
50units. - A search query costs
1unit. - A video upload costs
1
unit.
The Quota costs for API requests table
shows the quota cost of each API method. With these rules in mind, you can
estimate the number of requests that your application could send per day without
exceeding your quota.
Partial resources
The API allows, and actually requires, the retrieval of partial resources so
that applications avoid transferring, parsing, and storing unneeded data. This
approach also ensures that the API uses network,
CPU, and memory resources more efficiently.
The API supports two request parameters, which are explained in the following
sections, that enable you to identify the resource properties that should be
included in API responses.
- The
partparameter identifies groups of properties that should be
returned for a resource. - The
fieldsparameter filters the API response to only return
specific properties within the requested resource parts.
How to use the part parameter
The part parameter is a required parameter for any API request that retrieves
or returns a resource. The parameter identifies one or more top-level
(non-nested) resource properties that should be included in an API response. For
example, a video resource
has the following parts:
snippetcontentDetailsfileDetailsplayerprocessingDetailsrecordingDetailsstatisticsstatussuggestionstopicDetails
All of these parts are objects that contain nested properties, and you can think
of these objects as groups of metadata fields that the API server might (or
might not) retrieve. As such, the part parameter requires you to select the
resource components that your application actually uses. This requirement serves
two key purposes:
- It reduces latency by preventing the API server from spending time retrieving
metadata fields that your application doesn't use. - It reduces bandwidth usage by reducing (or eliminating) the amount of
unnecessary data that your application might retrieve.
Over time, as resources add more parts, these benefits will only increase since
your application won't be requesting newly introduced properties that it
doesn't support.
How to use the fields parameter
The fields parameter filters the API response, which only contains the
resource parts identified in the part parameter value, so that the response
only includes a specific set of fields. The fields parameter lets you remove
nested properties from an API response and thereby further reduce your bandwidth
usage. (The part parameter cannot be used to filter nested properties from a
response.)
The following rules explain the supported syntax for the fields parameter
value, which is loosely based on XPath syntax:
- Use a comma-separated list (
fields=a,b) to select multiple fields. - Use an asterisk (
fields=*) as a wildcard to identify all fields. - Use parentheses (
fields=a(b,c)) to specify a group of nested properties that
will be included in the API response. - Use a forward slash (
fields=a/b) to identify a nested property.
In practice, these rules often allow several different fields parameter values
to retrieve the same API response. For example, if you want to retrieve the
playlist item ID, title, and position for every item in a playlist, you could
use any of the following values:
fields=items/id,playlistItems/snippet/title,playlistItems/snippet/positionfields=items(id,snippet/title,snippet/position)fields=items(id,snippet(title,position))
Note: As with all query parameter values, the fields parameter value must be
URL encoded. For better readability, the examples in this document omit the
encoding.
Sample partial requests
The following examples demonstrate how you can use the part and fields
parameters to ensure that API responses only include the data that your
application uses:
- Example 1 returns a video resource that includes four parts as well as
kindandetagproperties. - Example 2 returns a video resource that includes two parts as well as
kind
andetagproperties. - Example 3 returns a video resource that includes two parts but excludes
kindandetagproperties. - Example 4 returns a video resource that includes two parts but excludes
kindandetagas well as some nested properties in the resource's
snippetobject.
Example 1
URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&part=snippet,contentDetails,statistics,status
Description: This example retrieves a video resource and identifies several
resource parts that should be included in the API response.
API response:
{
"kind": "youtube#videoListResponse",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/sDAlsG9NGKfr6v5AlPZKSEZdtqA\"",
"videos": [
{
"id": "7lCDEYXw3mM",
"kind": "youtube#video",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/iYynQR8AtacsFUwWmrVaw4Smb_Q\"",
"snippet": {
"publishedAt": "2012-06-20T22:45:24.000Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg"
},
"medium": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg"
},
"high": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg"
}
},
"categoryId": "28"
},
"contentDetails": {
"duration": "PT15M51S",
"aspectRatio": "RATIO_16_9"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
},
"status": {
"uploadStatus": "STATUS_PROCESSED",
"privacyStatus": "PRIVACY_PUBLIC"
}
}
]
}
Example 2
URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&part=snippet,statistics
Description: This example modifies the part parameter value so that the
contentDetails and status properties are not included
in the response.
API response:
{
"kind": "youtube#videoListResponse",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/sDAlsG9NGKfr6v5AlPZKSEZdtqA\"",
"videos": [
{
"id": "7lCDEYXw3mM",
"kind": "youtube#video",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/iYynQR8AtacsFUwWmrVaw4Smb_Q\"",
"snippet": {
"publishedAt": "2012-06-20T22:45:24.000Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg"
},
"medium": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg"
},
"high": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg"
}
},
"categoryId": "28"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
}
}
]
}
Example 3
URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&part=snippet,statistics&fields=items(id,snippet,statistics)
Description: This example adds the fields parameter to remove all
kind and etag properties from the API response.
API response:
{
"videos": [
{
"id": "7lCDEYXw3mM",
"snippet": {
"publishedAt": "2012-06-20T22:45:24.000Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg"
},
"medium": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg"
},
"high": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg"
}
},
"categoryId": "28"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
}
}
]
}
Example 4
URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&fields=items(id,snippet(channelId,title,categoryId),statistics)&part=snippet,statistics
Description: This example modifies the fields parameter from example 3
so that in the API response, each video resource's snippet
object only includes the channelId, title,
and categoryId properties.
API response:
{
"videos": [
{
"id": "7lCDEYXw3mM",
"snippet": {
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"categoryId": "28"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
}
}
]
}
Optimize performance
You can use features like ETags and gzip compression to improve your
application's performance and reduce bandwidth usage.
Use ETags
ETags, a standard part of the
HTTP protocol, allow
applications to refer to a specific version of a particular API resource. The
resource could be an entire feed or an item in that feed. This functionality
supports the following use cases:
- Caching and conditional retrieval – Your application can cache API
resources and their ETags. Then, when your application requests a stored
resource again, it specifies the ETag associated with that resource. If the
resource has changed, the API returns the modified resource and the ETag
associated with that version of the resource. If the resource has not changed,
the API returns an HTTP 304 response (Not Modified), which indicates that
the resource has not changed. Your application can reduce latency and
bandwidth usage by serving cached resources in this manner.
The client libraries for Google APIs differ in their support of ETags. For
example, the JavaScript client library supports ETags using a whitelist for
allowed request headers that includes If-Match and If-None-Match. The
whitelist allows normal browser caching to occur so that if a resource's ETag
has not changed, the resource can be served from the browser cache. The Obj-C
client, on the other hand, does not support ETags.
- Protecting against inadvertent overwrites of changes – ETags help to
ensure that multiple API clients don't inadvertently overwrite each other's
changes. When updating or deleting a resource, your application can specify
the resource's ETag. If the ETag doesn't match the most recent version of that
resource, then the API request fails.
Using ETags in your application provides several benefits:
- The API responds more quickly to requests for cached but unchanged resources, yielding lower latency and lower bandwidth usage.
- Your application won't inadvertently overwrite changes to a resource that were made from another API client.
The Google APIs Client Library for
JavaScript supports If-Match
and If-None-Match HTTP request headers, thereby enabling ETags to work within
the context of normal browser caching.
Use gzip
You can also reduce the bandwidth needed for each API response by enabling gzip
compression. While your application will need additional CPU time to extract
API responses, the benefit of consuming fewer network resources usually
outweighs that cost.
To receive a gzip-encoded response you must do two things:
- Set the
Accept-EncodingHTTP request header togzip. - Modify your user agent to contain the string
gzip.
The following sample HTTP headers demonstrate these requirements for enabling
gzip compression:
Accept-Encoding: gzip
User-Agent: my program (gzip)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-11-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-11-12 UTC."],[],[]]
The latest news on the YouTube blog
- Issue Tracker
Something wrong? Send us a bug report!
- YouTube Researcher Program
For researchers interested in using data from YouTube's global API
-
Tools
- YouTube Player Demo
- Configure a Subscribe Button
-
Issue Tracker
- Request a feature
- See open issues
-
Product Info
- Developer Policies
- Required Minimum Functionality
- Chrome
- Firebase
- Google Cloud Platform
- Google AI
- Privacy
-
English
- Deutsch
- Español
- Español – América Latina
- Français
- Indonesia
- Italiano
- Polski
- Português – Brasil
- Tiếng Việt
- Türkçe
- Русский
- עברית
- العربيّة
- فارسی
- हिंदी
- বাংলা
- ภาษาไทย
- 中文 – 简体
- 中文 – 繁體
- 日本語
- 한국어