# YouTube Transcript, Subtitles & Captions Scraper (`verbatim-labs/youtube-transcript`) Actor

YouTube transcript, subtitles and captions for videos, Shorts, channels, playlists or search. Get each video transcript in any language, with timestamps, SRT/VTT, chapters, RAG-ready chunks or translation. You pay only for transcripts delivered. Videos with no captions, and failed videos, are free.

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

## Pricing

from $4.00 / 1,000 transcript delivereds

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, Subtitles & Captions Scraper

Get the YouTube transcript, subtitles and captions of any video as clean text or timestamps: one video transcript row per video, $4.00/1k, failed videos free. **In:** YouTube video/Shorts/live URLs or IDs, channels, playlists, searches, or a dataset. **Out:** one row per video: transcript `text`, optional timestamped segments, SRT/VTT, chapters, RAG chunks, translation, metadata, and a `status`/`errorCode` saying why a row is empty.

**Pricing:** one `transcript` event per delivered transcript: **$4.00/1k on every plan**. Plus **$0.00005 per run** (start fee, dry runs too). Add-on: `translateTo` costs **$0.002 per translated video**. Free: every row not `status: "ok"`, same-language/failed translations, date/`onlyNew`-skipped videos, and `dryRun` preview rows. With `allLanguages`, each extra language delivered is one more transcript.

### Quick start (input -> output)

1. One video: `{"urls": ["https://www.youtube.com/watch?v=t4wsYSDeZC4"]}`
   -> `{"videoId": "t4wsYSDeZC4", "status": "ok", "language": "en", "captionType": "auto", "text": "...", "wordCount": 912, "charged": true}`
2. Channel, newest 50, RAG chunks: `{"urls": ["@veritasium"], "maxVideosPerSource": 50, "chunkWords": 500}`
   -> each row `"chunks": [{"index": 0, "start": 0.0, "end": 181.2, "text": "..."}]`
3. Spanish, else English, with SRT: `{"urls": ["dQw4w9WgXcQ"], "languages": ["es", "en"], "subtitleFormat": "srt", "includeSegments": true}`
   -> `{"language": "es", "isPreferredLanguage": true, "srt": "1\n00:00:00,000 --> ...", "segments": [{"start": 0.0, "end": 2.4, "text": "..."}]}`
4. Translate to English: `{"urls": ["https://youtu.be/VIDEO_ID"], "translateTo": "en"}`
   -> `{"language": "de", "text": "...", "translationStatus": "ok", "translatedLanguage": "en", "translatedText": "..."}`
5. Cost preview ($0.00005): `{"urls": ["@mkbhd"], "maxVideosPerSource": 200, "dryRun": true}`
   -> rows with `status: "preview"` (metadata + `availableLanguages`, no text); `OUTPUT.estimate.estimatedUsd`

### Input (need `urls`, `searchQueries`, `datasetId` or `items`)

| Field | Default | Meaning |
|---|---|---|
| `urls` | | Videos, Shorts, IDs, channels (`@x`, `/channel/UC..`, `/c/`, `/user/`), playlists |
| `searchQueries` | | YouTube searches; top `maxVideosPerSource` each |
| `maxVideosPerSource` | 25 | Cap per channel/playlist/search (1-20000) |
| `channelContent` | `videos` | `videos`, `shorts` (latest 100), `streams`, `all` |
| `newerThan` / `olderThan` | | `YYYY-MM-DD` window; outside it = skipped, free |
| `languages` | `["en"]` | Ordered preference; `[]`/`"original"` = spoken language |
| `fallbackToOriginalLanguage` | true | No match -> spoken language (`isPreferredLanguage: false`); off -> free `NO_CAPTIONS_IN_LANGUAGE` |
| `preferManualCaptions` | true | Human before auto captions |
| `allLanguages` / `maxLanguages` | false / 30 | Every other language in `otherLanguages` (each billed) |
| `translateTo` | | Target code (`en`, `pt-BR`...); +$0.002/video |
| `includeSegments` | false | `segments: [{start, end, text}]` |
| `subtitleFormat` | `none` | `srt`, `vtt`, `both` |
| `includeDescription` | true | `description`, `keywords` |
| `includeChapters` | true | `chapters: [{start, end, title, text}]` |
| `includeMostReplayed` | false | `mostReplayed`: YouTube's Most replayed graph with the transcript text of each peak (no extra charge) |
| `chunkWords` | 0 | `chunks` of ~N words (300-800 for RAG) |
| `onlyNew` / `historyKey` | false / `default` | Skip already-delivered videos (per history) |
| `maxVideos` | 0 | Run cap (0 = none); date-filtered videos don't count; max charge also respected |
| `dryRun` | false | Preview + cost estimate ($0.00005 run start only) |
| `datasetId` / `items` / `datasetField` | | Rows from a dataset or inline; URL in `url`/`videoUrl`/`inputUrl`/`link`/`videoId`/`id` or `datasetField`; echoed as `inputItem` |

