---
title: "YouTube Transcript API"
method: GET
path: "/v1/youtube/transcript"
tags: ["YouTube"]
---

# YouTube Transcript API

`GET /v1/youtube/transcript`

## Request

- Base URL: `https://api.captapi.com`
- URL: `https://api.captapi.com/v1/youtube/transcript`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

YouTube's published captions with timestamps — not speech-to-text.

Returns the captions YouTube publishes for a video — manual or auto-generated. It does not perform speech-to-text. Long live streams and VODs frequently have no auto-captions at all. When there is no caption track this endpoint returns 404 and costs 0 credits (strictly better than charging for a null body); use /v1/youtube/audio-transcript to transcribe the audio directly (priced per minute). The 404 body includes code (no_captions / language_not_available / video_unavailable), reason, availableLanguages[], hasAutoCaptions, and — when the video is reachable with audio but has no tracks — a suggestion block with estimatedCredits for audio-transcript. video_unavailable (deleted, private, or otherwise unplayable) does not include that suggestion. Success responses use the same transcript vocabulary as audio-transcript / Rumble: text + segments[{text,startMs,endMs}], plus source: "captions", requestedLanguage, and returnedLanguage (no redundant language twin). Pass language to require that track; there is no silent fallback. Flat 1 credit on success.

Docs: https://captapi.com/apis/youtube-transcript

## Query parameters

- `url` string, required
- `language` string
- `cache` boolean

## Response `200`

Success. The data object for this endpoint.

- object
  - `success` unknown, required
  - `data` object, required
    - `url` string: Canonical URL of the item.
    - `videoId` string: YouTube video id parsed from the url.
    - `title` string: Title of the item.
    - `text` string: Full caption text — segment texts joined with a single space. Same key as /audio-transcript.
    - `segments` object[]
      - `text` string: Full caption text — segment texts joined with a single space. Same key as /audio-transcript.
      - `startMs` integer: Cue start in integer milliseconds.
      - `endMs` integer: Cue end in integer milliseconds (always > startMs).
    - `platform` string: Always "youtube" on this endpoint.
    - `requestedLanguage` unknown
    - `returnedLanguage` string: Language of the caption track actually returned.
    - `isAutoGenerated` boolean: Whether the selected YouTube caption track is auto-generated (ASR). Null when source is not captions.
    - `isTranslated` boolean: Whether the transcript was machine-translated to the requested language. Null when unknown.
    - `hasAutoCaptions` boolean: Has auto captions. Example: true.
    - `source` unknown

## Other responses

- `400`: Bad request: wrong platform URL, unknown endpoint, or an invalid parameter value. Not billed.
- `401`: Missing, invalid or revoked API key. Not billed.
- `402`: Not enough credits for this request. Not billed.
- `404`: The resource does not exist or is not public. Not billed.
- `422`: A required parameter is missing or has the wrong type. Not billed.
- `429`: Rate limit reached. Wait for Retry-After seconds. Not billed.
- `502`: The platform could not be reached or returned nothing usable. Retryable, not billed. 503 and 504 use the same envelope.

---

[API](https://skmtc.dev/captapi/apis/captapi-api.md) · [All operations](https://skmtc.dev/captapi/apis/captapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/captapi/apis/captapi-api/revisions/c9b9ac5ff1bd?raw)
