# YouTube Transcript Scraper – Subtitles to Text for LLM & RAG (`inovaflow/youtube-transcript-scraper`) Actor

Turn any YouTube video, playlist or channel into clean, LLM-ready text. Full transcripts with timestamps, chapters and video details — 100+ caption languages, no login, no API key.

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

## Pricing

from $3.00 / 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.

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

If you have ever pasted a YouTube link into an AI assistant and been told "I can't watch videos", this is the missing piece. **YouTube Transcript Scraper** turns any YouTube video, playlist or channel into clean, plain text you can hand straight to an LLM, a RAG pipeline, a search index or a spreadsheet — with timestamps, chapters and the video's details attached. No YouTube login, no cookies, no API key.

- **Researchers & analysts** — read a 2-hour podcast in 10 minutes, quote it with timestamps.
- **AI builders** — feed transcripts to Claude, GPT or Gemini; build a knowledge base from a whole channel.
- **Marketers & creators** — repurpose videos into articles, newsletters and social posts; audit competitor channels.
- **Students & journalists** — searchable, citable text for lectures, interviews and talks.

### What does YouTube Transcript Scraper do?

It extracts the **transcript (subtitles / closed captions)** of YouTube videos and returns it as **LLM-ready text**. Give it one link or a thousand — single videos, Shorts, live-stream replays, entire playlists, whole channels, or a YouTube search query — and every video comes back as one clean row:

- **Plain text** — captions stitched into readable prose, "\[Music]"-style cues removed.
- **Timestamped segments** — `[00:12] …` lines and a `segments` array (start, duration, text) an AI can cite.
- **Chapters** — when the video has chapters, each chapter carries **its own slice of the transcript**, ready for section-by-section summaries.
- **Video details** — title, channel, duration, views, likes, publish date, category, description, thumbnail.
- **Language control** — pick any of 100+ caption languages, prefer human-made over auto-generated captions, and fall back to the original language automatically.
- **Subtitle files** — optional SRT / WebVTT text.
- **One combined markdown corpus** of the whole run for drag-and-drop into any LLM.

It works as a **YouTube transcript API**: call it from the Apify API, from any MCP client (Claude Desktop, Cursor, ChatGPT), or from Zapier / Make / n8n.

### Why use this YouTube transcript scraper?

- **Built for AI, not just for humans.** Most transcript tools give you a wall of caption fragments. This one gives you prose, timestamps *and* chapters — the three shapes LLM workflows actually need — plus a run-level markdown file with everything in it.
- **Whole channels and playlists in one run.** Paste `youtube.com/@channel` and get every video's transcript (newest first, capped by you).
- **Never lose a video silently.** Every requested video gets a row. If one has no captions, is private or was removed, the row says so in `status` and `error` — and you are not charged for it.
- **No login, no risk.** Nothing here touches your Google account. Public data only.
- **Fair, per-transcript pricing.** You pay only for transcripts actually delivered.
- **Apify platform included:** scheduling, webhooks, 20+ export formats, integrations, monitoring and a REST API for every run.

### What data does it extract?

| Field | Type | Description |
| --- | --- | --- |
| `text` | string | The full transcript as clean plain text |
| `timestampedText` | string | `[mm:ss] text` lines — cite a moment in the video |
| `segments` | array | `{ start, duration, text }` for every caption line |
| `chapters` | array | `{ title, startTime, startSeconds, endSeconds, text }` — the transcript split by the video's chapters |
| `title`, `channelName`, `channelUrl` | string | Video and channel identity |
| `duration`, `durationSeconds` | string, number | Video length |
| `publishedAt`, `viewCount`, `likeCount`, `category` | mixed | Video statistics and publish date |
| `description`, `keywords`, `thumbnailUrl` | mixed | Extra context for summaries and indexing |
| `language`, `languageName`, `isAutoGenerated` | mixed | Which caption track you received |
| `availableLanguages` | array | All caption tracks the video offers |
| `wordCount`, `characterCount` | number | Size — handy for token budgeting |
| `srt`, `vtt` | string | Optional subtitle files |
| `status`, `error` | string | `ok`, `no_transcript`, `unavailable` or `error`, with the reason |

### How to get a YouTube transcript