Other actors' field names (`videoUrls`, `startUrls`, `maxItems`, `publishedAfter`...) also work.

### Output essentials

Row keys: `videoId`, `url`, `status`, `errorCode`, `retryable`, `charged`, `chargedUsd`, `title`, `channelName`, `publishDate`, `durationSec`, `language`, `captionType`, `isPreferredLanguage`, `availableLanguages`, `text`, `wordCount`, optional fields above, `translatedText`/`translationStatus`.

Branch on `status` + `errorCode`, not `error` text. Only `ok` is charged.

- `ok`; `preview` (dry run)
- Not retryable: `no_captions` (`NO_CAPTIONS`, `NO_CAPTIONS_IN_LANGUAGE`), `unavailable` (`NOT_FOUND`, `PRIVATE`, `AGE_RESTRICTED`, `MEMBERS_ONLY`, `LOGIN_REQUIRED`), source rows `CHANNEL_NOT_FOUND`, `PLAYLIST_NOT_FOUND`
- Retryable (`retryable: true`): `unavailable` (`LIVE_NOW`, `UPCOMING`, `REGION_BLOCKED`), `blocked` (`RATE_LIMITED`; run row `FALLBACK_LIMIT_REACHED`), `error` (`EMPTY_CAPTIONS`, `UPSTREAM_ERROR`, `INTERNAL`, `MAX_CHARGE_REACHED`, `BILLING_UNAVAILABLE`), source `LIST_FAILED`

