Method: captions.list

Returns a list of caption tracks that are associated with a specified video. The API response doesn't contain the actual captions; call captions.download to retrieve a caption track.

Unauthenticated requests (using an API key) can list servable, non-draft tracks on public videos. Retrieving tracks for private or unlisted videos, or viewing draft or non-servable tracks, requires OAuth 2.0 authorization by a user with access to the video's captions (such as the video owner). Callers without that access receive 404 videoNotFound for private or unlisted videos, and draft or non-servable tracks are omitted for public videos. For method-specific error responses, see captions.list errors. For code examples, see captions.list code snippets.

HTTP request

GET https://youtube.googleapis.com/youtube/v3/captions

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
id[]

string

Specifies one or more IDs identifying the caption resources to retrieve. Each ID must identify a caption track associated with the specified videoId.

videoId

string

Required. Specifies the YouTube video ID of the video for which the API returns caption tracks.

part[]

string

Required. Specifies a comma-separated list of one or more caption resource parts that the API response includes. Valid values are id and snippet.

onBehalfOfContentOwner

string

Intended exclusively for YouTube content partners and valid only in an authorized request. Indicates that the request's authorization credentials identify a YouTube CMS user acting on behalf of the specified content owner, allowing partners that manage multiple channels to authenticate once and access data for linked channels.

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 (Caption)
    }
  ]
}
Fields
kind

string

Identifies what kind of resource this is. Value: the fixed string "youtube#captionListResponse".

etag

string

Etag of this resource.

items[]

object (Caption)

A list of captions that match the request criteria.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/youtubepartner
  • https://www.googleapis.com/auth/youtube.force-ssl

For more information, see the OAuth 2.0 Overview.