# YouTube Transcript Scraper: Subtitles, Chapters & MCP (`kizukidata/youtube-transcripts`) Actor

Extract YouTube transcripts as text, Markdown, RAG chunks, SRT, or VTT with chapters and key moments. Use it for AI agents via MCP, or to find where a phrase is said. This unofficial tool downloads no video and runs no speech-to-text; no-caption rows are free. Not affiliated with YouTube or Google.

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

## Pricing

from $1.30 / 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/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, Chapters & MCP

Get the transcripts of YouTube videos as text your code or AI agent can use, without a login or API key. Use it for RAG pipelines, for finding where a phrase is said, and for subtitle files.

- Input: `videos`, `playlists`, or `channels`.
- Formats: plain `text`, timed `segments`, chapter-aware `markdown`, RAG `chunks`, `srt`, or `vtt`.
- Alongside the transcript: video metadata, and chapters, like and comment counts, and up to 5 `mostReplayed` moments with the words spoken in them, where YouTube provides them.
- Search with `find`, keep a time window with `startAt` and `endAt`, or cap length with `maxChars` and continue by passing the row's `nextStartSegment` as `startSegment`. An input that names no target (`{}`, or settings only) returns a built-in sample, the transcript of one video: at most 1 row, marked `isSample`, with no result charged (the run start fee still applies). The sample runs on the default settings and the default proxy: your other settings are not applied to it (a lower `maxItems` is).

This Actor does not download video or audio files or run speech-to-text on videos without captions. It is an unofficial tool and is not affiliated with, endorsed by, or sponsored by YouTube or Google.

### Sample row (shortened)

```json
{
    "id": "jGwO_UgTS7I",
    "videoId": "jGwO_UgTS7I",
    "url": "https://www.youtube.com/watch?v=jGwO_UgTS7I",
    "title": "Stanford CS229: Machine Learning Lecture 1 - Andrew Ng (Autumn 2018)",
    "channelName": "Stanford Online",
    "publishedAt": "2020-04-17",
    "durationSeconds": 4520,
    "language": "en",
    "captionKind": "manual",
    "chapterCount": 7,
    "mostReplayed": [
        { "rank": 1, "timestamp": "1:02:31", "intensity": 1, "text": "if you- um, if you're used to optimizing code..." }
    ],
    "text": "Welcome to CS229 Machine Learning...",
    "error": null
}
```

### Pricing and MCP

- Launch pricing: $1.50 per 1,000 transcripts on Free, down to $1.30 on the Gold tier, with every format included. Apify's Free plan ($5 monthly usage credit) covers about 3,300 transcripts, run start fees aside. Videos without captions, private videos, and `find` rows with no match are free. The full price table is further down this page.
- MCP connect URL: `https://mcp.apify.com?tools=fetch-actor-details,kizukidata/youtube-transcripts`

### Use cases

- **Agents that answer from videos.** Send a video and a question's keywords in `find`; the row lists each place they are said with a timestamp link, so the answer can cite the second it came from.
- **Clips and highlights.** `mostReplayed` gives the moments viewers replay most, already joined with the words said in them, so you do not need a second tool or to match timestamps by hand.
- **Brand and topic monitoring.** Name channels or playlists and a phrase; videos that mention it come back with the places, and videos that do not are not charged.
- **RAG and vector search.** `chunks` are cut between paragraphs and sentences and carry their start second.
- **Subtitles.** `srt` and `vtt` are ready-to-save subtitle files.
- **Channel research.** Name a channel and get its recent uploads; with **Only new videos**, a schedule returns only what is new.

### Switching from another YouTube transcript scraper

This Actor accepts common input field names used across YouTube transcript tools, so an existing workflow or schedule can switch by changing only the Actor name (`kizukidata/youtube-transcripts`). When the platform injects schema defaults before startup, if you pass both, an alias wins over a field left at its default.

#### Input field mapping

| Common input field names | Mapped to | Notes |
|---|---|---|
| `youtube_url`, `youtubeUrl`, `youtube_urls`, `youtubeUrls`, `video_url`, `videoUrl`, `video_urls`, `videoUrls`, `video`, `videoId`, `video_id`, `videoIds`, `video_ids`, `url`, `urls`, `startUrls`, `start_urls` | `videos` | Accepts strings, arrays, or `[{"url": "…"}]`. Playlist and channel links are routed automatically. |
| `channel`, `channel_url`, `channelUrl`, `channel_urls`, `channelUrls` | `channels` | Accepts handles, channel URLs, or channel IDs. |
| `playlist`, `playlist_url`, `playlistUrl`, `playlist_urls`, `playlistUrls` | `playlists` | Accepts playlist URLs or playlist IDs. |
| `language`, `lang`, `targetLanguage`, `target_language`, `subtitlesLanguage`, `captionLanguage`, `preferredLanguage`, `preferredLanguages`, `languageCode` | `languages` | Overrides the default `["en"]`. Captions are returned in the video's own languages and are never machine-translated. |
| `transcript_type`, `transcriptType`, `subType`, `captionType`, `prefer_manual` | `preferManual` | `"generated"` or `"auto"` sets `preferManual: false`; `"manual"`, `"any"`, or `"both"` keeps `preferManual: true`. |
| `output`, `outputFormat`, `outputFormats`, `output_formats`, `format`, `timestamps`, `includeTimestamps` | `formats` | Maps `"srt"`, `"vtt"`, `"text"` / `"singleStringText"`, `"json"` / `"captions"` (`["text", "segments"]`), and `"llm"` (`["markdown"]`). Setting `timestamps: false` returns `["text"]`. |
| `max_videos`, `maxVideos`, `max_results`, `maxResults`, `resultsLimit`, `limit` | `maxItems` | Caps the number of videos processed. |
| `proxy`, `proxyOptions`, `proxyConfig`, `proxy_configuration` | `proxyConfiguration` | Replaces the default proxy object when provided; a proxy you set yourself is kept. |

