---
title: "Get a YouTube video transcript"
method: POST
path: "/content/youtube-transcript"
tags: ["Plugins"]
---

# Get a YouTube video transcript

`POST /content/youtube-transcript`

## Request

- Base URL: `https://api.scrapeunblocker.com`
- URL: `https://api.scrapeunblocker.com/content/youtube-transcript`
- Auth: API key in header `x-scrapeunblocker-key`

Returns a YouTube video's captions as JSON: timestamped `segments` (`start`, `dur`, `text`) and a joined `text`, plus `availableLanguages`, the picked `language`, `isAutoGenerated`, and the video's `title`, `author` and `lengthSeconds`. Pass a video id or any YouTube video URL; choose a caption language with `lang`. Ideal for LLM/RAG pipelines, subtitles and content analysis.

## Query parameters

- `video` string, required: Video id (dQw4w9WgXcQ) or any YouTube video URL.
- `lang` string, nullable: Preferred caption language code, e.g. 'en'. Omit for the default/first track. A prefix like 'en' matches 'en-US'.
- `format` string: Output shape: segments, text. 'segments' returns timestamps; 'text' returns only the joined plaintext.
- `proxy_country` string, nullable: Proxy country the request is sent from (ISO-2, e.g. 'US', 'DE') for the watch page. Defaults to US.

## Response `200`

JSON with `segments`, `text` and video metadata.

- unknown

## Other responses

- `400`: Invalid parameters.
- `404`: This video has no captions.
- `422`: Validation Error
- `502`: Blocked by YouTube, captions could not be fetched, or the call did not finish in time.

---

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