Returns a list of videos that match the API request parameters.
Authorization: Public video queries using id or chart work with an API key. OAuth 2.0 authorization is required for myRating, private videos, the brandPartner part, owner-only parts (fileDetails, processingDetails, and suggestions), and onBehalfOfContentOwner.
For method-specific error responses, see videos.list errors. For code examples, see videos.list code snippets.
HTTP request
GET https://youtube.googleapis.com/youtube/v3/videos
The URL uses gRPC Transcoding syntax.
Query parameters
| Parameters | |
|---|---|
id[] |
Specifies a comma-separated list of YouTube video IDs (up to 50 IDs per request). Specify exactly one of |
myRating |
Returns videos rated Requires OAuth 2.0 authorization. Setting this parameter to Valid values of this enum field are:
|
chart |
Identifies the chart that you want to retrieve. Specify exactly one of Set to This enum field has the one valid value:
|
videoCategoryId |
Identifies the video category for which the chart should be retrieved. Use only with |
regionCode |
Instructs the API to return a chart specific to the specified ISO 3166-1 alpha-2 country code. Use only with |
maxWidth |
Specifies the maximum width in pixels of the embedded player returned in the If both |
maxHeight |
Specifies the maximum height in pixels of the embedded player returned in the If both |
hl |
Specifies the localization language for metadata in |
maxResults |
Specifies the maximum number of items returned in the result set. Acceptable values are Supported with |
pageToken |
Identifies a specific page in the result set to return. In an API response, Supported with |
part[] |
Required. Specifies a comma-separated list of one or more Valid values are |
onBehalfOfContentOwner |
Indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter can only be used in a properly authorized request and is intended exclusively for YouTube content partners. It allows content owners that own and manage multiple YouTube channels to authenticate once and access their video and channel data without providing separate authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. |
Request body
The request body must be empty.
Response body
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"kind": string,
"etag": string,
"items": [
{
object ( |
| Fields | |
|---|---|
kind |
Identifies what kind of resource this is. Value: the fixed string |
etag |
Etag of this resource. |
items[] |
A list of videos that match the request criteria. |
nextPageToken |
The token that can be used as the value of |
prevPageToken |
The token that can be used as the value of |
pageInfo |
General pagination information. |
pageInfo.totalResults |
The total number of results in the result set. |
pageInfo.resultsPerPage |
The number of results included in the API response. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/youtubehttps://www.googleapis.com/auth/youtubepartnerhttps://www.googleapis.com/auth/youtube.readonlyhttps://www.googleapis.com/auth/youtube.force-ssl
For more information, see the OAuth 2.0 Overview.