Optional toggles from other tools (such as `include_metadata`, `maxRetries`, `scrapeShorts`, `wordLevel`, `enableAiFallback`, or empty `searchKeywords: []`) are ignored without warnings next to a video, playlist or channel. A date range (`start_date`, `end_date`, `startDate`, `endDate`) and `list_only: true` are refused before anything is read or charged: this Actor does not filter videos by date and always returns transcripts, so running past them would return and charge videos you did not ask for. Remove the field, and name the videos or cap a channel or playlist with `maxItems`. The other fields that would change the result in the other tool (`translate_to`, `channel_transcripts`, `include_transcript_text`) have no effect here and are listed under "Unknown input fields were ignored" in the run output when the input also names a video, playlist or channel. An input that names none and holds such a field (or any field this Actor does not know) ends as invalid input: nothing is read or charged, and the sample video is not used. Search terms (`searchKeywords`, `searchQueries`, `search`, `queries`) are not supported because this Actor reads video, playlist, and channel URLs directly rather than searching YouTube: given alone they return an input error and charge nothing; given next to videos, channels or playlists they are listed as ignored and the run continues.

#### Existing JSON payloads that run as-is

Example using `startUrls`, `subType`, and `outputFormats`:

```json
{
    "startUrls": [{ "url": "https://www.youtube.com/watch?v=jGwO_UgTS7I" }],
    "languages": ["en"],
    "subType": "both",
    "outputFormats": ["json", "text", "srt"],
    "maxResults": 1
}
```

Example using `videoUrl` and `targetLanguage`:

```json
{
    "videoUrl": "https://www.youtube.com/watch?v=jGwO_UgTS7I",
    "targetLanguage": "en"
}
```

Output rows always use this Actor's field names (`text`, `segments`, `markdown`, `chunks`, `srt`, `vtt`), so update dataset field mapping in downstream steps.

#### Pricing and zero-charge failures

- Launch pricing starts at **$1.50 per 1,000 transcripts** on the Free tier (down to **$1.30** at Gold), plus a $0.00005 run start fee.
- Apify's Free plan ($5 monthly usage credit) covers about **3,300 transcripts** (run start fees aside).
- Videos without captions, private or removed videos, and any other failed `error` row are still written to the dataset with the reason and cost **$0**.

### What data can you get?

| Field | Description |
|---|---|
| `id`, `videoId`, `url` | The 11-character video ID (also the row ID) and `https://www.youtube.com/watch?v=<videoId>` |
| `title`, `channelId`, `channelName`, `publishedAt` | Video metadata: title, channel and the publication date (`YYYY-MM-DD`) |
| `durationSeconds`, `viewCount`, `description` | Length, views when the caption was read, and the description |
| `likeCount`, `commentCount`, `commentCountText` | Likes, and the comment count as a number and as YouTube shows it (`23K` is `23000`; exact below 1,000). `null` when hidden or not read |
| `chapters`, `chaptersSource`, `chapterCount` | The video's chapters (`start` in seconds, `title`). `chaptersSource` is `description` (written by the uploader) or `auto` (generated by YouTube) |
| `mostReplayed` | Up to 5 most replayed moments, most replayed first: `rank`, `start`, `end`, `timestamp`, `url` (the video opened at the moment), `intensity` (0-1), `labeledByYouTube` and `text` (what is said during the moment, up to 600 characters) |
| `heatmap` | The replay graph of the whole video: `intervalSeconds` and `values` (heights from 0 to 1 in time order, usually 100 points) |
| `signalsFetchedAt`, `signalsNote` | When the likes, comments, chapters and replay graph were read; or one sentence saying why they are missing |
| `matchCount`, `matches` | With `find`: how often the phrases are said, and each place (`phrase`, `start`, `end`, `timestamp`, `url`, `text` with the speech around it) |
| `text` | The transcript as **plain text** in paragraphs |
| `segments` | Timed captions: `start` (seconds), `duration`, `text` |
| `markdown` | Title, a metadata line, `##` chapter headings and paragraphs that each open with a timestamp link |
| `chunks` | RAG chunks: `index`, `start` (seconds), `chars`, `text` |
| `srt`, `vtt` | The transcript as a SubRip or WebVTT subtitle file |
| `segmentCount`, `chars`, `totalSegmentCount`, `totalChars` | The size of the transcript in this row, and of the video's whole caption track |
| `partial`, `truncated`, `nextStartSegment` | Whether the row holds part of the track, whether `maxChars` cut it, and the caption number to pass as `startSegment` to read on |
| `availableCaptions` | Every caption track the video has: `language`, `kind` (`manual` or `auto`) and the `name` YouTube shows |
| `language`, `captionKind` | Language code of the track used (`en`, `ja`, `pt-BR`…) and what it is: `manual` (written by a person) or `auto` (auto-generated by YouTube) |
| `languageRequested`, `languageReturned`, `languageNote`, `translated` | The language you asked for, the one that came back, and one sentence when they differ because the video has no track in your language. `translated` is always `false` |
| `error` | `null`, or `{type, message}` on an uncharged status row (no captions, private, removed, blocked and the other reasons below) |
| `cached`, `fetchedAt` | `true` when the caption came from the Actor's cache (read in the last 90 days), and when it was read |
| `isNew` | Only with `onlyNewItems`: whether the video is new since the previous run |
| `source` | `YouTube captions` |

