Extract transcript
extractTranscript(params, options?): TranscriptResponse
This is the primary transcript endpoint. Submit a JSON body with the video id and optional format, language, and track policy. GET /v1/transcripts runs the same extractor with query parameters.
Successful requests consume 1 credit. Missing captions return 404 and are not billed.
Security
API Key
All requests require a valid API key from the developer dashboard.
Headers: Authorization: Bearer YOUR_API_KEYorX-API-Key: YOUR_API_KEY
See Authentication for headers and rate limits.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
video_idbody | string | Yes | 11-character YouTube video ID or a full video URL. |
formatbody | string | No | Output format: |
word_levelbody | boolean | No | Include millisecond word offsets. Only auto-generated (ASR) captions carry word timing; creator captions never do. With the default |
languagesbody | string[] | No | Prioritized ISO language codes, for example |
track_policybody | string | No | Track selection: |
Response (HTTP 200)
When format=word_timestamps, segments, sentences, or json3 (application/json):
{
"video_id": string, // Echoed YouTube video ID
"language": string, // Negotiated ISO language code (e.g. "en")
"track_kind": string, // "asr" (auto-generated) or "manual" (creator-uploaded)
"duration_seconds": number, // Total duration of caption track in seconds
"has_word_level": boolean, // Whether genuine word-level timing precision is present
"segments": [ // Array of caption segments
{
"text": string, // Segment transcript text
"start": number, // Start offset in seconds
"end": number, // End offset in seconds
"duration": number, // Segment duration in seconds
"words": [ // Word-level timestamps (populated when word_level=true)
{
"word": string, // Individual word
"start": number, // Word start offset
"end": number // Word end offset
}
]
}
]
}When format=markdown, text, srt, or vtt:
Returns the raw document directly with matching Content-Type (e.g. text/markdown, text/plain, text/vtt) without JSON wrapper overhead.