List
|
|||||
|
|
Returns 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.download method provides the ability to retrieve a caption track
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- See, edit, and permanently delete your YouTube videos, ratings, comments and captions
- View and manage your assets and associated content on YouTube
Input
This building block consumes 5 input parameters
Name | Format | Description |
---|---|---|
part Required |
STRING |
The part parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet |
videoId Required |
STRING |
The videoId parameter specifies the YouTube video ID of the video for which the API should return caption tracks |
id |
STRING |
The id parameter specifies a comma-separated list of IDs that identify the caption resources that should be retrieved. Each ID must identify a caption track associated with the specified video |
onBehalfOf |
STRING |
ID of the Google+ Page for the channel that the request is on behalf of |
onBehalfOfContentOwner |
STRING |
Note: This parameter is intended exclusively for YouTube content partners. The onBehalfOfContentOwner parameter 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 is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner |
= Parameter name
= Format
part STRING Required The part parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet |
videoId STRING Required The videoId parameter specifies the YouTube video ID of the video for which the API should return caption tracks |
id STRING The id parameter specifies a comma-separated list of IDs that identify the caption resources that should be retrieved. Each ID must identify a caption track associated with the specified video |
onBehalfOf STRING ID of the Google+ Page for the channel that the request is on behalf of |
onBehalfOfContentOwner STRING Note: This parameter is intended exclusively for YouTube content partners. The onBehalfOfContentOwner parameter 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 is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner |
Output
This building block provides 22 output parameters
Name | Format | Description |
---|---|---|
etag |
STRING |
Etag of this resource |
eventId |
STRING |
Serialized EventId of the request which produced this response |
items[] |
OBJECT |
A caption resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video |
items[].etag |
STRING |
Etag of this resource |
items[].id |
STRING |
The ID that YouTube uses to uniquely identify the caption track |
items[].kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "youtube#caption" |
items[].snippet |
OBJECT |
Basic details about a caption track, such as its language and name |
items[].snippet.audioTrackType |
ENUMERATION |
The type of audio track associated with the caption track |
items[].snippet.failureReason |
ENUMERATION |
The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed |
items[].snippet.isAutoSynced |
BOOLEAN |
Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions |
items[].snippet.isCC |
BOOLEAN |
Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false |
items[].snippet.isDraft |
BOOLEAN |
Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false |
items[].snippet.isEasyReader |
BOOLEAN |
Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false |
items[].snippet.isLarge |
BOOLEAN |
Indicates whether the caption track uses large text for the vision-impaired. The default value is false |
items[].snippet.language |
STRING |
The language of the caption track. The property value is a BCP-47 language tag |
items[].snippet.lastUpdated |
DATE_TIME |
The date and time when the caption track was last updated. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format |
items[].snippet.name |
STRING |
The name of the caption track. The name is intended to be visible to the user as an option during playback |
items[].snippet.status |
ENUMERATION |
The caption track's status |
items[].snippet.trackKind |
ENUMERATION |
The caption track's type |
items[].snippet.videoId |
STRING |
The ID that YouTube uses to uniquely identify the video associated with the caption track |
kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "youtube#captionListResponse" |
visitorId |
STRING |
The visitorId identifies the visitor |
= Parameter name
= Format
etag STRING Etag of this resource |
eventId STRING Serialized EventId of the request which produced this response |
items[] OBJECT A caption resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video |
items[].etag STRING Etag of this resource |
items[].id STRING The ID that YouTube uses to uniquely identify the caption track |
items[].kind STRING Identifies what kind of resource this is. Value: the fixed string "youtube#caption" |
items[].snippet OBJECT Basic details about a caption track, such as its language and name |
items[].snippet.audioTrackType ENUMERATION The type of audio track associated with the caption track |
items[].snippet.failureReason ENUMERATION The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed |
items[].snippet.isAutoSynced BOOLEAN Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions |
items[].snippet.isCC BOOLEAN Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false |
items[].snippet.isDraft BOOLEAN Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false |
items[].snippet.isEasyReader BOOLEAN Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false |
items[].snippet.isLarge BOOLEAN Indicates whether the caption track uses large text for the vision-impaired. The default value is false |
items[].snippet.language STRING The language of the caption track. The property value is a BCP-47 language tag |
items[].snippet.lastUpdated DATE_TIME The date and time when the caption track was last updated. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format |
items[].snippet.name STRING The name of the caption track. The name is intended to be visible to the user as an option during playback |
items[].snippet.status ENUMERATION The caption track's status |
items[].snippet.trackKind ENUMERATION The caption track's type |
items[].snippet.videoId STRING The ID that YouTube uses to uniquely identify the video associated with the caption track |
kind STRING Identifies what kind of resource this is. Value: the fixed string "youtube#captionListResponse" |
visitorId STRING The visitorId identifies the visitor |