# YouTube Transcript Scraper - Videos, Playlists & Channels (`scrolahdata/youtube-transcript-scraper`) Actor

Get YouTube transcripts and subtitles in any language from videos, Shorts, playlists and whole channels. Plain text, timestamps, SRT and LLM-ready chunks. Auto-translate. Pay only for transcripts found. YouTube subtitles download and captions.

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

## Pricing

from $6.40 / 1,000 transcript extracteds

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

## YouTube Transcript Scraper — Videos, Playlists & Channels

Get **YouTube transcripts and subtitles** in bulk — from single videos, Shorts, live replays, **whole playlists or entire channels**. Choose your languages, auto-translate, and export as plain text, timestamped segments, **SRT subtitles** or **LLM-ready chunks** for RAG, summarisation and AI agents.

**You only pay for transcripts that were actually found.** Videos without captions, private or deleted videos are reported but never charged.

### What can this YouTube Transcript Scraper do?

- 🎬 **Any YouTube URL** — `watch?v=`, `youtu.be`, `/shorts/`, `/live/`, `/embed/`, or a bare video ID
- 📺 **Channels and playlists** — paste `https://www.youtube.com/@channel` or a playlist URL and get transcripts for the latest N videos
- 🌍 **Language control** — list preferred languages in order (`en`, `es`, `de`, `zh-Hans` …), prefer human-made captions over auto-generated ones, and fall back automatically when your language isn't available
- 🔤 **Auto-translate** — translate any transcript into another language using YouTube's built-in translation
- ⏱️ **Timestamps** — every caption line with start time and duration
- 📝 **SRT export** — ready-to-use subtitle file per video
- 🤖 **LLM chunks** — transcript grouped into ~N-second paragraphs with start/end times, perfect for vector databases and summarisation
- 🧾 **Video metadata** — title, channel name, channel URL, thumbnail, word count, duration
- 🛡️ **Reliable** — blocked requests are retried automatically, falling back to residential proxies only when needed

### How to use it

1. Paste YouTube video, playlist or channel URLs into **YouTube URLs** (or video IDs into **Video IDs**).
2. Set your **preferred languages** (default: `en`).
3. Optionally switch on **SRT**, **LLM chunks** or **translation**.
4. Click **Start** and download results as JSON, CSV, Excel or via API.

#### Example input

```json
{
  "startUrls": [
    { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" },
    { "url": "https://www.youtube.com/@veritasium" }
  ],
  "languages": ["en"],
  "maxVideosPerChannelOrPlaylist": 20,
  "includeSrt": true,
  "chunkSeconds": 60
}
```

#### Example output

```json
{
  "videoId": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "status": "ok",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley",
  "language": "English",
  "languageCode": "en",
  "isGenerated": false,
  "availableLanguages": [{ "languageCode": "en", "language": "English", "isGenerated": false }],
  "text": "[♪♪♪] We're no strangers to love ...",
  "wordCount": 487,
  "durationSeconds": 211.3,
  "segments": [{ "start": 1.36, "duration": 1.68, "text": "[♪♪♪]" }],
  "chunks": [{ "start": 1.36, "end": 62.5, "text": "..." }]
}
```

Videos that couldn't be processed come back with `status` set to `no_transcript`, `unavailable` or `error` and an `error` message — and are **not charged**.

### Output fields

| Field | Description |
|---|---|
| `videoId`, `url` | Video identifier and link |
| `status` | `ok`, `no_transcript`, `unavailable`, `error` |
| `title`, `channelName`, `channelUrl`, `thumbnailUrl` | Video metadata |
| `language`, `languageCode`, `isGenerated` | Which caption track was used |
| `translatedFrom` | Original language when translation was applied |
| `availableLanguages` | All caption tracks the video has |
| `text`, `wordCount`, `charCount`, `durationSeconds` | Full transcript as plain text and stats |
| `segments` | Timestamped caption lines (optional) |
| `srt` | SRT subtitle file content (optional) |
| `chunks` | LLM-ready paragraphs with start/end time (optional) |

### How much does it cost?

