Skip to main content
GET
Get a YouTube video transcript

Request contract

  • Method and path: GET /apis/v1/social/accounts/{accountId}/youtube-captions
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/social/accounts/{accountId}/youtube-captions
  • accountId: path; required
  • videoId: query; required
  • language: query; optional
  • format: query; optional
  • refresh: query; optional
Complete OpenAPI definition Effective request declaration (including authentication and referenced schemas):

Cost and request rules

No additional charge for this operation.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

accountId
string
required

One of your social accounts (acc_...).

Pattern: ^acc_[0-9A-Za-z]{22}$

Query Parameters

videoId
string
required

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

language
string

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

format
enum<string>
default:json

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

Available options:
json,
srt
refresh
boolean
default:false

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

Response

The transcript.

accountId
string

One of your social accounts (acc_...).

Pattern: ^acc_[0-9A-Za-z]{22}$
availableTracks
object[]

Every track on the video, so you can re-request another language. On a cached read this is the listing as it stood when we downloaded, so a language added to the video since then appears only after a refresh=true or when you request that language directly.

cues
object[]

Timed cues. Present when format is json. Auto-generated cues overlap in time by design (captions roll), so start can precede the previous cue's end.

fetchedAt
string<date-time>

When the stored copy was downloaded from YouTube.

language
string

The language of the returned track.

source
enum<string>

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

Available options:
cache,
youtube
srt
string

Raw SubRip body. Present when format is srt.

text
string

The whole transcript as one paragraph, no timings.

trackId
string

YouTube's own caption track id.

trackKind
enum<string>

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

Available options:
asr,
standard
videoId
string