# YouTube Transcript Scraper: Captions & Subtitles to Text (`siteacs/youtube-transcript-scraper`) Actor

YouTube transcript API: get the transcript of any YouTube video, Short, channel or playlist, as plain text plus timestamped segments, in the language you pick or the video's own. Reads YouTube's own captions (manual or auto-generated). Pay only for transcripts returned.

- **URL**: https://apify.com/siteacs/youtube-transcript-scraper.md
- **Developed by:** [SiteAcs](https://apify.com/siteacs) (community)
- **Categories:** Videos, AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 transcripts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## YouTube Transcript Scraper: Captions & Subtitles to Text

**YouTube transcript API and scraper.** Input: YouTube video, Shorts, channel or playlist URLs and a caption language.
Output: one row per video with the full transcript in `text` and the timestamped lines in `segments`
(`start`, `duration`, `text`). It reads the captions YouTube already has, uploaded by the creator or auto-generated.
No AI transcription, no audio download.

```json
{"urls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"], "language": "en"}
```

Output (3 of the fields): `{"status": "ok", "language": "en", "text": "All right, so here we are, in front of the elephants..."}`

**Price: $1.00 per 1,000 transcripts**, nothing else. Videos without captions, private, removed or members-only
videos, and anything that fails are listed in the output for free. No start fee.

Use it to feed video content to an LLM or a RAG index, to search what a channel has said, to quote a talk with its
timestamp, to make subtitles or notes, or to study a topic across hundreds of videos. Results come as JSON, CSV or
Excel, or through the Apify API from your code.

Related actors by the same author: [YouTube Video Details](https://apify.com/siteacs/youtube-video-details) (views,
likes, description and tags of a video), [YouTube Search Scraper](https://apify.com/siteacs/youtube-search-scraper)
(find the videos to transcribe), a YouTube Channel Scraper (coming), and
[TikTok Transcript Scraper](https://apify.com/siteacs/tiktok-transcript-scraper) for TikTok videos.

- **Em português:** extrai a transcrição (legendas) de vídeos, Shorts, canais e playlists do YouTube, em texto
  corrido e com marcação de tempo, no idioma escolhido.
- **En español:** extrae la transcripción (subtítulos) de vídeos, Shorts, canales y listas de YouTube, en texto plano
  y con marcas de tiempo, en el idioma que elijas.
- **Auf Deutsch:** lädt das Transkript (Untertitel) von YouTube-Videos, Shorts, Kanälen und Playlists als Text und
  mit Zeitstempeln, in der gewünschten Sprache.

### What you get

One dataset row per video:

| Field | What it holds |
|---|---|
| `input`, `videoId`, `url` | The line you gave (a video, channel or playlist URL), the video id and its watch URL |
| `status`, `reason` | `ok` when the transcript is in the row; otherwise why not (see the table below) |
| `title`, `channelName`, `channelId`, `durationSeconds` | The video's title, channel and length |
| `originalLanguage` | The spoken language of the video's original audio, e.g. `pt-BR` |
| `language`, `languageName` | Language of the transcript returned, e.g. `en` / `English`, `pt-BR` / `Portuguese (Brazil)` |
| `isGenerated` | `true` for YouTube's auto-generated (speech recognition) captions, `false` for captions uploaded by the creator |
| `isTranslated` | `true` when the transcript is YouTube's own machine translation (see **Translate**) or the captions of one of YouTube's AI-dubbed audio tracks (see below) |
| `languageFallback` | `true` when your language was missing and the transcript is in the video's original language instead |
| `translationRefused` | `true` when you asked for a translation, YouTube refused it, and the row holds the original-language text (charged like any fallback) |
| `requestedLanguage` | The language you asked for |
| `availableLanguages` | Every caption track the video has: language, name, auto-generated or not, and whether it belongs to a dubbed audio track |
| `translationAvailable` | Whether YouTube offers translations of this video's captions |
| `segmentCount` | Number of caption lines |
| `text` | The whole transcript as plain text |
| `segments` | One item per caption line: `start` and `duration` in seconds, and `text` (turn off **Timestamped segments** for text only) |
| `scrapedAt` | When the row was made (UTC) |

Example row (from a test run, segments shortened):

```json
{
  "input": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "status": "ok",
  "reason": null,
  "title": "Me at the zoo",
  "channelName": "jawed",
  "channelId": "UC4QobU6STFB0P71PMvOGN5A",
  "durationSeconds": 19,
  "originalLanguage": null,
  "language": "en",
  "languageName": "English",
  "isGenerated": false,
  "isTranslated": false,
  "languageFallback": false,
  "translationRefused": false,
  "requestedLanguage": "en",
  "availableLanguages": [
    {"language": "en", "name": "English", "isGenerated": false, "isDubbed": false},
    {"language": "de", "name": "German", "isGenerated": false, "isDubbed": false}
  ],
  "translationAvailable": false,
  "segmentCount": 6,
  "text": "All right, so here we are, in front of the elephants the cool thing about these guys is that they have really... really really long trunks and that's cool (baaaaaaaaaaahhh!!) and that's pretty much all there is to say",
  "segments": [
    {"start": 1.2, "duration": 2.16, "text": "All right, so here we are, in front of the elephants"},
    {"start": 5.318, "duration": 2.656, "text": "the cool thing about these guys is that they have really..."}
  ],
  "scrapedAt": "2026-11-11T21:50:12+00:00"
}
```

Download the results as JSON, CSV, Excel or HTML, or read them through the Apify API. The **Transcripts** view shows
the text; **Details and languages** shows every caption track and the reason for rows without a transcript.

#### Status

| `status` | Charged | What it means |
|---|---|---|
| `ok` | yes | The transcript is in the row |
| `no_captions` | no | The video has no captions at all: none uploaded and none auto-generated (common for music, gameplay and very short Shorts) |
| `language_not_found` | no | No captions in your language and **Fall back to the video's own language** is off, or no captions in the original language when that is what you asked for |
| `translation_refused` | no | You turned on **Translate**, YouTube refused the translation and the fallback is off, so the row has no text |
| `live` | no | A live stream in progress: YouTube makes its captions after the stream ends |
| `unavailable`, `private`, `members_only`, `age_restricted`, `not_started` | no | Removed or private video, members-only, needs a signed-in adult, or a live stream or premiere that has not started |
| `not_found` | no | A channel or playlist that does not exist or has no public videos |
| `blocked`, `timeout`, `error` | no | YouTube refused or did not answer after every retry, or the run's residential proxy budget is used up |
| `invalid_input` | no | Not a YouTube URL or video id |

### How to use it

1. Paste URLs into **Videos, Shorts, channels or playlists**, one per line (use **Bulk edit** for long lists). Any
   of these works: `youtube.com/watch?v=...`, `youtu.be/...`, `youtube.com/shorts/...`, `youtube.com/live/...`, a
   bare 11-character video id, `youtube.com/@channel`, `youtube.com/channel/UC...`, `youtube.com/playlist?list=...`.
2. Set **Language** (default `en`), or leave it empty for each video's own language.
3. Click **Start**. In testing, 210 videos took about 40 seconds at the default 256 MB.

Input example:

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://www.youtube.com/@TED",
    "https://www.youtube.com/playlist?list=PL8dPuuaLjXtNlUrzyH5r6jN9ulIgZBpdo"
  ],
  "language": "en",
  "maxVideosPerChannel": 20
}
```

### Options

- **Language** (default `en`): a caption language code such as `en`, `es`, `pt`, `pt-BR`, `de`, `fr`, `ja`, `hi`,
  `ar`. Several codes separated by commas are tried in order (`pt-BR, pt, en`). `pt` also matches `pt-BR` and `pt-PT`.
  Leave it empty to get each video in its own language.
- **Fall back to the video's own language** (default on): when a video has no captions in your language, you get the
  transcript in its original spoken language, with `languageFallback: true` and a note in `reason`. Off: those videos
  are saved free as `language_not_found`.
- **Translate when the language is missing** (default off): when your language is missing, ask YouTube for its own
  machine translation of the captions (the player's "Auto-translate"). YouTube refuses many translation requests.
  Then, with the fallback on, you get the original-language transcript, charged like any fallback, with
  `languageFallback` and `translationRefused` set to `true`; with the fallback off, the row is free
  (`translation_refused`) and has no text.
- **Timestamped segments** (default on): off gives plain text only, a smaller dataset.
- **Prefer auto-generated captions** (default off): by default, captions uploaded by the creator win over YouTube's
  auto-generated ones in the same language. Auto-generated captions follow the speech word for word.
- **Max videos per channel or playlist** (default 50): channels are read newest first, including Shorts and past live
  streams; playlists in their own order.
- **Proxy** (default: Apify datacenter proxy) and **Retry refused videos through residential proxy** (default on): see
  below. You are not charged more when a video needs the residential retry.

### Dubbed videos

Some videos carry YouTube's AI-dubbed audio in other languages, and YouTube makes auto-generated captions for each
dub. The actor reads which audio track is the original: with **Language** empty, or as the fallback, you get the
captions of the original audio. When you ask for a language that only a dub has, you get the dub's captions with
`isTranslated: true` and a note in `reason`, because they are a machine translation of the original speech. A dubbed
video whose original audio has no captions at all comes back `language_not_found` (free) when you ask for its own
language.

### How it works

For each video the actor makes one request to YouTube's player as the YouTube Android app, which lists the caption
tracks, and one request for the chosen track's caption file. This is how open-source tools such as yt-dlp and
youtube-transcript-api read captions today; YouTube's website now needs a proof token for its caption links, the
apps do not. Channels and playlists are listed through YouTube's own browse pages, 100 videos per request.

From cloud servers YouTube sometimes answers "Sign in to confirm you're not a bot". The actor then tries the video
from another datacenter IP, up to six times, and then through residential proxy. In a test on 210 mixed videos
(12 languages, Shorts, music, videos over an hour, videos without captions) with the default input, 209 statuses
were right (the other video had gained captions since the list was made) and every transcript was in English or
flagged: 111 English, 57 in the original language with `languageFallback`, 23 from an English dub with
`isTranslated`.

### Pricing

**$1.00 per 1,000 transcripts** ($0.001 per video with a transcript), no start fee. Every other row is free. Set
**Maximum cost per run** in the run options and the run stops before going over it.

### Limits

- Only captions YouTube already has. A video with no captions (`no_captions`) is not transcribed from its audio.
- Auto-generated captions have no punctuation in some languages and can mishear names; `isGenerated` tells you which
  kind you got.
- Age-restricted and members-only videos need a signed-in account, which this actor does not use.
- A live stream in progress has no caption file yet; run it again after the stream ends.
- YouTube's translations are refused more often than plain captions (see **Translate**).
- Residential proxy, whether you choose it or it is the retry, runs within a traffic budget per run (5 MB plus 50 KB
  per transcript). Past the budget, videos that need it come back `blocked` (free); run them again later. Captions of
  videos over 3 hours, or of unknown length, are never downloaded through residential proxy: with residential as
  your only proxy they come back `error` (free); the default datacenter proxy reads them.
- No comments, no viewer data: only the video's captions and its public title, channel and length.

### FAQ

**Does it work for YouTube Shorts?** Yes, paste the `youtube.com/shorts/...` URL. Many Shorts have auto-generated
captions; short music clips often have none.

**Can I get the transcript of a whole channel?** Yes: paste the channel URL (`youtube.com/@name`) and set **Max
videos per channel or playlist**. Each video becomes one row.

**How do I get SRT or VTT subtitles?** Each item in `segments` has `start`, `duration` and `text`, which is all an
SRT or VTT file needs: export the dataset as JSON and convert it, or use the text for anything else.

**Is there a YouTube transcript API?** This actor is one: start it through the Apify API with a list of URLs and
read the dataset as JSON. Each run's dataset is also available as CSV or Excel.

**Can it convert a video to text?** Yes, when YouTube has captions for it: the `text` field is the video's speech
as plain text.

**Can I use it for an LLM or a RAG index?** Yes. Set **Timestamped segments** off for a smaller dataset with `text`
only, or keep `segments` to cite the second a sentence was said. `title`, `channelName` and `url` come with every row.

**How do I find the videos first?** Use [YouTube Search Scraper](https://apify.com/siteacs/youtube-search-scraper)
to list videos for a query, then paste their URLs here. [YouTube Video Details](https://apify.com/siteacs/youtube-video-details)
adds views, likes and tags.

**Which languages?** Any language YouTube has captions in. `availableLanguages` lists them per video.

**Why is my row `no_captions` when the video has speech?** YouTube does not auto-caption every video (music, some
languages, very new uploads). Nothing can be read until YouTube makes captions.

Questions or a wrong row? Open an issue on the **Issues** tab with the video URL and the row.

# Changelog

This Actor's version history is a separate document: https://apify.com/siteacs/youtube-transcript-scraper/changelog.md

# Actor input Schema

## `urls` (type: `array`):

One per line: a video or Shorts URL (youtube.com/watch?v=..., youtu.be/..., youtube.com/shorts/...), an 11-character video id, a channel (youtube.com/@name, /channel/UC...) or a playlist (youtube.com/playlist?list=...). Use Bulk edit to paste a long list. Duplicate videos are read once.

## `language` (type: `string`):

Caption language code, e.g. en, pt, es, de, fr, ja, pt-BR. Several codes separated by commas are tried in order. Empty: the video's own language.

## `fallbackToOriginal` (type: `boolean`):

On: when the video has no captions in the language above, the transcript in the video's original spoken language is returned (and charged), with languageFallback set to true. Off: such videos are saved free as language_not_found.

## `translate` (type: `boolean`):

On: when the language above is missing but YouTube offers its own machine translation of the captions (the 'Auto-translate' option in the player), that translation is returned. YouTube refuses many translation requests: then, with the fallback above on, you get the original-language transcript, charged like any fallback (languageFallback and translationRefused true); with the fallback off, the row is free (status translation_refused) and has no text.

## `includeTimestamps` (type: `boolean`):

On: each row also has a segments list with start time, duration (seconds) and text per caption line. Off: plain text only, a smaller dataset.

## `preferGenerated` (type: `boolean`):

Off: captions uploaded by the creator are used before YouTube's auto-generated ones in the same language. On: auto-generated first (they follow the speech word for word).

## `maxVideosPerChannel` (type: `integer`):

How many videos to read from each channel (newest first) or playlist (in playlist order). Single video URLs are not limited.

## `maxConcurrency` (type: `integer`):

How many videos are read in parallel.

## `proxyConfiguration` (type: `object`):

Apify datacenter proxy (the default) works for most videos; YouTube refuses some of its IPs, and those videos are retried on other IPs. Without a proxy YouTube refuses nearly every request from a cloud server.

## `residentialFallback` (type: `boolean`):

On: a video YouTube still refuses after 6 datacenter IPs (about 3 in 100) is tried through Apify residential proxy, at no extra charge to you. Off: such videos are saved free with status blocked.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://youtu.be/arj7oStGLkU"
  ],
  "language": "en",
  "fallbackToOriginal": true,
  "translate": false,
  "includeTimestamps": true,
  "preferGenerated": false,
  "maxVideosPerChannel": 50,
  "maxConcurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "residentialFallback": true
}
```

# Actor output Schema

## `overview` (type: `string`):

One item per video: status, title, channel, language and the transcript text (with timestamped segments in the full item).

## `details` (type: `string`):

Duration, every caption track the video has and whether a translation is offered.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://youtu.be/arj7oStGLkU"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("siteacs/youtube-transcript-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://youtu.be/arj7oStGLkU",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("siteacs/youtube-transcript-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://youtu.be/arj7oStGLkU"
  ]
}' |
apify call siteacs/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,siteacs/youtube-transcript-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Xrn59b9qBIm4uiBfM/builds/VogJgRKGzd2Yn3w5K/openapi.json