Key-value store: `OUTPUT` = run summary (`byStatus`, `byErrorCode`, `byLanguage`, `chargedUsd` (per result), `startFeeUsd`, `totalChargedUsd`, `notStarted`, dry-run `estimate` (`estimatedUsd` incl. run start), `tip` + `tipLevel`: one sentence of advice when anything wasn't delivered).

***

### Why this one

| | Typical transcript scraper | This actor |
|---|---|---|
| Run says "succeeded" but rows are empty | Happens, and you still pay | Every row has `status` + `errorCode`; anything not `ok` is free |
| Knowing what you were billed | Per-result pricing you have to decode | `charged` and `chargedUsd` on every row |
| Inputs | One video URL | Videos, Shorts, live, IDs, channels (@handle, UC…, /c/, /user/), playlists, searches, another actor's dataset |
| Languages | One code, often ignored | Ordered preference list, falling back to the spoken language, or **every language in one row** |
| Chapters | No | `chapters` with the transcript split per chapter |
| Most replayed moments | No | `mostReplayed`: YouTube's Most replayed graph, its peaks with the words spoken in each, and the least replayed stretches |
| LLM / RAG | One big string | `text`, timestamped `segments`, or `chunks` of N words with timestamps |
| Try before you pay | No | `dryRun`: preview of metadata, caption languages and a cost estimate for just the $0.00005 run start |
| Monitoring a channel | Re-fetches and re-bills everything | `onlyNew` skips videos you already got; `newerThan` / `olderThan` date window |
| Switching from another actor | Rewrite your input | Your old input field names work as they are (see below) |

### Input in detail

| Input | Example |
|---|---|
| Video, Shorts or live URL, or a bare ID | `https://youtu.be/dQw4w9WgXcQ`, `youtube.com/shorts/…`, `dQw4w9WgXcQ` |
| Channel (newest first) | `@mkbhd`, `youtube.com/@mkbhd/shorts`, `/channel/UC…`, `/c/…`, `/user/…` |
| Playlist | `youtube.com/playlist?list=PL…` |
| Search | `searchQueries: ["how do index funds work"]` |
| Another actor's dataset | `datasetId`, or rows inline in `items` (Make, n8n, agents). Every row comes back as `inputItem` so you can join on your own IDs |

- `maxVideosPerSource` caps each channel, playlist or search, and `maxVideos` caps the whole run.
- `channelContent` picks Videos, Shorts, past live streams or everything. A tab in the URL (`/shorts`, `/streams`) overrides it.
- A video that appears in several sources is fetched and charged once.
- `newerThan` drops older videos before their captions are fetched, so they cost nothing and are not output. `olderThan` does the same for newer videos.

```json
{
  "urls": ["@veritasium", "https://www.youtube.com/watch?v=t4wsYSDeZC4"],
  "maxVideosPerSource": 50,
  "languages": ["en"],
  "includeSegments": true,
  "chunkWords": 500
}
```

#### Coming from another YouTube transcript actor?

Paste your existing input. These field names are accepted as they are. If both your old name and ours are set, ours wins.

| Your field | Means here |
|---|---|
| `videoUrls`, `videoUrl`, `startUrls`, `youtube_url`, `video_ids`, `channelUrls`, `channel_url`, `channel`, `playlistUrls` | `urls` |
| `searchKeywords` | `searchQueries` |
| `language`, `lang`, `targetLanguage` | `languages` |
| `maxItems`, `max_videos`, `maxResults` | `maxVideos` |
| `maxVideosPerChannel`, `maxVideosPerPlaylist` | `maxVideosPerSource` |
| `publishedAfter`, `startDate`, `start_date` / `publishedBefore`, `endDate`, `end_date` | `newerThan` / `olderThan` |
| `skipAlreadyScraped` | `onlyNew` |
| `list_only` | `dryRun` |
| `includeSrt`, `includeVtt` | `subtitleFormat` |
| `timestamps`, `includeTimestampedText` | `includeSegments` |
| `preferAutoGenerated`, `fallbackToAnyLanguage`, `chunkSize` | `preferManualCaptions` (inverted), `fallbackToOriginalLanguage`, `chunkWords` |

### Languages

`languages` is an ordered preference list, for example `["es", "en"]`. For each video you get the first of those languages that exists, with human captions chosen before auto-generated ones (change this with `preferManualCaptions`). `en` also matches `en-US`/`en-GB`.

If none of your languages exist, you get the video's **original spoken language** with `isPreferredLanguage: false`. Turn off `fallbackToOriginalLanguage` to get a free `no_captions` row instead. Pass `[]` or `"original"` to always take the spoken language.

`availableLanguages` lists every caption track on the video.

**`allLanguages: true`** also returns every other caption language in `otherLanguages`, one entry per language with its own `text` (up to `maxLanguages`, max 30). Each extra language delivered counts as one more transcript, and a language that fails is free.

**`translateTo: "en"`** (or `es`, `de`, `pt-BR`, `ja`...) translates every transcript into one language. The original stays in `text`; the translation goes in `translatedText`, plus `translatedSegments` / `translatedSrt` / `translatedVtt` with the original timings if you asked for segments or subtitles. `translationStatus` says what happened (`ok`, `same_language`, `skipped`, `failed`). It costs **$0.002 per translated transcript**. Videos already in that language come back with `translationStatus: "same_language"` and are not charged, and a failed or skipped translation is free. With `allLanguages`, only the main transcript is translated.

### Full output example (one row per video)

```json
{
  "videoId": "t4wsYSDeZC4", "url": "https://www.youtube.com/watch?v=t4wsYSDeZC4",
  "inputUrl": "https://youtu.be/t4wsYSDeZC4", "source": "video",
  "status": "ok", "errorCode": null, "retryable": false, "charged": true, "chargedUsd": 0.004,
  "title": "Learn how the Federal Reserve works", "channelName": "…", "channelId": "UC…",
  "channelUrl": "https://www.youtube.com/channel/UC…",
  "publishDate": "2019-03-15T11:53:16-07:00", "durationSec": 300, "viewCount": 123456, "category": "News & Politics",
  "language": "en", "languageName": "English (auto-generated)", "captionType": "auto", "isPreferredLanguage": true,
  "availableLanguages": [{"language": "en", "name": "English (auto-generated)", "autoGenerated": true}],
  "text": "…", "wordCount": 912,
  "chapters": [{"start": 0, "end": 95, "title": "Intro", "text": "…"}],
  "segments": [{"start": 0.0, "end": 2.4, "text": "…"}],
  "chunks": [{"index": 0, "start": 0.0, "end": 181.2, "text": "…"}],
  "mostReplayed": {"segments": [{"start": 0.0, "end": 3.0, "score": 0.42}],
                   "peaks": [{"start": 162.0, "end": 174.0, "score": 1.0, "text": "…", "chapter": "How rates move",
                              "youtubeLabel": "Most replayed"}],
                   "lowPoints": [{"start": 96.0, "end": 108.0, "score": 0.08, "text": "…", "chapter": "Intro"}],
                   "youtubeMarker": {"start": 162.0, "end": 174.0, "time": 168.0}},
  "mostReplayedStatus": "ok",
  "srt": "1\n00:00:00,000 --> …",
  "translatedLanguage": "es", "translatedLanguageName": "Spanish", "translationStatus": "ok", "translatedText": "…",
  "chargedTranslation": true
}
```

Optional fields:

- `chapters` (on by default) appears when the video defines chapters in its description.
- `segments` (`includeSegments`), `chunks` (`chunkWords`), `srt`/`vtt` (`subtitleFormat`)
- `description`/`keywords` (`includeDescription`)
- `otherLanguages` (`allLanguages`), with `chargedTranscripts` when extra languages were billed, and `otherLanguagesStatus: "skipped_on_fallback_exit"` when they were skipped (see FAQ)
- `translated*`, `translationStatus`, `translationError`, `chargedTranslation` (`translateTo`)
- `inputItem` (`datasetId` / `items`)
- `mostReplayed` + `mostReplayedStatus` (`includeMostReplayed`, off by default, no extra charge): see below

#### Status and error codes

| status | errorCode | retryable |
|---|---|---|
| `no_captions` | `NO_CAPTIONS` (none at all), `NO_CAPTIONS_IN_LANGUAGE` (fallback off) | no |
| `unavailable` | `NOT_FOUND`, `PRIVATE`, `AGE_RESTRICTED`, `MEMBERS_ONLY`, `LOGIN_REQUIRED` | no |
| `unavailable` | `LIVE_NOW` (captions appear after the stream ends), `UPCOMING`, `REGION_BLOCKED` | yes |
| `blocked` | `RATE_LIMITED` | yes |
| `blocked` (run row, `source: "run"`) | `FALLBACK_LIMIT_REACHED`: N videos not started because the run hit its share (or the shared daily budget) of the free fallback exit (one row, not one per video; not counted against `maxVideos`). | yes |
| `error` | `EMPTY_CAPTIONS`, `UPSTREAM_ERROR`, `INTERNAL` | yes |
| `error` | `MAX_CHARGE_REACHED` (held back by your run's max charge limit; free, content withheld) | yes |
| `error` | `BILLING_UNAVAILABLE` (the platform couldn't bill this run right now; free, content withheld, rerun later) | yes |
| `preview` | (`dryRun` only) metadata and languages, no text | free |
| (source row) | `CHANNEL_NOT_FOUND`, `PLAYLIST_NOT_FOUND`, `LIST_FAILED` | `LIST_FAILED` only |
| (run fails) | `DRY_RUN_LIMIT` in `OUTPUT`: the 11th dry run of the day | tomorrow |

The run's `OUTPUT` record summarizes counts by status, error code and language, video counts per source, the total charged and a one-line `tip` (with `tipLevel` when something wasn't delivered) for AI agents.

### Most replayed moments (`includeMostReplayed`)

Turn on `includeMostReplayed` to get YouTube's own "Most replayed" graph (the bumpy line above the player's progress bar), lined up with the transcript:

- `segments`: the whole graph, about 100 slices of `{start, end, score}`. `score` is YouTube's replay intensity relative to this video (1 = its most replayed moment).
- `peaks`: the 3 to 5 most replayed moments, highest first. Each one carries the `text` spoken in that window, the `chapter` it falls in (when the video has chapters), and `youtubeLabel: "Most replayed"` on the peak YouTube itself labels.
- `lowPoints`: the least replayed stretches (the very first and last slices are left out). YouTube doesn't publish skip data, so read these as "low replay", not "skipped".
- Times are in seconds, on the same clock as `segments`, `chunks` and `chapters`, so you can jump straight from a peak to its words.

It's free: the row costs the same with it on or off. It adds one request per delivered video, so the run takes a little longer, and nothing changes when it's off. `mostReplayedStatus` is `"ok"` when the graph is attached. Otherwise `mostReplayed` is `null` and the status says why:

- `"not_available"`: YouTube shows no graph for this video (new or low-view videos, most Shorts and live replays).
- `"temporarily_unavailable"`: the graph couldn't be read this time. Rerun later.
- `"skipped_on_fallback_exit"`: the run was on the free fallback exit (see FAQ), so only the transcript was fetched. Rerun later to get the graph.

None of these ever fails or changes the transcript row or its charge. Peak `text` is in the transcript's own language, even with `translateTo`.

### Preview (`dryRun`)

`dryRun: true` lists every video with title, date, duration, views and caption languages, and puts a cost estimate in `OUTPUT.estimate`. No transcript is fetched and no transcript event is charged: a dry run bills only the $0.00005 run start (`OUTPUT.startFeeUsd`). `OUTPUT.estimate.estimatedUsd` is what the full run costs, its own $0.00005 run start included (1 video: $0.00405). It covers up to 500 videos per run, and each user gets 10 dry runs per day (resets at 00:00 UTC; the 11th fails with `DRY_RUN_LIMIT`). Use it to size a channel before committing.

Free metadata is deliberate: `preview` rows, and rows without a transcript (`no_captions`, `unavailable`, `blocked`, `error`), carry the video's public metadata when YouTube returned it (title, channel, publish date, duration, views, category, description, keywords, chapters, caption languages), so you can see what you'd be paying for. They never carry transcript text, segments, subtitles, chunks or translations. Rows withheld by your max charge keep only the title, channel, publish date and duration.

### Monitoring a channel

Set `onlyNew: true` (with a `historyKey` per project) and schedule the run. Videos you already received are skipped and never charged twice. Free failures that can be retried are tried again next time. Add `newerThan` so older uploads are dropped before anything is fetched.

### Integrations

**API (any language)** returns the dataset items in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/verbatim-labs~youtube-transcript/run-sync-get-dataset-items?token=$APIFY_TOKEN&fields=url,status,language,text" \
  -H 'Content-Type: application/json' -d '{"urls": ["https://youtu.be/t4wsYSDeZC4"]}'
```

**Python**

```python
from apify_client import ApifyClient
run = ApifyClient(TOKEN).actor("verbatim-labs/youtube-transcript").call(run_input={"urls": ["@veritasium"], "maxVideosPerSource": 20})
for row in ApifyClient(TOKEN).dataset(run["defaultDatasetId"]).iterate_items():
    if row["status"] == "ok":
        print(row["title"], row["wordCount"])
```

**LangChain**

```python
from langchain_apify import ApifyDatasetLoader  # or langchain_community.utilities.ApifyWrapper
from langchain_core.documents import Document
loader = ApifyDatasetLoader(dataset_id=run["defaultDatasetId"],
    dataset_mapping_function=lambda r: Document(page_content=r["text"], metadata={"source": r["url"], "title": r["title"]}))
```

To embed per chunk instead of per video, set `chunkWords: 500` and map each `chunks[]` entry to its own `Document`.

**n8n / Make / Zapier:** use the Apify node or app with action "Run actor and get dataset items". Rows from a previous step can go into `items`, and their extra fields come back in `inputItem`.

**AI agents (MCP):** add `https://mcp.apify.com/?actors=verbatim-labs/youtube-transcript` to Claude, Cursor or any MCP client. Rows are compact by default (no segments), and `OUTPUT.tip` explains every failure in one sentence.

### Cost and limits

- **$4.00 per 1,000 delivered transcripts** ($0.004 each) at any length, the same on every plan.
- **Translation (`translateTo`): $0.002 per translated transcript.** Same-language and failed translations are free.
- **Run start: $0.00005 per run** (every run, dry runs too), billed once when the run starts (memory is fixed at 256 MB, so it is one charge). `OUTPUT.startFeeUsd` shows it and `OUTPUT.totalChargedUsd` is the run's full bill.
- These are the only charges. A `dryRun` bills just the run start; its estimate includes translation and the full run's run start.
- Your run's **max charge limit** is respected, and `maxVideos` is a hard cap as well (date-filtered videos don't count toward it).
- Runs in **256 MB** (fixed).
- If our transcript service is briefly unavailable, the run stops within about a minute and every video comes back as a free `UPSTREAM_ERROR` row (retryable): rerun in a few minutes. Nothing but the run start is charged.
- Channel **Shorts** listing returns the latest 100, a YouTube limit for logged-out access. Use `channelContent: "all"` for more.
- Captions only: a video with no caption track at all (manual or auto) returns `NO_CAPTIONS` for free. There is no speech-to-text yet.
- Chapters come from the video description. YouTube's auto-generated chapters aren't included.

