---
title: "Get video transcript"
method: GET
path: "/youtube/transcript"
tags: ["YouTube"]
---

# Get video transcript

`GET /youtube/transcript`

## Request

- Base URL: `https://scrappa.co/api`
- URL: `https://scrappa.co/api/youtube/transcript`
- Auth: API key in header `X-API-KEY`

HTTP 404 with error code `transcript_not_available` confirms that YouTube
loaded the video but has no captions; other 404 responses are ambiguous
upstream failures. HTTP 503 is a failed request, not an empty
transcript: a 503 with `upstream_status` is an upstream service
failure, while a 503 without it indicates network unavailability.
Check the HTTP status and Content-Type before parsing an error body;
gateways may return non-JSON errors. Failed requests do not consume
Scrappa credits.

## Query parameters

- `video_id` string
- `videoId` string
- `id` string
- `language` string, nullable
- `lang` string, nullable
- `hl` string, nullable
- `gl` string, nullable

## Response `200`

- object
  - `videoId` string, required
  - `language` string, nullable, required
  - `languageName` string, nullable, required
  - `sourceLanguage` string, nullable, required
  - `sourceLanguageName` string, nullable, required
  - `isAutoGenerated` boolean, required
  - `isTranslated` boolean, required
  - `availableLanguages` object[], required
    - `language` string, required
    - `name` string, required
    - `isAutoGenerated` boolean, required
    - `isTranslatable` boolean, required
  - `translationLanguages` object[], required
    - `language` string, required
    - `name` string, required
  - `transcript` object[], required
    - `text` string, required
    - `startMs` integer, required
    - `durationMs` integer, required
    - `endMs` integer, required
    - `startTime` integer, required
  - `text` string, required

## Other responses

- `401`: Unauthorized - API key is missing or invalid
- `422`: Validation error

---

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