Captions

Returns a media's captions in the specified language. Supports multiple formats: JSON (default), SRT, VTT, and TXT. Use file extensions (.srt, .vtt, .txt) or Accept headers to specify format.

Requires api token with one of the following permissions

Read all folder and media data

Tokens with the "Act with a team member's permissions" permission (all:delegate_to_contact_permissions scope) can also be used. Requests made with such a token are authorized using the permissions of the contact assigned to the token.

An expiring access token created with the all:delegate_to_contact_permissions scope and an authorization granting the edit-transcripts permission on this media can also be used. For a token granted any other permission on the media the captions are not found.

get/medias/{mediaHashedId}/captions/{languageCode}

Request

  • Base URL
    https://api.wistia.com/modern
  • URL
    https://api.wistia.com/modern/medias/{mediaHashedId}/captions/{languageCode}
  • Auth
    HTTP bearer

Path parameters

mediaHashedIdstring required

The hashed ID of the media from which captions are to be retrieved.

languageCodestring required

The 3-character ISO 639-2 language code of the captions to be retrieved (e.g., eng, fra, spa). Some languages use extended IETF subtags (e.g., zh-Hant).

Query parameters

include'segments' | 'diarized_segments'

Set to segments to include time-coded caption cues.

Set to segments for time-coded caption cues or diarized_segments for speaker-turn segments in JSON responses.

include_speakersboolean

For TXT responses, set to true to group the transcript by speaker turns and include speaker labels. Ignored for other response formats.

Headers

X-Wistia-API-Versionstring required

Response

Successful response containing captions in the requested format

english_namestring

English name of the language.

native_namestring

Native name of the language.

languagestring required

A 3 character language code as specified by ISO-639–2.

textstring nullable

The text of the captions for the specified language in SRT format.

is_draftboolean required
idstring required

The unique hashed identifier of the time-coded transcript.

media_idstring required

The hashed ID of the media the captions belong to.

versioninteger nullable required

The active caption payload version, or null when no payload is active.

diarization_status'ready' | 'processing' | 'unavailable' | 'disabled'

Speaker-data availability when include=diarized_segments. Reading a derivable media with no speaker data starts generating it and reports processing; read again shortly for ready. disabled means the account has speaker identification turned off; an account owner or manager can turn it on in Account Settings.

diarization_derivableboolean

Whether speaker data can be generated from the active default transcript when include=diarized_segments. When false, the media stays unavailable.

speaker_data_versioninteger nullable

The concurrency version for speaker assignments when include=diarized_segments, or null when speaker data is unavailable.

cursorstring nullable

A cursor for stable pagination based on current sort_by order. You can pass this to cursor[before] or cursor[after] as a parameter to fetch the records before or after this record in the same sort order. This is only populated if records were fetched with cursor[enabled], or cursor[before] or cursor[after].

Changes