1. Open **YouTube Transcript Scraper** on Apify and click **Try for free**.
2. Paste one or more YouTube links — a video, a Shorts link, a playlist (`…/playlist?list=…`) or a channel (`youtube.com/@handle`). Bare video IDs work too.
3. Set the **transcript language** (default `en`). Leave everything else as is.
4. Click **Start**. Results appear in the **Output** tab within seconds; whole channels take a few minutes.
5. Download as **JSON, CSV, Excel, HTML or XML**, open the combined **TRANSCRIPTS.md**, or fetch the dataset through the API.

#### How to get transcripts for a whole YouTube channel

Paste the channel URL (`https://www.youtube.com/@3blue1brown`, `/channel/UC…` or `/c/…`) and set **Max videos per playlist / channel / search** — the newest videos are transcribed first. Add `/shorts` or `/streams` to the channel URL to target Shorts or live-stream replays instead of regular videos.

#### How to find videos by keyword

Use **YouTube search queries** instead of URLs: each query is searched on YouTube and the top matching videos are transcribed.

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

Pricing is **pay-per-event**: a small fee per run start plus **$0.003 per transcript delivered**. Videos with no captions, unavailable videos and failed fetches are **never charged**. A 100-video channel therefore costs about $0.30; the free Apify plan covers hundreds of transcripts a month. Proxy bandwidth is billed by Apify at your plan's rate — a typical video transfers well under 100 KB.

### Input

Only one field is required: **YouTube URLs**. Everything else has sensible defaults — see the **Input** tab for the full list. Useful options:

- **Transcript language** — a code such as `en`, `es`, `de`, `pt-BR`, `ja`; or `auto` for the video's original language.
- **Max videos per playlist / channel / search** — cap for bulk sources (default 50).
- **Include timestamped segments / Split by chapters / Include publish date, likes & category** — on by default; turn off for smaller rows.
- **Also produce subtitle files** — `srt`, `vtt`.
- **Keep a row for videos without a transcript** — on by default so nothing disappears silently.
- **Prefer auto-generated captions / Fall back to the original language** — fine-tune language behaviour.
- **Proxy configuration** — residential proxies are used by default because YouTube blocks most datacenter IPs.

Example input:

```json
{
    "startUrls": [
        { "url": "https://www.youtube.com/watch?v=aircAruvnKk" },
        { "url": "https://www.youtube.com/@3blue1brown" }
    ],
    "language": "en",
    "maxVideosPerSource": 20
}
```

### Output

Each video is one dataset item. Download it as JSON, CSV, Excel, HTML or XML, or read it via the API. Simplified 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",
    "duration": "18:40",
    "publishedAt": "2017-10-05T08:11:25-07:00",
    "viewCount": 24193162,
    "language": "en",
    "isAutoGenerated": false,
    "wordCount": 3357,
    "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. …",
    "timestampedText": "[00:04] This is a 3.\n[00:06] It's sloppily written and rendered at an extremely low resolution of 28x28 pixels, …",
    "segments": [{ "start": 4.22, "duration": 1.18, "text": "This is a 3." }],
    "chapters": [
        { "title": "Introduction example", "startTime": "00:00", "startSeconds": 0, "endSeconds": 67, "text": "This is a 3. It's sloppily written …" },
        { "title": "Series preview", "startTime": "01:07", "startSeconds": 67, "endSeconds": 162, "text": "Unless you've been living under a rock, …" }
    ],
    "availableLanguages": [{ "code": "en", "name": "English", "autoGenerated": false }, { "code": "de", "name": "German", "autoGenerated": false }]
}
```

A video without captions looks like this — still a row, still free:

```json
{ "videoId": "…", "status": "no_transcript", "error": "This video has no captions (neither manual nor auto-generated)", "title": "…", "availableLanguages": [] }
```

The run also stores two files in the key-value store: **`TRANSCRIPTS.md`** — every transcript of the run in one markdown document, chaptered where available — and **`OUTPUT`**, a JSON summary of what was delivered.

### Using the transcripts with an LLM

- **Summarise a long video:** pass `chapters[].text` one chapter at a time, then summarise the summaries.
- **Ask questions about a channel:** load `TRANSCRIPTS.md` into your assistant or chunk `text` by `segments` for a vector store — each chunk already has a timestamp you can link back to (`https://www.youtube.com/watch?v=ID&t=SECONDS`).
- **Budget tokens:** `wordCount` ÷ 0.75 is a good estimate of tokens per transcript.
- **From an MCP client:** add this Actor as a tool in Claude, Cursor or ChatGPT via Apify's MCP server and ask "get the transcript of <link>".

### Tips

