# YouTube Transcript & Subtitles Scraper, Original + Translated (`alexmorain/youtube-transcript-scraper`) Actor

Timestamped YouTube transcripts and subtitles from videos, channels or searches, in the real original language (auto-dubbed and non-English videos included) or translated. Videos without captions are flagged and free. Optional comments, new-video watch per channel, webhook.

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

## Pricing

from $2.80 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### What does YouTube Transcript & Subtitles Scraper do?

It returns the full timestamped transcript of YouTube videos: every caption line with its start and end time, plus the whole text in one field. You give it video URLs, channels or search queries. You get the transcript in the language actually spoken in the video, or translated into the language you choose.

It reads the caption track list of each video before asking for the text. That check is what makes the difference on three kinds of videos where a plain transcript request goes wrong:

- **Non-English videos.** A transcript request that does not name the right language often comes back empty on a French, Spanish or Japanese video, exactly as if the video had no captions at all. This actor sees which tracks exist and asks for the right one.
- **Auto-dubbed videos.** More and more videos carry an AI dub in English. A default request then returns the captions of the dub, not what the creator said. This actor finds the track marked as original and returns that one, unless you ask otherwise.
- **Regional tracks.** A video whose only track is `en-US` comes back empty when you ask for `en`. The actor sends the exact track code.

Videos without any captions are flagged `no_transcript` and **not charged**.

### Why use YouTube Transcript & Subtitles Scraper?

- **Feed an LLM or a RAG pipeline** with what videos actually say: courses, podcasts, conference talks, product reviews.
- **Summarize or index a whole channel** in one run, then keep it up to date with watch mode.
- **Research a topic** across the top videos of a search, in several languages, translated to one.
- **Repurpose content**: blog posts, show notes, quotes, subtitles for your own edits.
- **Monitor competitors or creators**: new videos only, sent to your webhook.

You pay only for transcripts you receive. Videos without captions, unavailable videos, invalid lines and errors cost nothing.

### What data can YouTube Transcript & Subtitles Scraper extract?

#### Transcript rows (`type: transcript`)

| Field | Example | Meaning |
|---|---|---|
| `videoId` | `6p1S8B8wA70` | YouTube video id |
| `url` | `https://www.youtube.com/watch?v=6p1S8B8wA70` | Watch URL |
| `title` | `Trump prend une raclée...` | Video title |
| `channelName` | `Le Monde` | Channel name |
| `channelId` | `UC...` | Channel id |
| `durationSeconds` | `777` | Video length |
| `viewCount` | `160054895` | Views when scraped |
| `status` | `ok` | `ok`, `no_transcript`, `unavailable`, `language_unknown`, `timeout`, `invalid_input` or `error` |
| `language` | `fr` | Code of the caption track that was read |
| `originalLanguage` | `fr` | Language spoken in the video, or `null` when the video has no speech track to tell (music, text-only videos) |
| `isOriginalLanguage` | `true` | The track read is in the original language (`null` when the original is unknown) |
| `isAutoGenerated` | `true` | The track is YouTube speech recognition, not captions uploaded by the creator |
| `availableLanguages` | `[{"code": "fr", "autoGenerated": true}]` | Every caption track the video has |
| `translatedTo` | `en` | Target of the automatic translation, or `null` |
| `segments` | `[{"start": 0, "end": 3.04, "text": "Les élections..."}]` | Timestamped lines, in seconds |
| `text` | `Les élections de mi-mandat...` | The whole transcript as one string |
| `segmentCount` | `404` | Number of lines |
| `note` | `Requested language 'de' is not available; the original-language track was returned.` | Why a row is not what you asked for, when that happens |
| `source` | `channel` | `input`, `channel` or `search` |
| `sourceValue` | `@stanford` | The channel or query that led to the video |
| `scrapedAt` | `2026-11-09T15:00:00+00:00` | Time of the run |

#### Comment rows (`type: comment`, option)

| Field | Meaning |
|---|---|
| `videoId` | Video the comment belongs to |
| `author` | Comment author name |
| `text` | Comment text |
| `publishedAt` | Publication time, ISO 8601 UTC |
| `likes` | Like count |
| `replies` | Reply count |

### How to scrape YouTube transcripts

1. Paste video URLs, channel URLs or `@handles`, or search queries.
2. Leave **Transcript language** on `original`, or type a language code such as `en`, `fr` or `pt-BR`.
3. Optional: set **Translate to** to get every transcript in one language.
4. Optional: turn on **Include comments**.
5. Click **Start**. Download the dataset as JSON, CSV or Excel, or read it through the API.

Transcripts are fetched in batches. Expect one to three minutes before the first rows appear, whatever the number of videos.

### How much does it cost to scrape YouTube transcripts?

