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
  • Runtime facts: 99acb5bddbedc8d3352e7c4fef86c3e6d8852c14772bcd18dbcf415237a642bd
Complete OpenAPI definition Effective request and pricing declaration (including authentication and referenced schemas):

Cost and request rules

A request reference price is not currently available; use a request quote where supported. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.

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