Every row has every field except `isNew`. A transcript format you did not ask for in `formats` is `null` (`chunks` is empty). Comment text and commenter names are not collected.

### How to use YouTube Transcript Scraper

1. Put **Videos**, **Playlists** and/or **Channels** into the input. Any YouTube link works in **Videos**: a playlist or channel link placed there is read as what it is.
2. To get only part of each transcript, set **Find phrases**, a **time window** or **Maximum transcript characters**. Leave them empty for whole transcripts.
3. Pick the **formats** you need (default: `text` and `segments`) and the **caption language** order.
4. Run it and read the dataset.

An empty input (`{}`) returns the transcript of one sample video, free.

#### Input example: where is a phrase said?

```json
{
    "videos": ["https://www.youtube.com/watch?v=jGwO_UgTS7I"],
    "find": ["supervised learning"],
    "formats": ["text"],
    "maxItems": 1
}
```

#### Input example: a channel's new videos as Markdown and SRT

```json
{
    "channels": ["https://www.youtube.com/@TED"],
    "formats": ["markdown", "srt"],
    "onlyNewItems": true,
    "maxItems": 10
}
```

### Input

| Field | Default | What it does |
|---|---|---|
| `videos` | `[]` | Video URLs, Shorts links or 11-character IDs; up to 500. Playlist and channel links are accepted here too |
| `playlists` | `[]` | Playlist URLs or IDs; up to 20; the first 100 videos of each, in playlist order |
| `channels` | `[]` | Channel URL, `@handle`, `/c/` or `/user/` URL, or channel ID; up to 20; recent videos, newest first |
| `find` | `[]` | Words or phrases to look for (up to 20, not case-sensitive). Rows list the places in `matches`; a video where none is said returns `matchCount: 0` and is not charged |
| `findMode` | `snippets` | `snippets`: the transcript fields hold only the places the phrases are said. `filter`: they hold the whole transcript of each video that matches |
| `findContextSeconds` | `15` | Seconds of speech kept before and after each match (0 to 600) |
| `maxMatches` | `10` | Places described per video (1 to 100); `matchCount` counts all of them |
| `startAt`, `endAt` | none | A time window in seconds from the start of the video, applied to every video of the run |
| `maxChars` | `0` | Cut each transcript after this many characters of caption text, between two captions; `0` is no cap. A cut row has `truncated: true` and `nextStartSegment` |
| `startSegment` | `0` | Start at this caption number; pass a cut row's `nextStartSegment` to read on |
| `formats` | `["text", "segments"]` | Any of `text`, `segments`, `markdown`, `chunks`, `srt`, `vtt` |
| `languages` | `["en"]` | Caption languages, in order of preference (up to 10) |
| `preferManual` | `true` | Use human-written captions over auto-generated ones when both exist in the requested language |
| `includeSignals` | `true` | Add `mostReplayed`, `heatmap`, YouTube's `chapters`, `likeCount` and `commentCount`. No extra charge |
| `chunkSize` | `1500` | Characters per chunk (0 to 20,000); used when `formats` names `chunks` |
| `maxItems` | none — all named videos plus 20 from your playlists and channels; the Console form prefills 3 | Maximum rows written in one run, 1 to 500. Transcripts and status rows share the cap, so `maxItems: 3` with 100 videos named processes three. There is no default; the Console form prefills 3, so clear the field or raise it to take more. Named videos beyond the cap are not requested, are listed in `OUTPUT` as unchecked and are not charged |
| `onlyNewItems` | `false` | Return only videos that earlier runs with the same input have not returned |
| `maxConcurrency` | `3` | How many requests may run at once (1 to 3) |
| `proxyConfiguration` | Apify residential proxy | Proxy settings (country, groups, custom proxy URLs) |

#### Switching from another transcript Actor or script

