# YouTube Transcript Scraper — Subtitles, Channels & Playlists (`mastertools/youtube-transcripts`) Actor

Scrape YouTube transcripts and subtitles in bulk from videos, Shorts, playlists, whole channels and search. Full text with timestamps, chapters, AI-ready chunks for RAG and LLMs, SRT/VTT and video details. Any language, no login.

- **URL**: https://apify.com/mastertools/youtube-transcripts.md
- **Developed by:** [Master Tools](https://apify.com/mastertools) (community)
- **Categories:** Videos, AI, Social media
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 transcripts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 — Subtitles, Channels & Playlists

**Turn any YouTube video, playlist or whole channel into clean text, with timestamps, chapters and chunks ready for AI.**

Paste links to videos, Shorts, live recordings, playlists or channels, or just type a search phrase. You get one clean row per video with:

- the full transcript;
- every caption line with its time;
- chapters, each linking to its moment in the video;
- subtitles as SRT or VTT;
- the video's details.

This YouTube transcript API takes the language spoken in the video, or any language you pick. There is no login, no YouTube API key and nothing to set up: press **Start** and the text is there in seconds.

### Why people choose this YouTube transcript scraper

- **Whole channels, playlists and searches in one run.** Paste a channel, a playlist or a search phrase instead of collecting video links one by one.
- **The right language, automatically.** You get the creator's captions in the language actually spoken, then YouTube's auto-captions. Set one field to get any other language. The row lists every language the video has.
- **Ready for ChatGPT, Claude and RAG.** Each row has:

  - the full text;
  - \~60-second chunks, each with its chapter and a link to that exact moment;
  - every line with its start and end time.

  Drop it straight into a vector database or an LLM prompt.
- **Chapters with links to the moment.** You get the creator's chapters. If the creator added none, you get YouTube's auto-chapters.
- **Only new videos.** Set "published after" to a date or to `7 days`, then schedule the run to follow channels day by day.
- **Download YouTube subtitles as SRT or VTT.** One switch adds ready subtitle files to every row.
- **Every link answered.** Some videos have no captions, are private or age-restricted, or are still live. Each of these comes back as a short row with the reason, so a run is never silently empty.
- **Fast and light.** It uses plain HTTP requests, no browser, and handles dozens of videos a minute. Reliable proxies are already set up, and blocked requests retry from a fresh IP.

### Who it's for

- **AI and RAG developers.** Feed transcripts of courses, podcasts and talks into chatbots, agents and vector databases. Chunks keep the timestamp and chapter, so every answer can cite its moment.
- **Content marketers and SEO teams.** Turn videos into blog posts, newsletters, social posts and quotes. You can also research what top channels in your niche talk about.
- **Researchers and analysts.** Collect what creators, experts and brands say about a topic across hundreds of videos and in any language.
- **Creators and educators.** Get subtitles, show notes and searchable text for your own channel or course.

### How to get YouTube transcripts

1. Press **Start**. The example video works as is.
2. Paste your own links. These all work:

   - videos, Shorts and `/live/` recordings;
   - playlists and `@channels`;
   - plain video IDs and handles.

   Or add search phrases.
3. Download the results as JSON, CSV, Excel or HTML, send them to Google Sheets, or take them through the API.

### Input

| Field | What it does | Example |
|---|---|---|
| `urls` | Videos, Shorts, live recordings, playlists or channels, one per line. A channel gives its newest videos. For Shorts or live recordings, add `/shorts` or `/streams` to the channel link. | `https://www.youtube.com/@3blue1brown` |
| `searchQueries` | Search phrases. You get transcripts of the top videos for each one. | `how transformers work` |
| `maxVideos` | How many videos to take from each playlist, channel or search. | `10` |
| `language` | Language code or name. Leave it empty to get the language spoken in the video. | `es`, `pt-BR`, `German` |
| `publishedAfter` | Keep only videos published after a date or within a period. | `2026-11-01`, `7 days` |
| `chunkSeconds` | Length of AI chunks in seconds. `0` turns them off. | `60` |
| `includeSegments` | Every caption line with its start and end time. | `true` |
| `subtitlesFormat` | Also add the transcript as SRT or WebVTT text. | `srt` |

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi",
    "@3blue1brown"
  ],
  "maxVideos": 10,
  "language": "en"
}
```

### Output

You get one row per video. Here is a shortened example:

```json
{
  "videoId": "aircAruvnKk",
  "url": "https://www.youtube.com/watch?v=aircAruvnKk",
  "status": "ok",
  "title": "But what is a neural network? | Deep learning chapter 1",
  "channelName": "3Blue1Brown",
  "channelId": "UCYO_jab_esuFRV4b17AJtAw",
  "publishedAt": "2017-10-05T08:11:25-07:00",
  "durationSeconds": 1120,
  "viewCount": 25177689,
  "language": "en",
  "languageName": "English",
  "isAutoGenerated": false,
  "availableLanguages": ["ar", "bn", "zh-CN", "cs", "en", "fr", "de", "…"],
  "text": "This is a 3. It's sloppily written and rendered at an extremely low resolution of 28x28 pixels, but your brain has no trouble recognizing it as a 3. …",
  "chapters": [
    { "title": "Introduction example", "start": 0, "end": 67, "url": "https://www.youtube.com/watch?v=aircAruvnKk&t=0s" },
    { "title": "Series preview", "start": 67, "end": 162, "url": "https://www.youtube.com/watch?v=aircAruvnKk&t=67s" }
  ],
  "chunks": [
    { "start": 4.22, "end": 64.75, "chapter": "Introduction example", "text": "This is a 3. It's sloppily written …", "url": "https://www.youtube.com/watch?v=aircAruvnKk&t=4s" }
  ],
  "segments": [
    { "start": 4.22, "end": 5.4, "text": "This is a 3." },
    { "start": 6.06, "end": 10.71, "text": "It's sloppily written and rendered at an extremely low resolution of 28x28 pixels," }
  ],
  "description": "What are the neurons, why are there layers, and what is the math underlying it? …",
  "thumbnailUrl": "https://i.ytimg.com/vi/aircAruvnKk/hqdefault.jpg",
  "inputUrl": "https://www.youtube.com/watch?v=aircAruvnKk"
}
```

A video without a transcript comes back like this:

```json
{
  "videoId": "FOnr_6Uehic",
  "url": "https://www.youtube.com/watch?v=FOnr_6Uehic",
  "status": "no_captions",
  "title": "【ライブ】11/9 夜ニュースまとめ 最新情報を厳選してお届け ANN/テレ朝【LIVE】",
  "inputUrl": "https://www.youtube.com/watch?v=FOnr_6Uehic",
  "error": "Live stream: captions appear after the broadcast ends."
}
```

`status` is one of `ok`, `no_captions`, `age_restricted`, `unavailable` or `error`. In the Output tab, the **Transcripts** view shows the main fields as a table.

### Use it with AI agents (MCP)

Add the Actor as a tool in Claude, ChatGPT, Cursor, n8n or any MCP client through the Apify MCP server:

```
https://mcp.apify.com?tools=mastertools/youtube-transcripts
```

The agent only needs one field, `urls`. The answer comes back as compact JSON in seconds, with the transcript, the chapters and links to exact moments that the agent can quote.

Typical jobs:

- summarize a video or a whole channel;
- answer questions about a talk, with links to the moment;
- build a RAG knowledge base from a course playlist;
- compare what creators said about a topic.

#### Instant API for agents (Standby)

The Actor also runs as an always-ready web API. You don't start a run or read a dataset: you send one request and get one JSON answer in a few seconds.

```
GET https://mastertools--youtube-transcripts.apify.actor/?url=https://www.youtube.com/watch?v=aircAruvnKk
Authorization: Bearer <YOUR_APIFY_TOKEN>
```

The answer has the same rows as the dataset. You can also:

- add `language`, `chunkSeconds`, `includeSegments=false`, `maxVideos` or `publishedAfter` as query parameters;
- use `search=` instead of `url=`;
- POST the same JSON as the Actor input.

### Integrations

The Actor works with Google Sheets, Make, Zapier, n8n, Airbyte, LangChain, LlamaIndex, webhooks and the Apify API. To get every new video of the channels you follow, schedule a run with `publishedAfter: "1 day"`.

### FAQ

**Is this a YouTube transcript API?** Yes. Call it through the Apify API, from any language or tool. For a single video, the Standby endpoint answers in a few seconds.

**Which languages are supported?** Every language YouTube has captions for. By default you get the language spoken in the video. Set `language` to pick another one; the row also lists all available languages.

**What are auto-generated captions?** YouTube makes them by speech recognition when the creator did not upload their own. The `isAutoGenerated` field tells you which kind you got. Creator captions are always taken first.

**Can I download subtitles as SRT or VTT?** Yes. Set `subtitlesFormat` to `srt` or `vtt`, and every row gets a ready subtitle file as text.

**Can I get transcripts of a whole channel or playlist?** Yes. Paste the channel or playlist link and set `maxVideos` to how many videos you need.

**Does it work with Shorts and live recordings?** Yes. Paste `/shorts/` and `/live/` links, or a channel's `/shorts` and `/streams` pages.

**Can I follow channels and get only new videos?** Yes. Set `publishedAfter` to `1 day` or `7 days` and schedule the Actor.

**Do I need a YouTube account or API key?** No. Paste links and press Start.

**Why does a video have no transcript?** There are a few reasons:

- the creator turned captions off;
- YouTube has not made auto-captions yet;
- the stream is still live;
- the video is private or age-restricted.

The row tells you which one it is.

### Need YouTube data at scale?

We can build any of these for you:

- daily transcripts of thousands of channels;
- a pipeline into your CRM, data warehouse or vector database;
- a custom scraper for another video platform.

# Actor input Schema

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

Videos, Shorts, live recordings, playlists or channels — one per line. Video IDs and @handles work too. A channel link gives its newest videos; add /shorts or /streams to the link for Shorts or live recordings.

## `searchQueries` (type: `array`):

Optional. Search phrases — you get transcripts of the top videos for each phrase.

## `maxVideos` (type: `integer`):

How many videos to take from each playlist, channel or search. Channels start from the newest video.

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

Optional. Language code or name, like en, es, pt-BR or German. Empty — the language spoken in the video. If a video has no transcript in this language, you get the spoken one and the list of available languages.

## `publishedAfter` (type: `string`):

Optional. Keep only fresh videos: a date like 2026-11-01 or a period like 7 days. Great for monitoring channels on a schedule.

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

Splits the transcript into pieces of about this many seconds, each with its chapter and a link to that moment — ready for RAG and embeddings. 0 turns chunks off.

## `includeSegments` (type: `boolean`):

Every caption line with its start and end time. Turn off for a lighter output.

## `subtitlesFormat` (type: `string`):

Also add the transcript as a ready subtitle file text: SRT or WebVTT.

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

Residential proxies are already set up and give the most reliable results. The default works for most users.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=aircAruvnKk"
  ],
  "searchQueries": [],
  "maxVideos": 10,
  "language": "",
  "chunkSeconds": 60,
  "includeSegments": true,
  "subtitlesFormat": "none",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

All rows of this run in the default dataset.

# 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=aircAruvnKk"
    ],
    "searchQueries": [],
    "maxVideos": 10,
    "language": "",
    "chunkSeconds": 60,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("mastertools/youtube-transcripts").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=aircAruvnKk"],
    "searchQueries": [],
    "maxVideos": 10,
    "language": "",
    "chunkSeconds": 60,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("mastertools/youtube-transcripts").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=aircAruvnKk"
  ],
  "searchQueries": [],
  "maxVideos": 10,
  "language": "",
  "chunkSeconds": 60,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call mastertools/youtube-transcripts --silent --output-dataset

```

## MCP server setup

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

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/0HmMKXGlZZigOjPjf/builds/fI4TzmAgXft1hLqgF/openapi.json
