# YouTube Transcript Scraper API - Subtitles, Captions, SRT (`victorrodi/youtube-transcript-scraper-api`) Actor

Get YouTube transcripts with timestamps as JSON, text, SRT or VTT. Videos, Shorts, whole playlists and channels, 100+ languages, manual or auto captions, video metadata. Fast, no browser, no API key; videos without captions are never charged.

- **URL**: https://apify.com/victorrodi/youtube-transcript-scraper-api.md
- **Developed by:** [TrendPulse Data](https://apify.com/victorrodi) (community)
- **Categories:** Videos, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 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

### 🎬 YouTube Transcript Scraper & API — fast, cheap, no browser

**Get the transcript (subtitles / captions) of any YouTube video as clean JSON, plain text, SRT or VTT.** Paste video links, a playlist or a whole channel: this YouTube transcript scraper calls YouTube's own data endpoints directly — no headless browser, no API key, no YouTube account — so runs start instantly and cost a fraction of a cent per video.

✅ **Transcripts with timestamps** (start + duration for every line) and the **full text** in one field
✅ **SRT and VTT subtitle files** ready to download or burn into a video
✅ **Manual or auto-generated captions** — you choose which one wins
✅ **100+ languages**: pick your preferred languages in order, with automatic fallback
✅ **Whole playlists and channels** (`/@handle`, `/channel/UC…`) expanded to their videos automatically
✅ **Video metadata**: title, channel, duration, views, publish date, description, keywords, thumbnail
✅ Works with `watch?v=`, `youtu.be/`, **Shorts**, **live** replays, embeds and bare video IDs
✅ **You never pay for videos without captions** or for failed videos

***

### 🚀 Why this YouTube transcript API is different

| | This Actor | Typical transcript scrapers |
|---|---|---|
| Price per video | **$0.004** (less on higher plans) | $0.005 – $0.01 |
| Playlists and channels in one run | **Yes**, with pagination | Often single videos only |
| Output formats | **Segments, text, SRT, VTT** | JSON only |
| Metadata included | **Yes** (title, channel, views, date…) | Separate Actor |
| Charged for videos without captions | **Never** | Often |
| Browser needed | **No** — 5 videos in parallel, seconds per video | Usually slow headless Chrome |
| Blocking handling | Session retries, new IPs, **automatic residential fallback** | Fails on cloud IPs |

***

### 💡 What can you do with YouTube transcripts?

- **AI, RAG and LLM training**: feed clean, timestamped transcripts into ChatGPT, Claude, LangChain, LlamaIndex or a vector database. Build "chat with this channel" apps.
- **Summaries and notes**: summarize lectures, podcasts, webinars and tutorials in seconds.
- **Content repurposing**: turn videos into blog posts, newsletters, X threads, LinkedIn posts and SEO articles.
- **Subtitles**: download SRT/VTT files and add them to your own videos or editing tools.
- **SEO and keyword research**: see exactly what top-ranking videos say about a topic.
- **Market and competitor research**: analyse what competitors, influencers and reviewers say about products and brands.
- **Education and accessibility**: searchable text for courses, quotes with exact timestamps, study material.
- **Data science**: sentiment, topic modelling and trend analysis across whole channels.

***

### 🛠️ How to get a YouTube transcript (3 steps)

1. **Paste video links** (one per line) — or add a **playlist or channel URL**.
2. **Choose languages and formats** — e.g. `en`, then `es`; segments + text, or SRT/VTT.
3. **Click Start** and download your dataset as **JSON, CSV, Excel, XML or HTML**, or fetch it through the API.

***

### 📥 Input example

```json
{
  "videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw", "https://youtu.be/dQw4w9WgXcQ"],
  "playlistOrChannelUrls": ["https://www.youtube.com/@TED"],
  "maxVideosPerSource": 20,
  "languages": ["en", "es"],
  "preferManual": true,
  "outputFormats": ["segments", "text", "srt"],
  "includeMetadata": true
}
```

### 📤 Output example

```json
{
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "title": "Me at the zoo",
  "channelName": "jawed",
  "durationSeconds": 19,
  "viewCount": 380000000,
  "publishDate": "2005-04-23",
  "language": "en",
  "languageName": "English",
  "isAutoGenerated": false,
  "availableLanguages": [{ "code": "en", "name": "English", "isAutoGenerated": false }],
  "segments": [
    { "start": 1.2, "duration": 2.16, "text": "All right, so here we are, in front of the elephants" }
  ],
  "text": "All right, so here we are, in front of the elephants the cool thing about these guys is that…",
  "srt": "1\n00:00:01,200 --> 00:00:03,360\nAll right, so here we are, in front of the elephants\n…",
  "wordCount": 48,
  "status": "ok"
}
```

Videos without captions are listed in the `RUN_SUMMARY` record of the run (key-value store), not in the dataset — and they are not charged.

***

### ⚙️ Input parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `videos` | array | `["jNQXAC9IVRw"]` | YouTube video URLs or 11-character IDs; watch, short, live and embed links work. Maximum 1000. |
| `playlistOrChannelUrls` | array | — | Playlist and channel URLs to expand through InnerTube browse continuation. |
| `maxVideosPerSource` | integer | `50` | Maximum videos read from each playlist or channel. |
| `languages` | array | `["en"]` | Language codes in preference order; any available track is a fallback. |
| `preferManual` | boolean | `true` | Prefer human-written captions over auto-generated captions within the chosen language. |
| `outputFormats` | array | `["segments", "text"]` | Choose segments, plain text, SRT or VTT. |
| `includeMetadata` | boolean | `true` | Include title, channel, duration, views, date, description, thumbnail and keywords. |
| `concurrency` | integer | `5` | Maximum videos being processed in parallel. |
| `proxyConfiguration`, `maxRetries` | object, integer | Apify Proxy, auto | Proxy and retries; the defaults work for most runs. |

### 📋 Output fields

| Field | Type | Description |
|---|---|---|
| `videoId` | string | YouTube video ID |
| `url` | string | Watch URL |
| `title` | string | Video title |
| `channelName` | string | Channel name |
| `channelId` | string | Channel ID |
| `durationSeconds` | integer | Duration in seconds |
| `viewCount` | integer | View count |
| `publishDate` | string | Published date |
| `description` | string | Description, up to 5000 characters |
| `thumbnail` | string | Thumbnail URL |
| `keywords` | array | Video keywords |
| `language` | string | Output language code |
| `languageName` | string | Caption track name |
| `isAutoGenerated` | boolean | Selected caption track is automatic |
| `availableLanguages` | array | Available caption tracks |
| `segments` | array | Timed caption segments |
| `text` | string | Plain transcript |
| `srt` | string | SRT subtitle file content |
| `vtt` | string | WebVTT subtitle file content |
| `wordCount` | integer | Transcript word count |
| `status` | string | Always ok for dataset items |

Export as JSON, CSV, Excel, XML or HTML, or read it through the API.

***

### 💰 Pricing — pay only for transcripts

| What you run | Results | Cost (free plan) |
|---|---|---|
| 1 video | 1 | $0.004 |
| 100 videos | 100 | $0.40 |
| A 50-video playlist | 50 | $0.20 |
| 1,000 videos | 1,000 | $4.00 |

Higher Apify plans pay less: $0.0035 (Bronze), $0.003 (Silver), $0.0025 (Gold and above). Platform usage and proxies are **included**. Set a **maximum cost per run** and the Actor stops cleanly when it is reached. **Videos without captions and failed videos are never charged.**

***

### 🔌 Use the YouTube Transcript API from your code

**Python**

```python
from apify_client import ApifyClient  # pip install "apify-client>=3"

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("victorrodi/youtube-transcript-scraper-api").call(
    run_input={"videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"], "outputFormats": ["text"]}
)
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item["title"], "-", item["text"][:200])
```

**JavaScript / Node.js**

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('victorrodi/youtube-transcript-scraper-api').call({
  playlistOrChannelUrls: ['https://www.youtube.com/@TED'],
  maxVideosPerSource: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((v) => console.log(v.title, v.wordCount));
```

**cURL** (run and get the results in one call)

```bash
curl -X POST "https://api.apify.com/v2/acts/victorrodi~youtube-transcript-scraper-api/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"videos": ["dQw4w9WgXcQ"], "outputFormats": ["text"]}'
```

Also works with **Make, Zapier, n8n, Google Sheets, Slack, LangChain, LlamaIndex** and **MCP / AI agents** through Apify integrations.

#### 🤖 Use it from AI agents (Claude, ChatGPT, Cursor…)

This Actor is available to AI assistants through the **[Apify MCP server](https://mcp.apify.com)**. Add it with `--actors victorrodi/youtube-transcript-scraper-api`, then ask:

> *"Get the transcript of https://youtu.be/dQw4w9WgXcQ and summarize it in 5 bullet points."*

> *"Fetch the last 10 videos of @TED and list the main ideas of each one."*

***

### 🛡️ Reliability

- Requests are paced and retried on the same session first, then with a **new IP** and exponential backoff.
- If YouTube keeps blocking, the Actor **switches to residential IPs automatically**.
- One failing video never stops the run; every run writes a `RUN_SUMMARY` record (results, videos without captions, failures, retries).
- Playlists and channels are paged safely: a layout change can never make a run loop or overspend.

More examples and docs for all our Actors: **[trendpulse-scrapers](https://github.com/Vicshock/trendpulse-scrapers)**.

***

### 📌 Tips

- `languages` is an ordered preference list: `["pt", "en"]` returns Portuguese when it exists, otherwise English, otherwise the first available track.
- Turn **preferManual** off to always prefer auto-generated captions (useful for exact timing).
- Keep `concurrency` at 5 for large lists: faster is not cheaper when YouTube starts rate-limiting.

***

### ❓ FAQ

**Do I need a YouTube API key?** No. The official YouTube Data API does not return transcripts of other people's videos; this Actor does, without any key or login.

**Which videos work?** Any public video, Short or live replay that has captions (manual or auto-generated). Private, deleted, age-restricted and members-only videos are skipped and not charged.

**How many videos can I process?** Up to 1,000 videos per run, plus playlists and channels (up to 1,000 videos per source).

**Can I get subtitles in another language?** Yes, when the video has a track in that language: list your preferred languages in order. `availableLanguages` shows every track of the video.

**Is scraping YouTube transcripts legal?** The Actor only reads publicly available captions and video information; it collects no personal data. Make sure your use respects YouTube's terms, copyright and the laws that apply to you.

***

### 💬 Support

Missing a field, a format or found an issue? Open an issue in the **Issues** tab — it is answered fast. Feature requests are welcome.

# Actor input Schema

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

YouTube video URLs or 11-character IDs; watch, short, live and embed links work. Maximum 1000.

## `playlistOrChannelUrls` (type: `array`):

Playlist and channel URLs to expand through InnerTube browse continuation.

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

Maximum videos read from each playlist or channel.

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

Language codes in preference order; any available track is a fallback.

## `preferManual` (type: `boolean`):

Prefer human-written captions over auto-generated captions within the chosen language.

## `outputFormats` (type: `array`):

Choose segments, plain text, SRT or VTT.

## `includeMetadata` (type: `boolean`):

Include title, channel, duration, views, date, description, thumbnail and keywords.

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

Use Apify Proxy by default; after four consecutive blocks switch to residential.

## `maxRetries` (type: `integer`):

Retries for blocked or transient requests.

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

Maximum videos being processed in parallel.

## `debugLog` (type: `boolean`):

Log request status and paths for troubleshooting.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "playlistOrChannelUrls": [],
  "maxVideosPerSource": 50,
  "languages": [
    "en"
  ],
  "preferManual": true,
  "outputFormats": [
    "segments",
    "text"
  ],
  "includeMetadata": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxRetries": 6,
  "concurrency": 5,
  "debugLog": false
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "videos": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("victorrodi/youtube-transcript-scraper-api").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=jNQXAC9IVRw"] }

# Run the Actor and wait for it to finish
run = client.actor("victorrodi/youtube-transcript-scraper-api").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=jNQXAC9IVRw"
  ]
}' |
apify call victorrodi/youtube-transcript-scraper-api --silent --output-dataset

```

## MCP server setup

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

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/thTcgJbZQKQ5gSP1t/builds/vDTGVXQ9tAN2rGgrb/openapi.json