This Actor uses **pay-per-result** pricing: you pay a small fixed price for each transcript successfully extracted. Failed videos and videos without captions are free. You can cap the spend of any run with the *Maximum cost per run* setting.

### Use cases

- Feed YouTube content into **ChatGPT, Claude or your RAG pipeline**
- **Summarise** lectures, podcasts and tutorials
- **Content research and SEO** — mine what top creators say about a topic
- **Subtitles and translation** workflows
- **Academic and market research** on video content at scale

### Integrations and API

Run it from the Apify API, Python or JavaScript clients, schedule it, or connect it to Make, Zapier, n8n, Google Sheets and webhooks. It also works as a tool for AI agents via the Apify MCP server.

### Pair it with

- [YouTube Scraper](https://apify.com/scrolahdata/youtube-scraper) — find videos by search, channel or playlist
- [YouTube Comments Scraper](https://apify.com/scrolahdata/youtube-comments-scraper) — comments and replies

### Integrations & API

- **API** — run it from Python, Node.js or any language with the Apify API / `apify-client` and get results as JSON.
- **Schedules & monitoring** — run it hourly, daily or weekly and get only fresh data.
- **Zapier, Make, n8n, Google Sheets, Slack, webhooks** — send results to your tools automatically.
- **AI agents (MCP)** — use it from Claude, ChatGPT, Cursor or any MCP client through the Apify MCP server.

### FAQ

**Does it need a YouTube login or API key?** No. It reads publicly available caption tracks only.

**Why does a video return `no_transcript`?** The creator disabled captions and YouTube has no auto-generated track (common for music-only or very new videos).

**Is scraping YouTube transcripts legal?** This Actor only accesses publicly available captions. You are responsible for how you use the data — respect copyright and YouTube's terms, and don't republish creators' content without permission.

**Found a bug or need a feature?** Open an issue in the *Issues* tab — we respond quickly.

# Actor input Schema

## `startUrls` (type: `array`):

Video, Shorts, live, playlist or channel URLs. Playlists and channels are expanded into their videos.

## `videoIds` (type: `array`):

Optional list of 11-character video IDs (e.g. dQw4w9WgXcQ).

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

Language codes in order of preference (e.g. en, es, de, zh-Hans). If none is available, the first available transcript is returned.

## `preferManualTranscripts` (type: `boolean`):

Pick creator-uploaded captions over auto-generated ones when both exist in a preferred language.

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

Optional. Language code to translate the transcript into using YouTube's built-in translation (e.g. en). Leave empty to keep the original.

## `maxVideosPerChannelOrPlaylist` (type: `integer`):

Limit how many videos are taken from each channel or playlist URL (newest first for channels).

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

Add the `segments` array with start time, duration and text of each caption line.

## `includeSrt` (type: `boolean`):

Add a ready-to-use SRT subtitle file as the `srt` field.

## `chunkSeconds` (type: `integer`):

If above 0, also output `chunks`: paragraphs of roughly this many seconds with start/end times — ideal for RAG and summarisation. 0 = off.

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

Add title, channel name, channel URL and thumbnail.

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

How many videos to process in parallel.

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

If a video is blocked on the main proxy, retry it through Apify residential proxy (Apify platform only).

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

Proxy used for the first attempts. YouTube blocks many cloud IPs; with the fallback below enabled, blocked videos are retried through residential proxies automatically.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    },
    {
      "url": "https://www.youtube.com/@veritasium"
    }
  ],
  "videoIds": [],
  "languages": [
    "en"
  ],
  "preferManualTranscripts": true,
  "translateTo": "",
  "maxVideosPerChannelOrPlaylist": 50,
  "includeTimestamps": true,
  "includeSrt": false,
  "chunkSeconds": 0,
  "includeVideoMetadata": true,
  "maxConcurrency": 5,
  "residentialFallback": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "startUrls": [
        {
            "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
        },
        {
            "url": "https://www.youtube.com/@veritasium"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrolahdata/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 = { "startUrls": [
        { "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" },
        { "url": "https://www.youtube.com/@veritasium" },
    ] }

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

```

## MCP server setup

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