### Ready-made examples

Each link opens a pre-filled task with a sample run you can copy and edit:

- [Get a YouTube channel's transcripts for RAG](https://apify.com/verbatim-labs/youtube-transcript/examples/youtube-channel-transcripts-for-rag): Download every recent video transcript from a YouTube channel, chunked with timestamps for RAG, embeddings and LLM pipelines.
- [Transcribe YouTube podcast episodes](https://apify.com/verbatim-labs/youtube-transcript/examples/youtube-podcast-episode-transcripts): Full-text transcripts of YouTube podcast episodes with chapter splits. Paste any podcast channel or playlist; no captions = free.
- [Search YouTube and get the transcripts](https://apify.com/verbatim-labs/youtube-transcript/examples/search-youtube-and-get-transcripts): Search YouTube by keyword and get full transcripts, titles and channels for the top videos. Topic research and LLM datasets.
- [Download YouTube subtitles as SRT](https://apify.com/verbatim-labs/youtube-transcript/examples/download-youtube-subtitles-srt): Get SRT subtitle files and timestamped captions for any YouTube video, in your preferred language. Paste URLs or video IDs.
- [Get transcripts of a channel's YouTube Shorts](https://apify.com/verbatim-labs/youtube-transcript/examples/youtube-shorts-transcripts): Get the transcript of every recent YouTube Short from a channel. Study hooks and scripts for short-form content research.

### More from Verbatim Labs

- [TikTok Transcript Scraper: Captions & Subtitles](https://apify.com/verbatim-labs/tiktok-transcript): TikTok video to text, with speech-to-text for videos without captions; single videos or whole profiles
- [Instagram Reels Transcript: Instagram Video to Text](https://apify.com/verbatim-labs/instagram-reels-transcript): Instagram reel video to text, with hooks, subtitles and viral scores; by URL, profile, sound or topic
- [Similarweb Traffic Scraper - Website Traffic Checker](https://apify.com/verbatim-labs/similarweb-traffic): monthly visits, global rank, traffic sources and top countries for any website, in bulk

### FAQ

**Does "$0.004 per transcript" mean per video?** Yes: one video, one transcript, any length. With `allLanguages`, each extra language delivered is one more.

**Am I charged for videos without captions?** No. Only rows with `status: "ok"` are charged, and `charged` on each row shows it.

**What if YouTube blocks the run?** The actor switches to another network exit automatically. Videos it still can't get come back as `RATE_LIMITED` (free, `retryable: true`); rerun just those. The last exit is a free fallback with a per-run share (about 200 videos / 400 caption requests / 20 listing pages) and a daily budget shared by all users; listing past it goes direct. On it, `allLanguages` returns the main transcript only (extra languages `skipped`, not charged, `otherLanguagesStatus: "skipped_on_fallback_exit"`). When the share is used up, the run stops starting videos and adds one free `FALLBACK_LIMIT_REACHED` row with the count (`OUTPUT.notStarted`, `stoppedBy: "fallbackCap"`); a listing that hits it is retried direct, and only what still can't be listed gets a free `LIST_FAILED` row. Rerun later for the rest.

**Am I charged for videos outside my date window?** No. With `newerThan`, older videos are filtered out before their captions are fetched; they are neither output nor charged.

# Actor input Schema

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

Any mix of YouTube video/Shorts/live URLs, bare video IDs, channel URLs or @handles (youtube.com/@name, /channel/UC..., /c/..., /user/...; add /shorts or /streams to pick that tab), and playlist URLs. Duplicates are fetched and charged once.

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

YouTube searches; the top maxVideosPerSource results of each are transcribed.

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

Newest first for channels. Single video URLs are always included.

## `channelContent` (type: `string`):

Which uploads to take from channel inputs. A tab in the URL (/shorts, /streams) overrides this.

## `newerThan` (type: `string`):

Skip videos published before this date (YYYY-MM-DD). They are filtered out before their captions are fetched, so they are not output and not charged. Combine with onlyNew for monitoring.

## `olderThan` (type: `string`):

Skip videos published after this date (YYYY-MM-DD). With newerThan this gives a date window. Skipped videos are not output and not charged.

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

Caption languages in order of preference (ISO codes like en, es, pt-BR; en also matches en-US/en-GB). Use \[] or "original" for the video's own spoken language. YouTube's machine translation is not used.

## `fallbackToOriginalLanguage` (type: `boolean`):

If none of your languages exist, return the spoken-language transcript (isPreferredLanguage=false) instead of a free no_captions row.

## `preferManualCaptions` (type: `boolean`):

Uploader-made captions are usually cleaner. Off = take auto-generated first. captionType says which you got.

## `allLanguages` (type: `boolean`):

Also return every other caption language on the video in otherLanguages (one per language, human captions first). Each extra language delivered counts as one more transcript; failed languages are free. Max 30 per video. If YouTube rate-limits the main exits and the run falls back to the free fallback exit, only the main transcript is fetched there (extra languages come back skipped, not charged; otherLanguagesStatus says so).

## `maxLanguages` (type: `integer`):

Cap on otherLanguages when allLanguages is on.

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

Optional. A language code (en, es, de, pt-BR, ja...) to translate every transcript into. The original text stays in text; the translation goes in translatedText (plus translatedSegments / translatedSrt / translatedVtt if you asked for those). Costs $0.002 per translated transcript on top of the transcript. Videos already in that language are not translated or charged; failed translations are free. Leave empty for no translation.

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

Adds segments: \[{start, end, text}] in seconds. Off by default for API/MCP calls to keep rows small.

## `subtitleFormat` (type: `string`):

Also return ready-to-use subtitles as text fields.

## `includeDescription` (type: `boolean`):

Video description and keywords. Title, channel, publish date, duration, views and category are always included.

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

chapters: \[{start, end, title, text}] when the video defines chapters in its description (the transcript text is split per chapter). Free, no extra requests.

## `includeMostReplayed` (type: `boolean`):

mostReplayed: YouTube's Most replayed graph, aligned to the transcript: segments \[{start, end, score 0-1}], the top 3-5 peaks \[{start, end, score, text, chapter?}] with the words spoken in each peak, and lowPoints (the least replayed stretches; YouTube doesn't publish skip data). Same price, no extra charge; adds one request per delivered video. Videos without the graph (new or low-view videos, most Shorts and live replays) get mostReplayed: null and a mostReplayedStatus.

## `chunkWords` (type: `integer`):

Adds chunks: \[{index, start, end, text}] of about this many words each, split on caption boundaries with timestamps kept. 300-800 suits most embedding models.

## `onlyNew` (type: `boolean`):

Remembers delivered videos in a key-value store in your account and skips them next run. Free/retryable failures are retried.

## `historyKey` (type: `string`):

Separate onlyNew memories per project (default: "default").

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

Hard cap across all sources. Videos skipped by newerThan/olderThan, or left unstarted by the fallback-exit limit, don't count toward it. Your run's max charge limit is also respected.

## `dryRun` (type: `boolean`):

List the videos with metadata and their caption languages, and estimate the cost, without fetching any transcript. Only the $0.00005 run start is billed (no transcript events). Up to 500 videos per run, 10 dry runs per user per day.

## `datasetId` (type: `string`):

Dataset from any YouTube scraper. Rows with url, videoUrl, inputUrl, link, videoId or id are picked up; the whole row comes back as inputItem.

## `items` (type: `array`):

Rows passed directly (Make, n8n, agents), e.g. \[{"url": "https://youtu.be/...", "myId": 7}] or plain URL strings.

## `datasetField` (type: `string`):

Which field of the dataset/items rows holds the URL or video ID.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=t4wsYSDeZC4"
  ],
  "maxVideosPerSource": 25,
  "channelContent": "videos",
  "languages": [
    "en"
  ],
  "fallbackToOriginalLanguage": true,
  "preferManualCaptions": true,
  "allLanguages": false,
  "maxLanguages": 30,
  "includeSegments": true,
  "subtitleFormat": "none",
  "includeDescription": true,
  "includeChapters": true,
  "includeMostReplayed": false,
  "chunkWords": 0,
  "onlyNew": false,
  "maxVideos": 0,
  "dryRun": false
}
```

# Actor output Schema

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

One item per video: url, title, channelName, publishDate, language, captionType, status, text. Only status=ok rows are charged.

## `metadata` (type: `string`):

No description

## `subtitles` (type: `string`):

No description

## `segments` (type: `string`):

No description

## `errors` (type: `string`):

Per video: status, errorCode, retryable, charged, error. charged=false rows were free.

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

Counts by status, errorCode and language, per-source video counts, chargedUsd (per-result charges), startFeeUsd ($0.00005 run start), totalChargedUsd (both) and a one-line tip (+ tipLevel). Dry runs add estimate.estimatedUsd (the full run, run start included).

# 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=t4wsYSDeZC4"
    ],
    "languages": [
        "en"
    ],
    "includeSegments": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("verbatim-labs/youtube-transcript").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=t4wsYSDeZC4"],
    "languages": ["en"],
    "includeSegments": True,
}

# Run the Actor and wait for it to finish
run = client.actor("verbatim-labs/youtube-transcript").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=t4wsYSDeZC4"
  ],
  "languages": [
    "en"
  ],
  "includeSegments": true
}' |
apify call verbatim-labs/youtube-transcript --silent --output-dataset

```

## MCP server setup

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

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/nlJr8tWJ1Tb3NAJN5/builds/nWJdlnMKfJcG2Ocm4/openapi.json
