captions

GET /youtube/v3/captions

Changed on

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.

Request

  • Base URL
    https://youtube.googleapis.com
  • Auth
    • OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/youtube.force-ssl
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/youtube.force-ssl
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/youtubepartner
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/youtubepartner

Query parameters

$.xgafv, '1' | '2'

V1 error format.

access_token, string

OAuth access token.

alt, 'json' | 'media' | 'proto'

Data format for response.

callback, string

JSONP

fields, string

Selector specifying which fields to include in a partial response.

key, string

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_token, string

OAuth 2.0 token for the current user.

prettyPrint, boolean

Returns response with indentations and line breaks.

quotaUser, string

Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

uploadType, string

Legacy upload protocol for media (e.g. "media", "multipart").

upload_protocol, string

Upload protocol for media (e.g. "raw", "multipart").

part, string[] required

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

videoId, string required

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

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.

onBehalfOf, string

ID of the Google+ Page for the channel that the request is on behalf of.

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.

Response

Successful response

CaptionListResponse required
etag, string

Etag of this resource.

eventId, string

Serialized EventId of the request which produced this response.

items, Caption[]

A list of captions that match the request criteria.

kind, string

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

visitorId, string

The visitorId identifies the visitor.

Changes

    • info

      the security scope https://www.googleapis.com/auth/youtube.force-ssl was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/youtube.force-ssl was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/youtubepartner was removed from the endpoint's security scheme Oauth2

    1 more change in this revision