See [Switching from another YouTube transcript scraper](#switching-from-another-youtube-transcript-scraper) above for the full input field mapping, existing JSON examples, pricing, and zero-charge failure rows.

### Output

One row per video the run processes, every field present. `error.type` is one of `login-required`, `no-captions`, `private`, `removed`, `live`, `region-restricted`, `age-restricted`, `members-only`, `paid`, `caption-unavailable`, `too-large`, `blocked`, `timeout`, `unavailable`. A video the run processes gets a row even when YouTube refuses it, and a status row is never charged.

#### Output example

One row of a real run (2026-11-13, answered from the cache) with `formats` naming `text`, `segments` and `markdown`: [Stanford CS229: Machine Learning Lecture 1 - Andrew Ng (Autumn 2018)](https://www.youtube.com/watch?v=jGwO_UgTS7I) (Stanford Online). `description`, `text`, `segments`, `markdown`, `mostReplayed` and `heatmap.values` are shortened here (the counts are the full ones); a run returns them in full, except that each `mostReplayed` text holds at most 600 characters.

```json
{
    "id": "jGwO_UgTS7I",
    "videoId": "jGwO_UgTS7I",
    "url": "https://www.youtube.com/watch?v=jGwO_UgTS7I",
    "title": "Stanford CS229: Machine Learning Lecture 1 - Andrew Ng (Autumn 2018)",
    "channelId": "UCBa5G_ESCn8Yd4vw5U-gIcg",
    "channelName": "Stanford Online",
    "publishedAt": "2020-04-17",
    "durationSeconds": 4520,
    "viewCount": 5048990,
    "description": "For more information about Stanford’s Artificial Intelligence professional and graduate programs, visit: https://stanford.io/ai\n\n…",
    "language": "en",
    "languageRequested": "en",
    "languageReturned": "en",
    "captionKind": "manual",
    "translated": false,
    "languageNote": null,
    "availableCaptions": [
        { "language": "en", "kind": "manual", "name": "English" },
        { "language": "en", "kind": "auto", "name": "English (auto-generated)" }
    ],
    "likeCount": 63091,
    "commentCount": 1300,
    "commentCountText": "1.3K",
    "chapters": [
        { "start": 0, "title": "Introduction" },
        { "start": 321, "title": "Teaching team introductions" },
        { "start": 402, "title": "Goals for the course and the state of machine learning across research and industry" },
        { "start": 609, "title": "Prerequisites for the course" },
        { "start": 713, "title": "Homework, and a note about the Stanford honor code" },
        { "start": 1017, "title": "Overview of the class project" },
        { "start": 1557, "title": "Questions" }
    ],
    "chaptersSource": "description",
    "chapterCount": 7,
    "mostReplayed": [
        {
            "rank": 1,
            "start": 3751.6,
            "end": 3842,
            "timestamp": "1:02:31",
            "url": "https://www.youtube.com/watch?v=jGwO_UgTS7I&t=3751s",
            "intensity": 1,
            "labeledByYouTube": true,
            "text": "if you- um, if you're used to optimizing code, right? Making code run faster, I'm not sure if you have done that. …"
        },
        {
            "rank": 2,
            "start": 2486,
            "end": 2621.6,
            "timestamp": "41:26",
            "url": "https://www.youtube.com/watch?v=jGwO_UgTS7I&t=2486s",
            "intensity": 0.786,
            "labeledByYouTube": false,
            "text": "So maybe your house has a size, you know, of that amount on the horizontal axis. …"
        }
    ],
    "heatmap": { "intervalSeconds": 45.2, "values": [0.121, 0.124, 0.055, 0.046, 0.161, 0.206, 0.23, 0.164] },
    "signalsFetchedAt": "2026-11-13T14:07:55.859Z",
    "signalsNote": null,
    "segmentCount": 1464,
    "chars": 69876,
    "totalSegmentCount": 1464,
    "totalChars": 69876,
    "partial": false,
    "truncated": false,
    "nextStartSegment": null,
    "matchCount": null,
    "matches": [],
    "text": "Welcome to CS229 Machine Learning. Uh, some of you know that this class has been taught at Stanford for a long time. …",
    "segments": [{ "start": 3.1, "duration": 3.3, "text": "Welcome to CS229 Machine Learning." }],
    "markdown": "# Stanford CS229: Machine Learning Lecture 1 - Andrew Ng (Autumn 2018)\n\n[Watch on YouTube](https://www.youtube.com/watch?v=jGwO_UgTS7I) · Stanford Online · published 2020-04-17 · 1:15:20 · en (manual)\n\n## 0:00 Introduction\n\n[0:03](https://www.youtube.com/watch?v=jGwO_UgTS7I&t=3s) Welcome to CS229 Machine Learning. …\n\n## 5:21 Teaching team introductions\n\n[5:21](https://www.youtube.com/watch?v=jGwO_UgTS7I&t=321s) There's a class coordinator. …",
    "chunks": [],
    "srt": null,
    "vtt": null,
    "cached": true,
    "fetchedAt": "2026-11-13T14:07:52.367Z",
    "error": null
}
```

The same video with `"find": ["supervised learning"]` and `"maxMatches": 2` returns `matchCount: 15`, `partial: true`, `chars: 951` instead of 69,876, and these `matches` (texts shortened):

```json
[
    {
        "phrase": "supervised learning",
        "start": 2371.2,
        "end": 2376.5,
        "timestamp": "39:31",
        "url": "https://www.youtube.com/watch?v=jGwO_UgTS7I&t=2371s",
        "text": "… And so in the next 10 weeks, you'll learn about a variety of these different tools. Um, and so the first of them and the most widely used one is supervised learning. …"
    },
    {
        "phrase": "supervised learning",
        "start": 2421.5,
        "end": 2423.2,
        "timestamp": "40:21",
        "url": "https://www.youtube.com/watch?v=jGwO_UgTS7I&t=2421s",
        "text": "… So the most widely used machine learning tool is, uh, today is supervised learning. Actually, let me check, how, how many of you know what supervised learning is? …"
    }
]
```

A video without a transcript returns the same shape with `error` set and the text fields `null` (shortened here):

```json
{
    "id": "aqz-KE-bpKQ",
    "videoId": "aqz-KE-bpKQ",
    "error": { "type": "no-captions", "message": "This video has no caption track" },
    "text": null,
    "segments": null,
    "markdown": null,
    "chunks": [],
    "mostReplayed": [],
    "matches": []
}
```

### Find, time windows and maxChars

- **`find`** looks for each phrase in the caption track without regard to case, also across two captions. It is a text match, not a semantic search: pass short keywords, not a whole question. In languages written with spaces a phrase matches whole words (`art` does not match `start`); in Japanese, Chinese, Korean and Thai it matches anywhere. `matchCount` counts every place, each phrase on its own; `matches` describes up to `maxMatches` of them, and a phrase repeated inside a place already listed is not listed twice. Typographic quotes and dashes match their plain forms (`don't` finds `don’t`).
- **`snippets`** (default) keeps only the places described in `matches` in `text`, `segments`, `markdown`, `chunks`, `srt` and `vtt`, with `findContextSeconds` of speech on each side. When `matches` holds exactly `maxMatches` entries, raise `maxMatches` to get the rest (`matchCount` can stay larger, because a phrase said again inside a listed place is counted but not listed again). **`filter`** keeps the whole transcript of every video in which a phrase is said.
- A video in which no phrase is said returns a row with `matchCount: 0`, its metadata and no transcript. That row is **not charged**.
- **`startAt` and `endAt`** keep the captions said inside the window. With `find`, phrases are looked for inside the window only.
- **`maxChars`** cuts between two captions and always keeps at least one. The row says `truncated: true` and gives `nextStartSegment`; run again with `startSegment` set to it to read on. Each part starts exactly where the last one ended, with no caption returned twice. It counts caption text (the row's `chars`) and decides which captions every format holds; `markdown`, `srt` and `vtt` are longer by their timestamps and headings, and the rest of the row is not bounded.
- A row with no transcript text (no phrase said, or nothing said inside the window) is **not charged**.
- The order is fixed: `startSegment`, the window, then `find`, then `maxChars`.

### Most replayed moments and chapters

- `mostReplayed` starts with the ranges YouTube itself marks "Most replayed" (`labeledByYouTube: true`) and adds the highest remaining peaks of the replay graph, up to 5 in total, ranked by the graph's height. The first seconds of a video are high on almost every graph, because every view starts there, so a peak is not read off them.
- `text` in a moment is what is said during it in this row's caption track, even when the row itself holds only a selection.
- YouTube shows a replay graph only for videos with enough views. A video without one returns `mostReplayed: []` and `heatmap: null`; that is not an error.
- `chapters` are the ones YouTube shows on the progress bar. When they were not read, they come from the description's timestamp lines (at least three lines shaped like `0:00 Title`, the first at `0:00`).
- If YouTube does not answer for these fields, the row still returns its transcript, is charged as a transcript, and says so in `signalsNote`.
- Rows answered from the cache carry the likes, comments and replay graph of the day the caption was read (`signalsFetchedAt`).

### Which caption comes back

A YouTube video can have **human-written** caption tracks in any number of languages and one **auto-generated** track, which YouTube makes in the language that is spoken.

1. For each language in `languages`, in order, the Actor looks for a track in that language. When the video has one, it is used: the human-written track first, or the auto-generated one when `preferManual` is off.
2. When the video has no track in any language you named, the Actor returns its auto-generated track (the spoken language), or its first track when it has no auto-generated one. `languageNote` says so.

The row always tells you which language you asked for (`languageRequested`), which language the text is in (`languageReturned`) and what kind it is (`captionKind`). The Actor never asks YouTube for a machine translation, so `translated` is always `false`. A video with no captions at all returns the status row `no-captions`, not charged.

### Only new videos

`onlyNewItems` keeps a per-input state record (the videos, playlists and channels named, the language order, `preferManual`, and `find` and the time window when set) in a named key-value store of your Apify account. It records a video only after its charged row was written, keeps entries for 90 days, and does not remember status rows, so those videos are checked again. With `find`, a video in which no phrase is said is left out of the dataset and checked again on the next run (from the cache, without a request). A video an earlier run delivered is skipped **before** anything is fetched for it. A run with nothing new returns and charges nothing. Do not run the same input concurrently: both runs read the old state and both return the same new videos.

Captions are cached automatically, so a repeat request for the same video is served without a request to YouTube: the row says `cached: true` and `fetchedAt` is the day the caption was first read. Those rows are charged like any other, because the transcript is delivered. A status row is never stored, so it is fetched again next time.

### How much does it cost?

YouTube Transcript Scraper uses **pay-per-event** pricing: you pay per transcript it returns plus a run start fee (see below), not for the time the run takes. At the Free tier 1,000 transcripts cost $1.50; at Gold, $1.30.

| Apify plan (discount tier) | Price per 1,000 transcripts | Price per transcript |
|---|---|---|
| **Free** | $1.50 | $0.0015 |
| **Starter (Bronze)** | $1.40 | $0.0014 |
| **Scale (Silver)** | $1.35 | $0.00135 |
| **Business (Gold)** | $1.30 | $0.0013 |

Apify's Free plan includes USD 5 of monthly usage, which covers about 3,300 transcripts at the Free tier price, run start fees aside.

- **Run start fee**: USD 0.00005 per GB of memory per run (USD 0.00005 at this Actor's default 512 MB).
- One price covers everything in the row: every format, the most replayed moments, chapters, likes and comment count. There is no separate metadata charge.
- A transcript is charged once per video per run, whatever part of it the row holds. Reading one video in several parts (`maxChars` with `startSegment`), or asking for it again in a later run, charges one transcript each time.
- Videos without a transcript, private or removed videos and other status rows are returned with a reason code but are **not charged**. Neither is a video in which none of your `find` phrases is said, or one in which nothing is said inside your time window.
- Videos beyond `maxItems` are not requested and **not charged**. `maxItems` always caps the run at the number you set; leave it out to take every video you named plus up to 20 from your playlists and channels (the Console form prefills 3).

### Use with AI agents (MCP)

YouTube Transcript Scraper works as a tool for AI agents such as Claude, Cursor and n8n agents through the Apify MCP server. Load this Actor, plus the tool that reads its input schema and pricing, with this server URL:

```text
https://mcp.apify.com?tools=fetch-actor-details,kizukidata/youtube-transcripts
```

- **Claude Code**: run `claude mcp add apify "https://mcp.apify.com?tools=fetch-actor-details,kizukidata/youtube-transcripts" -t http`.
- **Claude (web or desktop app)**: open **Customize → Connectors**, choose **Add custom connector**, name it `Apify` and paste the server URL above.
- **Cursor**: add the server to `~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project):

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

- **n8n**: add the Apify node (on self-hosted n8n, install the community package `@apify/n8n-nodes-apify`) and choose **Run an Actor and get dataset**; for an n8n AI Agent, add **Apify Tool** as a tool.

The server signs you in to Apify with OAuth. A client that cannot use OAuth can send your Apify API token in an `Authorization: Bearer <APIFY_TOKEN>` header instead.

#### What to send from an agent

Keep the row small, because the whole row goes into the model's context:

- To answer a question about a video, send `videos`, the question's keywords in `find` and `"formats": ["text"]`. Read `matches`.
- To read a long video in parts, send `"formats": ["text"]` with `"maxChars": 8000`, then repeat with `startSegment` set to the row's `nextStartSegment` while `truncated` is `true`. Each part is charged as one transcript.
- To find the highlights, read `mostReplayed`; each moment already carries the first 600 characters of what is said in it, so add `"formats": ["text"]` and a small `maxChars` (for example 200) when the transcript itself is not needed.
- Always set `maxItems`. It bounds the rows written, and only transcripts are charged.

### Integrations and API

Run the Actor from your own code or from an automation tool. The examples use the Actor's name in the Store, `kizukidata/youtube-transcripts`; replace `<APIFY_TOKEN>` with your API token.

#### Zapier, Make and n8n

Use the Apify integration, choose **Run Actor**, and pass `videos`, `playlists` or `channels` plus `maxItems`. Add **Get dataset items** and map `title`, `videoId`, `text`, `mostReplayed`, `language` and `error` to your document store, CMS or LLM step. For a channel, set `onlyNewItems: true` and use the new rows as the trigger.

#### LangChain

Load the returned rows as documents: ask for `"formats": ["markdown", "chunks"]`, use `markdown` as `page_content` and `title`, `url`, `channelName` and `chapters` as metadata. The `chunks` array can be embedded directly without a second splitter; `ApifyDatasetLoader` from the Apify LangChain integration works with the run's dataset ID.

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/kizukidata~youtube-transcripts/runs" \
  -H "Authorization: Bearer <APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"videos":["https://www.youtube.com/watch?v=jGwO_UgTS7I"],"find":["supervised learning"],"formats":["text"],"maxItems":1}'
```

Poll `GET https://api.apify.com/v2/actor-runs/<RUN_ID>` for the status, read `defaultDatasetId`, then fetch `GET https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=json`.

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("kizukidata/youtube-transcripts").call(run_input={"videos": ["https://www.youtube.com/watch?v=jGwO_UgTS7I"], "maxItems": 1})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["chars"], [m["timestamp"] for m in item["mostReplayed"]])
```

#### JavaScript

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('kizukidata/youtube-transcripts').call({ videos: ['https://www.youtube.com/watch?v=jGwO_UgTS7I'], formats: ['srt'], maxItems: 1 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].srt);
```

### Limitations

- **Unofficial and independent.** This is an **unofficial** Actor: it is an independent tool, **not affiliated with, endorsed by or sponsored by** YouTube or Google. It needs no login, no API key and no browser, and it never downloads video or audio.
- **No login, no cookies and no CAPTCHA workaround.** A video that needs a sign-in returns `login-required`. An age gate returns `age-restricted`, a members-only video returns `members-only`, a rental or purchase returns `paid`, and the video's own privacy setting returns `private`; all are reported as uncharged status rows.
- **No video or audio download** and no speech-to-text step: a video without a caption track returns `no-captions`. A live stream with no usable track is `live`, a video you can no longer watch is `removed` or `unavailable`, and a track that comes back empty is `caption-unavailable`.
- **No machine translation.** A video with no track in your language returns its own track in the spoken language, and `languageNote` says so. When a video has several tracks in one language, the first one YouTube lists is returned; `availableCaptions` names them all.
- **Playlists** return their first 100 videos. Mixes generated per viewer are not playlists and are not read.
- **Comment counts above 999 are rounded by YouTube** (`23K`). Like counts are exact unless the uploader hides them.
- **Region-restricted videos** depend on the proxy country; set `apifyProxyCountry` in `proxyConfiguration` when you know the video is available in one country.
- A channel or playlist input is bounded by `maxItems` (20 in total when it is left out, read one by one, so the first can fill the cap).
- Descriptions and captions are YouTube's own text; the Actor keeps the wording and only groups it into paragraphs and chunks.

### FAQ

#### How long does a run take?

A single video is usually a few seconds: the caption track and the video's public metadata, not the video. A video read before is answered from the cache in about two seconds. A channel or playlist takes longer because its video list is read first and each video is fetched in turn.

#### Why is a row `cached: true`?

The same video and language were read in the last 90 days, so the caption came from the cache without a request. The transcript is still delivered, so the row is charged like any other.

#### Why did a video come back with `error`?

`no-captions` means there is no caption track, `login-required` means YouTube asked for a sign-in, `private`, `age-restricted`, `members-only` and `paid` are the video's own settings, and `region-restricted` depends on the proxy country. `removed` is a video YouTube took down, `live` is a live stream (or its recording) with no usable caption track, `too-large` is an answer too big to read in one run, and `blocked` / `timeout` mean YouTube refused or did not answer after the retries. None of these rows is charged, and the next run tries the video again.

#### Why is `mostReplayed` empty?

YouTube shows a replay graph only once a video has enough views, and not for very new videos. When `signalsNote` is `null` and `includeSignals` is on, the video simply has no graph yet.

#### I asked for English and got Japanese text. Why?

The video has no caption track in English, so the Actor returned the video's own track in the spoken language instead: `languageReturned` is `ja`, and `languageNote` says the video has no track in the language you asked for. Add more codes to `languages` to choose the fallback yourself.

#### Can I get only new videos of a channel?

Yes: set `onlyNewItems` to `true`, save the input as a Task and schedule it. See **Only new videos**.

#### Can I reuse or republish these transcripts?

The Actor reads what YouTube shows for a public video: its caption track, and the chapters, replay graph and like and comment counts next to the player. It does not download the video and does not log in. Transcripts are third-party content: check the rights before republishing them. Transcripts, descriptions and channel names can contain personal data (a speaker's name, a phone number read out in the talk, a channel owner's name), which can be personal data under the GDPR and similar laws; handle it accordingly. This is not legal advice.

### Related Kizuki Actors

Other Actors from Kizuki that work well with this one:

- [YouTube Channel Scraper & Monitor](https://apify.com/kizukidata/youtube-channel-monitor) — watches a channel's new videos and returns views, likes, length and the newest comments; feed its video IDs here to get the transcripts.
- [URL to Markdown](https://apify.com/kizukidata/url-to-markdown) — the article or page around a video as clean Markdown.
- [PDF to Markdown Extractor](https://apify.com/kizukidata/pdf-to-markdown) — PDFs as page-numbered Markdown, so one RAG corpus can take transcripts, web pages and PDFs the same way.
- [YouTube Playlist Scraper](https://apify.com/kizukidata/youtube-playlist-chapters-scraper) — one row per playlist video with chapters, most replayed moments and an optional transcript.
- [YouTube Comments Scraper](https://apify.com/kizukidata/youtube-comments-scraper) — top or newest comments and reply rows of videos, Shorts and channels, with `onlyNewItems` for scheduled runs.
- [YouTube Shorts Scraper](https://apify.com/kizukidata/youtube-shorts-search) — Shorts by keyword, channel or URL, with view counts, hashtags and optional transcripts.
- [YouTube Email Scraper](https://apify.com/kizukidata/youtube-creator-contact-scraper) — creator emails, link-in-bio pages, websites, contact forms, booking links and socials by channel or keyword.

### Your feedback

Bugs, a video whose chapters, moments or matches came out wrong, and feature requests go to the Actor's **Issues** tab in Apify Console. A channel owner who wants a channel left out can open an Issue with the channel URL; we review it and, when it comes from the channel's owner, leave the channel out in a later build. A third party's request is not enough.

# Actor input Schema

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

YouTube watch, youtu.be, Shorts, playlist, or channel URLs or 11-char IDs (up to 500). Naming no target reads 1 sample video: a free sample of at most 1 row (marked isSample).

## `playlists` (type: `array`):

Playlist URLs (/playlist?list=) or IDs, up to 20. Reads first 100 videos per playlist (capped by maxItems, or 20 total without maxItems).

## `channels` (type: `array`):

Channel URLs (/channel/, @handle, /c/, /user/) or IDs, up to 20. Reads newest videos first (capped by maxItems, or 20 total without maxItems).

## `find` (type: `array`):

Up to 20 case-insensitive words or phrases to locate in transcripts. Text match, not semantic search: pass short keywords (pricing, open source), not a whole question. Fills matches; no-match videos are free.

## `findMode` (type: `string`):

snippets (default): return only matched clips plus findContextSeconds. filter: return the full transcript of matching videos. Used with find.

## `findContextSeconds` (type: `integer`):

How many seconds of speech to keep before and after each place a phrase is said, from 0 to 600. Used only when find is set.

## `maxMatches` (type: `integer`):

Max matches listed in matches per video (1-100, default 10). matchCount still counts all occurrences; raise this if matches equals maxMatches.

## `startAt` (type: `integer`):

Start of time window in seconds from video start (e.g. 90 for 1:30). Includes any caption active at that second.

## `endAt` (type: `integer`):

Return only what is said up to this second (seconds from the start of the video), later than startAt. Leave empty to read to the end.

## `maxChars` (type: `integer`):

Cut caption text after this many chars (0 = full). Returns at least 1 caption, sets truncated: true and nextStartSegment for startSegment paging.

## `startSegment` (type: `integer`):

Caption index to start from (0 = beginning). Pass a truncated row's nextStartSegment with the same inputs and maxChars to continue reading.

## `formats` (type: `array`):

Output formats (default: text, segments): text, segments, markdown (chapters & timestamp links), chunks (RAG), srt, vtt. Unselected are null.

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

Up to 10 caption language codes in priority order (e.g. en, ja). Falls back to spoken auto-captions with languageNote; never machine-translated.

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

When a video has both in the requested language, take the human-written track. Turn it off to prefer the auto-generated track.

## `includeSignals` (type: `boolean`):

Include mostReplayed (with speech), heatmap, chapters, likeCount, and commentCount at no extra cost. Off = transcripts and description chapters only.

## `chunkSize` (type: `integer`):

Target characters per RAG chunk, split on paragraphs/sentences (0 = single chunk, 0-20000, default 1500). Used when formats includes chunks.

## `maxItems` (type: `integer`):

Max rows per run (1-500). No API default (Console prefills 3); omit for all named videos + 20 from playlists/channels. Only transcripts are charged.

## `onlyNewItems` (type: `boolean`):

Skip videos returned in earlier runs with the same input (state kept 90 days). Failed/no-caption rows retry; no-match find rows re-check later.

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

Concurrent requests (1-3, default 3). Set 1 for sequential requests; rate limits still apply. Cached captions send no request.

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

Defaults to Apify RESIDENTIAL proxies. Set apifyProxyCountry for region-restricted videos, or turn off for local tests.

## Actor input object example

```json
{
  "videos": [],
  "playlists": [],
  "channels": [],
  "find": [],
  "findMode": "snippets",
  "findContextSeconds": 15,
  "maxMatches": 10,
  "maxChars": 0,
  "startSegment": 0,
  "formats": [
    "text",
    "segments"
  ],
  "languages": [
    "en"
  ],
  "preferManual": true,
  "includeSignals": true,
  "chunkSize": 1500,
  "maxItems": 3,
  "onlyNewItems": false,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Transcript rows returned by this run, one per video.

## `runSummary` (type: `string`):

Status code, counters and skipped input entries of this 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 = {
    "videos": [],
    "playlists": [],
    "channels": [],
    "find": [],
    "findMode": "snippets",
    "findContextSeconds": 15,
    "maxMatches": 10,
    "maxChars": 0,
    "startSegment": 0,
    "formats": [
        "text",
        "segments"
    ],
    "languages": [
        "en"
    ],
    "preferManual": true,
    "includeSignals": true,
    "chunkSize": 1500,
    "maxItems": 3,
    "onlyNewItems": false,
    "maxConcurrency": 3,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("kizukidata/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 = {
    "videos": [],
    "playlists": [],
    "channels": [],
    "find": [],
    "findMode": "snippets",
    "findContextSeconds": 15,
    "maxMatches": 10,
    "maxChars": 0,
    "startSegment": 0,
    "formats": [
        "text",
        "segments",
    ],
    "languages": ["en"],
    "preferManual": True,
    "includeSignals": True,
    "chunkSize": 1500,
    "maxItems": 3,
    "onlyNewItems": False,
    "maxConcurrency": 3,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("kizukidata/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 '{
  "videos": [],
  "playlists": [],
  "channels": [],
  "find": [],
  "findMode": "snippets",
  "findContextSeconds": 15,
  "maxMatches": 10,
  "maxChars": 0,
  "startSegment": 0,
  "formats": [
    "text",
    "segments"
  ],
  "languages": [
    "en"
  ],
  "preferManual": true,
  "includeSignals": true,
  "chunkSize": 1500,
  "maxItems": 3,
  "onlyNewItems": false,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call kizukidata/youtube-transcripts --silent --output-dataset

```

## MCP server setup

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