| Event | Free and Bronze | Silver | Gold and above |
|---|---|---|---|
| Transcript | $3.50 per 1,000 | $3.00 per 1,000 | $2.80 per 1,000 |
| Comment | $0.50 per 1,000 | $0.50 per 1,000 | $0.50 per 1,000 |
| Actor start | $0.002 per run | $0.002 per run | $0.002 per run |

Examples at the Free price: 100 transcripts cost $0.35. A channel of 500 videos costs $1.75. 100 videos with 100 comments each cost $0.35 + $5.00.

A translated transcript costs the same as an original one. Videos without captions, unavailable videos and errors are free. You can cap the spend of a run with **Max transcripts** or with the maximum charge setting of the run.

Free Apify plan: up to 0.15 USD of DataForSEO data per day; paid plans unlimited.

### Input

| Field | Default | Meaning |
|---|---|---|
| `videos` | `[]` | Video URLs (watch, youtu.be, shorts, embed, live) or 11-character ids |
| `channels` | `[]` | Channel URLs, `@handles` or `UC...` ids; reads the Videos tab, most recent first |
| `searches` | `[]` | YouTube search queries; reads the video results |
| `maxVideosPerSource` | `20` | Videos read from each channel and each search, 1 to 500 |
| `language` | `original` | `original`, or a language code |
| `translateTo` | empty | Language code for automatic translation |
| `includeComments` | `false` | Adds comment rows for each video whose transcript was returned |
| `maxComments` | `100` | Comments per video, 20 to 700 |
| `monitor` | `false` | Watch mode: per channel, only videos never delivered before |
| `maxItems` | `1000` | Most transcripts requested in one run |
| `webhookUrl` | empty | Receives the run summary by POST |

Example:

```json
{
  "videos": ["https://www.youtube.com/watch?v=UF8uR6Z6KLc"],
  "channels": ["@stanford"],
  "searches": ["intro to machine learning"],
  "maxVideosPerSource": 10,
  "language": "original",
  "translateTo": "en"
}
```

### Output

One dataset row per video, plus one row per comment when comments are on. The **Transcripts** view of the dataset shows the main fields; the **Comments** view lists comments. A short run summary (counts per status, delays) is saved in the key-value store under `OUTPUT`.

```json
{
  "type": "transcript",
  "videoId": "6p1S8B8wA70",
  "url": "https://www.youtube.com/watch?v=6p1S8B8wA70",
  "title": "Trump prend une raclée, Poutine est inquiet",
  "status": "ok",
  "language": "fr",
  "originalLanguage": "fr",
  "isOriginalLanguage": true,
  "isAutoGenerated": true,
  "availableLanguages": [{"code": "fr", "autoGenerated": true}],
  "translatedTo": null,
  "segments": [{"start": 0, "end": 3.04, "text": "Les élections de mi-mandat aux"}],
  "text": "Les élections de mi-mandat aux ...",
  "segmentCount": 460,
  "note": null,
  "source": "input"
}
```

