Connect

Get a YouTube video transcript

Returns the caption track YouTube already holds for one of the connected channel's own videos, as plain text plus timed cues. Use it instead of downloading and transcribing the video yourself.

Auto-generated (ASR) tracks are included: YouTube serves them to the channel owner, which is what the connected account is. Uploaded tracks win over auto-generated ones when both exist for a language.

Caching: we store the transcript on first read and serve it from there afterwards, so you do not need to cache it yourself. A cached read costs no YouTube quota and does not call YouTube at all. source tells you which happened (youtube on the first read, cache after). Pass refresh=true only when the captions actually changed on YouTube, since that re-downloads.

Notes:

  • Only videos owned by this connected channel. Anything else returns 404.
  • contentDetails.caption in YouTube's own API reads false on videos that DO have a serving auto-generated track, so it is not a usable availability signal. Call this endpoint and handle the 404.
  • YouTube generates auto-captions only for videos with recognisable speech, and can take a few hours after upload to publish them.
get/v1/accounts/{accountId}/youtube-captions

Path parameters

accountIdstring required

The connected YouTube account.

Query parameters

videoIdstring required

The YouTube video id (the platformPostId on a synced external post).

languagestring

BCP-47 language tag as YouTube labels the track. en also matches an en-GB track. Omit to take the best available track.

format'json' | 'srt'

json returns timed cues; srt returns the raw SubRip body instead. text is present either way.

refreshboolean

Re-download from YouTube instead of serving the stored copy. Spends 200 quota units.

Response

The transcript.

accountIdstring
videoIdstring
languagestring

The language of the returned track.

trackIdstring

YouTube's own caption track id.

trackKind'asr' | 'standard'

asr is YouTube's auto-generated track; standard was uploaded by the channel.

source'cache' | 'youtube'

cache when served from our stored copy, youtube when this call spent the quota units.

fetchedAtstring date-time

When the stored copy was downloaded from YouTube.

textstring

The whole transcript as one paragraph, no timings.

srtstring

Raw SubRip body. Present when format is srt.

Changes