Page Summary
-
YouTube deprecated the
syncparameter for thecaptions.insertandcaptions.updateAPI endpoints on March 13, 2024, but auto-syncing remains available in YouTube Creator Studio. -
A caption resource represents a YouTube caption track, which is associated with one specific YouTube video, and the API provides methods to list, insert, update, download, and delete these tracks.
-
The
captionsresource includes asnippetobject that contains details like the associatedvideoId, thelanguage, thetrackKind, and whether it's a draft, among others. -
The caption track's
snippet.isAutoSyncedboolean property indicates if YouTube synchronized the caption track to the audio, with afalsevalue indicating that YouTube used the time codes in the uploaded track. -
Caption track properties include status indicators such as
serving,syncing, orfailed, withfailureReasonproviding the specific reason for any failures, such asprocessingFailedorunsupportedFormat.
sync parameter for the
captions.insert and
captions.update API endpoints.
Captions auto-syncing is still available in YouTube Creator Studio. See the
API revision history for
more details.A caption resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video.
Methods
The API supports the following methods for captions resources:
- list
- Retrieve a list of caption tracks that are associated with a specified video. Note that the API response does not contain the actual captions and that the
captions.downloadmethod provides the ability to retrieve a caption track. Try it now. - insert
- Upload a caption track. Try it now.
- update
- Update a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both. Try it now.
- download
- Download a caption track. The caption track is returned to its original format unless the request specifies a value for the
tfmtparameter and to its original language unless the request specifies a value for thetlangparameter. Try it now. - delete
- Delete a specified caption track. Try it now.
Resource representation
The following JSON structure shows the format of a captions resource:
{
"kind": "youtube#caption",
"etag": etag,
"id": string,
"snippet": {
"videoId": string,
"lastUpdated": datetime,
"trackKind": string,
"language": string,
"name": string,
"audioTrackType": string,
"isCC": boolean,
"isLarge": boolean,
"isEasyReader": boolean,
"isDraft": boolean,
"isAutoSynced": boolean,
"status": string,
"failureReason": string
}
}Properties
The following table defines the properties that appear in this resource:
| Properties | |
|---|---|
kind |
stringIdentifies the API resource's type. The value will be youtube#caption. |
etag |
etagThe Etag of this resource. |
id |
stringThe ID that YouTube uses to uniquely identify the caption track. |
snippet |
objectThe snippet object contains basic details about the caption. |
snippet.videoId |
stringThe ID that YouTube uses to uniquely identify the video associated with the caption track. |
snippet.lastUpdated |
datetimeThe date and time when the caption track was last updated. The value is specified in ISO 8601 format. |
snippet.trackKind |
stringThe caption track's type. Valid values for this property are:
|
snippet.language |
stringThe language of the caption track. The property value is a BCP-47 language tag. |
snippet.name |
stringThe name of the caption track. The name is intended to be visible to the user as an option during playback. The maximum name length supported is 150 characters. |
snippet.audioTrackType |
stringThe type of audio track associated with the caption track. Valid values for this property are:
|