#### Run it from your code

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("alexmorain/youtube-transcript-scraper").call(run_input={
    "videos": ["https://www.youtube.com/watch?v=UF8uR6Z6KLc"],
    "translateTo": "en",
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row["type"] == "transcript" and row["status"] == "ok":
        print(row["title"], row["segmentCount"])
```

JavaScript:

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('alexmorain/youtube-transcript-scraper').call({
    channels: ['@stanford'],
    maxVideosPerSource: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((r) => r.status === 'ok').length, 'transcripts');
```

cURL:

```bash
curl -X POST "https://api.apify.com/v2/acts/alexmorain~youtube-transcript-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"videos": ["UF8uR6Z6KLc"], "language": "original"}'
```

### Watch a channel for new videos

Turn on **Watch mode**, list your channels and schedule the actor (daily, for example). Each run returns only the videos it never delivered before, for each channel, and sends the summary to your webhook. The memory lives in a named key-value store in your own account. A video that ended in `timeout` or `error` is tried again next time; one with no captions is not, because YouTube rarely adds them later.

### Tips

- When a video has both captions uploaded by the creator and YouTube's speech recognition in the same language, the creator's captions win.
- An unknown language code in `language` or `translateTo` stops the run before anything is charged, with a message naming the code.
- Leave `language` on `original` unless you need a given track. With a code, a video that lacks that track returns its original language instead, and `note` says so.
- Use `translateTo` rather than `language` when you want every row in one language: translation works from the original track, so it covers far more videos.
- Need plain text for an LLM? Read `text` and ignore `segments`.
- Long videos cost the same as short ones: a 2-hour talk is one transcript.

### FAQ

#### How do I get the transcript of a YouTube video in another language?

Set **Translate to** to the language code you want, for example `en` or `es`. YouTube's automatic translation is applied to the original track. The price does not change.

#### Why do other transcript tools return nothing for some non-English videos?

Many tools ask for an English track by default. On a video that only has French or Spanish captions, that request comes back empty, the same answer as a video without captions. This actor reads the list of tracks first and asks for one that exists.

#### What is an auto-dubbed video and why does it matter?

YouTube can add an AI-dubbed audio track, often in English, to a video recorded in another language. The default captions then follow the dub. This actor detects the track YouTube marks as original and returns it, so you get what the creator said, not a machine dub of it.

#### Does it work on videos without captions?

No. If a video has no caption track at all, not even automatic ones, there is no transcript to return. The row comes back with `status: no_transcript` and is not charged. Music videos, very short clips and some live replays often fall in this case.

#### Can I get transcripts of a whole YouTube channel?

Yes. Put the channel URL or `@handle` in **Channels** and raise **Max videos per channel or search** (up to 500). Shorts are not included; the actor reads the Videos tab.

#### Does it handle YouTube Shorts?

A Short given by URL in **Videos** works like any video if it has captions. Channel listing skips Shorts.

#### Are auto-generated captions included?

Yes. Most videos only have YouTube's speech recognition captions. `isAutoGenerated` tells you which kind you got.

#### How fast is it?

Transcripts are produced in batches by the data provider. Most batches are ready in one to two minutes, whatever their size, and a few take up to five. A run of a few videos takes about as long as a run of a few hundred: on our tests, 500 transcripts came back in under ten minutes, 200 transcripts with 20 comments each in under seven.

#### Is it legal to scrape YouTube transcripts?

The actor reads public videos only, without logging in. Transcripts can be protected by copyright: check how you plan to use them, especially for republishing. For personal data in comments, you are responsible for complying with GDPR and similar laws.

#### Something is missing or broken

Open an issue on the actor page with the video id and the run id. Rows that fail show a `status` and a `note` that help find the cause.

### Guide and use cases

Use cases for outbound and automation, the output fields, pricing and common questions are on the [YouTube Transcript Scraper page](https://alexis.morain.fr/en/scrapers/youtube-transcript-scraper/) of my site. The [Social media and content family page](https://alexis.morain.fr/en/scrapers/families/social-content/) puts it side by side with the other scrapers of the same family.

# Actor input Schema

## `videos` (type: `array`):

Video URLs (watch, youtu.be, shorts, embed, live) or 11-character ids, one per line. A line that is not a valid video comes back as an <code>invalid_input</code> row and is not charged.

## `channels` (type: `array`):

Channel URLs, <code>@handles</code> or <code>UC...</code> ids. Reads the most recent videos of the Videos tab (long videos, no Shorts).

## `searches` (type: `array`):

YouTube search queries. Reads the video results (no Shorts, no playlists).

## `maxVideosPerSource` (type: `integer`):

Upper limit of videos read from each channel and each search.

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

<code>original</code> (default) returns the language spoken in the video, even when YouTube offers an auto-dubbed track. A code such as <code>en</code>, <code>fr</code> or <code>pt-BR</code> returns that track when the video has it, otherwise the original, and the row says so in <code>note</code>.

## `translateTo` (type: `string`):

Optional language code for YouTube automatic translation (for example <code>en</code>). The row has <code>translatedTo</code> set and <code>text</code> in that language. Same price.

## `includeComments` (type: `boolean`):

Adds one row per comment (type <code>comment</code>) for each video whose transcript was returned. Charged per comment.

## `maxComments` (type: `integer`):

Between 20 and 700. The request is rounded up to a multiple of 20; you get at most this many rows.

## `monitor` (type: `boolean`):

For each channel, returns only the videos never delivered by an earlier watch run (memory kept in your account). Videos without a transcript yet are retried next time only if they ended in timeout or error.

## `maxItems` (type: `integer`):

Upper limit of transcripts requested (and charged) in one run.

## `webhookUrl` (type: `string`):

Optional. The run summary is sent there by POST when the run ends (Slack, Discord, Zapier...). The URL is never written to a log.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=UF8uR6Z6KLc"
  ],
  "channels": [],
  "searches": [],
  "maxVideosPerSource": 20,
  "language": "original",
  "translateTo": "",
  "includeComments": false,
  "maxComments": 100,
  "monitor": false,
  "maxItems": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

All rows in the default dataset.

## `summary` (type: `string`):

Rows by status, events charged, delay of the transcript tasks, skipped and resumed counts.

# 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 = {
    "videos": [
        "https://www.youtube.com/watch?v=UF8uR6Z6KLc"
    ],
    "channels": [],
    "searches": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("alexmorain/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 = {
    "videos": ["https://www.youtube.com/watch?v=UF8uR6Z6KLc"],
    "channels": [],
    "searches": [],
}

# Run the Actor and wait for it to finish
run = client.actor("alexmorain/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 '{
  "videos": [
    "https://www.youtube.com/watch?v=UF8uR6Z6KLc"
  ],
  "channels": [],
  "searches": []
}' |
apify call alexmorain/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alexmorain/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/ruQ9MmwRGIu0UpwaV/builds/rnINZoaDkzNMTGVhk/openapi.json
