# YouTube Transcript Scraper - Bulk, No Browser (`hllerdgn80/youtube-transcript-batch`) Actor

Transcripts from YouTube videos, playlists and channels, charged only when a transcript is actually delivered. No browser, so a run finishes in seconds. Benchmarked 45/45 videos with zero failures. Every video that cannot be fetched says exactly why instead of disappearing from the output.

- **URL**: https://apify.com/hllerdgn80/youtube-transcript-batch.md
- **Developed by:** [Halil Erdogan](https://apify.com/hllerdgn80) (community)
- **Categories:** Videos, AI, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 transcript delivereds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## YouTube Transcript Scraper — bulk, no browser, $2.50 per 1,000

Pull transcripts from YouTube videos, playlists and channels. Paste anything —
watch links, `youtu.be` links, Shorts, playlist URLs, `@channel` handles, or bare
video IDs — and get back clean text, timestamped segments, or an SRT file.

### Price

**$0.0025 per transcript delivered ($2.50 per 1,000), plus $0.001 per run.**
You are charged only for rows that contain a transcript. A video with captions
disabled, an age gate or a region block still gets a row that explains what
happened — and that row is free.

There is no platform-usage surcharge on top: the price above is the whole price.

### Measured, not claimed

Benchmark on **2026-09-05** (build 0.2.5), default settings: three channels
(TED, Veritasium, BBC News), **45 videos → 45 transcripts, 0 failures, 24 seconds.**
Median transcript 2,403 words; 22 auto-generated and 23 human-written;
44 English and 1 Arabic.

Two notes on that number:

- **Keep the default settings.** They are what the benchmark was measured on.
  Changing them to cut cost will cut the success rate with it.
- **45 videos is a benchmark, not a guarantee.** Captions the uploader disabled,
  age-gated videos and region blocks will still fail — and when they do, the row
  tells you which one it was.

### What makes it different

**No browser.** Transcripts come from YouTube's own caption endpoints over plain
HTTP. There is no Chrome instance to start, so a run finishes in seconds instead
of minutes and costs a fraction of a browser-based scraper. That saving is what
makes the price possible.

**Nothing fails silently.** Give it 500 URLs and some of them will have captions
disabled, be age-gated, or be region-blocked. Those come back as rows that say
exactly which problem it was — you never have to diff your input against your
output to work out what went missing.

| What happened | What you get in the row |
|---|---|
| Captions turned off by the uploader | `the uploader disabled captions on this video` |
| No track in your languages | `no caption track matched your language settings` |
| Private, deleted or region blocked | `the video is private, deleted or region blocked` |
| Age restricted | `the video is age restricted and needs a signed-in session` |
| YouTube throttled the request | `split the batch into smaller runs` |

**Title, channel and duration come free.** They are read from the same response
as the caption list, so there is no extra request and no extra cost per video.

### Input

| Field | Notes |
|---|---|
| **YouTube URLs** | Videos, playlists, channels or bare IDs, one per line |
| **Preferred languages** | In order, e.g. `en`, `es`, `tr`. First one the video has wins |
| **Accept auto-generated captions** | On by default — most videos have nothing else |
| **Translate if missing** | Ask YouTube to translate a track it does have |
| **Output format** | Plain text · timestamped segments · SRT · all three |
| **Include title, channel, duration** | On by default; costs nothing extra |
| **Max videos per playlist/channel** | Single video URLs are never limited |
| **Parallel requests** | 10 is a good balance |
| **Proxy** | Leave on the default — it is what the benchmark was measured on |

### Output

`videoId` · `url` · `title` · `channel` · `language` · `languageName` ·
`isGenerated` · `segmentCount` · `wordCount` · `durationSeconds` · `ok` ·
`error`, plus `text`, `segments` and/or `srt` depending on the format you chose.

Plain text is what you feed an LLM or a RAG pipeline; segments keep the caption
cue timestamps; SRT is a ready subtitle file.

### Notes

**Most transcripts are machine-generated.** YouTube auto-captions the majority of
videos and few uploaders write their own. Auto-captions have no punctuation and
misread names. If you need human-written captions only, turn off
*Accept auto-generated captions* — and expect most videos to return nothing.

**Very large batches can still hit limits.** If a long run starts returning
block errors partway through, split it into smaller runs. The error rows tell you
the moment it happens, and you are not charged for them.

**Timestamps are the caption track's own.** They are accurate to the caption
cue, not to the word.

# Actor input Schema

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

Videos, playlists or channels, one per line. Video IDs on their own work too. A playlist or channel URL is expanded into its videos automatically.

## `languages` (type: `array`):

Two-letter codes in order of preference, e.g. en, es, tr. The first one the video actually has wins; if none is available the video is reported as such rather than returned in another language. Leave empty and the actor follows the language the video is spoken in (falling back to English when YouTube states no language at all).

## `allowAutoGenerated` (type: `boolean`):

Most videos have no human-written transcript. Leave on unless you specifically need manually written captions.

## `allowTranslation` (type: `boolean`):

If none of your preferred languages exist, ask YouTube to translate an available track into the first one.

## `outputFormat` (type: `string`):

Plain text is what you feed an LLM. Segments keep per-line timestamps. SRT is a subtitle file.

## `includeVideoMetadata` (type: `boolean`):

Title, channel and duration come from the same response as the captions, so this costs nothing extra.

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

Applies only to playlist and channel URLs. Single video URLs are never limited.

## `concurrency` (type: `integer`):

10 is a good balance. Raise it for large batches, lower it if YouTube starts refusing.

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

Leave this as it is. The default is the configuration the published benchmark was measured on; lowering it reduces the success rate.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "allowAutoGenerated": true,
  "allowTranslation": true,
  "outputFormat": "text",
  "includeVideoMetadata": true,
  "maxVideosPerSource": 50,
  "concurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `transcripts` (type: `string`):

Dataset with one item per video: videoId, url, title, channel, language, languageName, isGenerated, segmentCount, wordCount, durationSeconds, ok, error, plus text / segments / srt depending on the chosen output format.

## `runStats` (type: `string`):

Key-value store record RUN\_STATS: number of videos, transcripts delivered and failures for the run.

# 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=dQw4w9WgXcQ"
    ],
    "languages": [
        "en"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hllerdgn80/youtube-transcript-batch").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=dQw4w9WgXcQ"],
    "languages": ["en"],
}

# Run the Actor and wait for it to finish
run = client.actor("hllerdgn80/youtube-transcript-batch").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=dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ]
}' |
apify call hllerdgn80/youtube-transcript-batch --silent --output-dataset

```

## MCP server setup

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

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/Hfd3AmzDyonkElJWC/builds/vefkfLBxj7oqyrN6m/openapi.json