- Keep the default **residential proxy**. Datacenter IPs are heavily rate-limited by YouTube; the Actor rotates automatically but will be slower.
- For very large channels, raise **Max concurrent videos** and split the job into several runs if you want results faster.
- Set **Transcript language** to `auto` when you want each video in its original language.
- Auto-generated captions have no punctuation; when a human-made track exists it is used first.

### FAQ

#### Does it need my YouTube account or an API key?

No. It reads the same public caption data a signed-out viewer can see. Nothing is logged in on your behalf.

#### Can it translate a transcript?

Not at the moment — YouTube currently restricts automatic caption translation for automated clients. You can request any caption track the uploader or YouTube has published (often a dozen or more languages) and translate the text with your LLM of choice.

#### Why does a video have `status: no_transcript`?

The uploader disabled captions and YouTube produced no automatic ones (common for music, very new uploads and some live streams). Live streams get captions after they end.

#### Are Shorts and live streams supported?

Yes — Shorts links and finished live streams work like any video. A stream that is still live returns `no_transcript` until it ends.

#### Is scraping YouTube transcripts legal?

Our Actors are ethical and do not extract any private user data. They only extract what the uploader has chosen to share publicly. Transcripts and video metadata are public information; make sure your use complies with YouTube's terms and applicable copyright law, and consult a lawyer if you are unsure.

### Support

Something off? Open an issue in the **Issues** tab and include the video URL and run ID. The **API** tab shows how to call this Actor from code or from any MCP-capable AI agent.

# Actor input Schema

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

Any mix of YouTube links: a video (`watch?v=…`, `youtu.be/…`, Shorts, embed, live), a playlist (`playlist?list=…`), or a whole channel (`/@handle`, `/channel/UC…`, `/c/name`). Bare 11-character video IDs and bare `@handles` work too. Playlists and channels expand to their videos (see "Max videos per playlist/channel").

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

Language code of the transcript you want, e.g. `en`, `es`, `de`, `pt-BR`, `ja`. Manual captions in that language are preferred over auto-generated ones. Use `auto` to take the video's original spoken language. If the language is not available, the original-language track is used instead (see advanced options).

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

Instead of (or in addition to) URLs, give search terms — the top matching videos are transcribed, up to "Max videos per playlist/channel" per query.

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

Cap for every playlist, channel or search query given above (newest videos first for channels). Single video links are always processed.

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

Adds `segments` (start, duration, text) and `timestampedText` ("\[00:12] …" lines an LLM can cite) to every row, next to the plain `text`.

## `includeChapters` (type: `boolean`):

When the video has chapters, adds `chapters` — each with its title, start time and its own slice of the transcript. Great for summarising long videos section by section.

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

Fetches the video's publish date, like count and category (one extra lightweight request per video). Title, channel, duration, views and description are always included.

## `subtitleFormats` (type: `array`):

Adds ready-to-save `srt` and/or `vtt` subtitle text to each row.

## `includeFailedVideos` (type: `boolean`):

Videos with no captions, private/removed videos and failures still get a row with `status` and `error` explaining why (never charged). Turn off to receive only successful transcripts.

## `preferAutoGenerated` (type: `boolean`):

By default manual (human-made) captions win over YouTube's auto-generated ones when both exist in your language. Turn on to prefer the auto-generated track.

## `fallbackToAnyLanguage` (type: `boolean`):

If the requested language is not available for a video, use its original spoken-language track instead (flagged as `isFallbackLanguage: true`). Turn off to get a `no_transcript` row instead.

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

How many videos are fetched in parallel. Higher is faster but rotates more IPs.

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

YouTube blocks most datacenter IPs, so residential proxies are the default. Keep it unless you have your own proxies.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=aircAruvnKk"
    }
  ],
  "language": "en",
  "maxVideosPerSource": 50,
  "includeTimestamps": true,
  "includeChapters": true,
  "includeMetadata": true,
  "subtitleFormats": [],
  "includeFailedVideos": true,
  "preferAutoGenerated": false,
  "fallbackToAnyLanguage": true,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One row per video: plain text, timestamped segments, chapters, language and video details.

## `corpus` (type: `string`):

Every delivered transcript in one markdown file, chaptered where available — paste it straight into an LLM or a RAG pipeline.

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

Counts: transcripts delivered, videos without captions, unavailable or failed, total words.

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

// Run the Actor and wait for it to finish
const run = await client.actor("inovaflow/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=aircAruvnKk" }],
    "language": "en",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("inovaflow/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=aircAruvnKk"
    }
  ],
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call inovaflow/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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