# YouTube Transcript Scraper (AI-Ready) (`suicidalsquirrel/youtube-transcript-actor`) Actor

Scrape YouTube transcripts and captions from videos, playlists, and channels. Get timestamped text, language details, TXT/SRT/VTT files, and RAG-ready chunks for AI. You pay only for successful transcripts; videos without captions are free.

- **URL**: https://apify.com/suicidalsquirrel/youtube-transcript-actor.md
- **Developed by:** [SuicidalSquirrel](https://apify.com/suicidalsquirrel) (community)
- **Categories:** Videos, Social media, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 transcript extracteds

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

### Scrape YouTube transcripts and captions for AI

Scrape transcripts from YouTube videos, playlists, and channels as clean, AI-ready text — **$0.003 per transcript ($3 per 1,000), with lower prices on paid Apify plans**. You're never charged for a video that has no captions, is unavailable, or is age-restricted; you only pay for a transcript you actually get.

### What you get

One dataset item per requested video. Example, lightly trimmed, from a real run against [`jNQXAC9IVRw`](https://www.youtube.com/watch?v=jNQXAC9IVRw) ("Me at the zoo", the first video ever uploaded to YouTube):

```jsonc
{
    "status": "ok",
    "errorCode": null,
    "videoId": "jNQXAC9IVRw",
    "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "title": "Me at the zoo",
    "channelName": "jawed",
    "durationSeconds": 19,
    "language": "en",
    "isAutoGenerated": false,
    "text": "All right, so here we are, in front of the elephants the cool thing about these guys is that they have really... really really long trunks and that's cool (baaaaaaaaaaahhh!!) and that's pretty much all there is to say",
    "segments": [
        { "start": 1.2, "duration": 2.16, "text": "All right, so here we are, in front of the elephants" },
        // ...one entry per caption line, with exact start/duration...
    ],
    "chunks": [
        { "index": 0, "startSec": 1.2, "endSec": 18.88, "text": "All right, so here we are...", "tokenEstimate": 55 },
        // RAG-ready, overlapping, split only on caption boundaries
    ],
    "chapters": [], // populated with YouTube's own chapter titles/timestamps when available
    "wordCount": 39,
    "tokenEstimate": 55,
    "files": {}, // txt/srt/vtt key-value-store links, when requested
    "source": { "type": "video", "input": "jNQXAC9IVRw" },
    "fetchedAt": "2026-10-08T09:10:52.932Z",
}
```

A video without captions returns `status: "no_captions"` with empty `text`/`segments` — never a crash, never an empty item pretending to be a success, and never a charge.

### How to use it

1. **Add your sources.** Paste one or more video URLs, playlist URLs, or channel URLs/handles into `videos`, `playlists`, and `channels`. Mix and match; duplicates across all three are automatically removed.
2. **Set your limits (optional).** `maxVideosPerSource` caps how many videos come from each playlist/channel; `maxTranscripts` is a hard ceiling on the whole run, so a single large channel can never run away with your budget.
3. **Run it.** Read the results from the dataset as they land — `status`, `title`, `language`, and `wordCount` in the default Overview view, everything (segments, chunks, chapters, files) in the Full view.

```json
{
    "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "playlists": ["https://www.youtube.com/playlist?list=PLBCF2DAC6FFB574DE"],
    "channels": ["@NASA"],
    "maxVideosPerSource": 50,
    "maxTranscripts": 1000,
    "languages": ["en"],
    "fallbackToAnyLanguage": true,
    "allowAutoGenerated": true,
    "includeSegments": true,
    "chunking": { "enabled": true, "maxTokens": 800, "overlapTokens": 80 },
    "extraFormats": ["srt"],
    "proxyConfiguration": { "useApifyProxy": true }
}
```

### Use cases

- **RAG and knowledge bases** — `chunks` are already token-sized and overlapping, ready to embed without any extra preprocessing.
- **Summarization and research** — `text` is clean prose (no timestamps, no `[Music]`-style noise), so it drops straight into a summarization prompt.
- **Content research at scale** — point it at a competitor's or your own channel, cap it with `maxVideosPerSource`/`maxTranscripts`, and get every video's transcript in one dataset.
- **AI agents** — pay-per-event pricing and limited permissions (see [Integrations](#integrations)) mean an agent can call this Actor directly and only pay for transcripts it actually receives.

### Pricing explained

Only the `transcript-extracted` event is billed, and only once per video that actually gets a transcript (`status: "ok"`). Enumerating a playlist or channel to find its videos is always free, and so is every `no_captions`, `unavailable`, `age_restricted`, or `error` item.

The price per transcript depends on your Apify plan:

| Apify plan tier | Per transcript | Per 1,000 transcripts |
| --------------- | -------------- | --------------------- |
| Free            | $0.003         | $3.00                 |
| Bronze          | $0.0027        | $2.70                 |
| Silver          | $0.0024        | $2.40                 |
| Gold            | $0.002         | $2.00                 |

The examples below use the Free-tier price.

- **Example A — a curated list of 100 videos, some without captions.** You submit 100 `videos`. 92 have captions and transcribe successfully; 8 don't. You pay for 92 transcripts: 92 × $0.003 = **$0.276**. The 8 caption-less items still appear in your dataset, for free, so you can see which videos they were.
- **Example B — a channel with more videos than you want to pay for.** A channel has 4,000 uploads. You set `maxVideosPerSource: 500` and `maxTranscripts: 500` as a budget ceiling. Enumerating the channel's video list costs nothing. If 480 of those 500 videos have captions, you pay 480 × $0.003 = **$1.44** — never more than `maxTranscripts` × $0.003, however large the channel actually is.

If your Apify spending limit is reached mid-run, the Actor stops starting new videos, lets any in-flight ones finish, and exits cleanly with a status message explaining why the dataset is smaller than requested — you're never charged past your own limit.

### Limits and honest notes

- **Videos without captions get a free, honest `no_captions` status** — never an empty transcript pretending to be real, and never a charge.
- **Region-locked, private, deleted, and age-restricted videos** come back as `unavailable` or `age_restricted`, free, with a human-readable `errorMessage`.
- **Chapters are included opportunistically, not guaranteed.** YouTube's chapter markers live in a much heavier page than the one this Actor fetches by default; fetching that heavier page for every single video would multiply the cost well past this Actor's price, so chapters are only captured when the (rarer) fallback extraction path already happened to load that page. Most successful items will have `chapters: []` even for videos that do have chapters on youtube.com.
- **No audio or video is downloaded**, in this version — only publicly available caption tracks and metadata.
- **This is HTTP-only** — no headless browser. YouTube can occasionally block a request before a retry succeeds, so some videos take longer than others. If every available route fails, the item returns an honest `status: "error"` with a readable reason.
- You are responsible for complying with YouTube's Terms of Service and applicable law for however you use the data this Actor returns.

### Integrations

#### API

Replace `YOUR_TOKEN` with an [Apify API token](https://console.apify.com/account/integrations). The examples use this Actor's Store identifier: `suicidalsquirrel/youtube-transcript-actor`.

**curl** (synchronous — waits for the run and returns dataset items directly, up to 5 minutes):

```bash
curl -X POST "https://api.apify.com/v2/actors/suicidalsquirrel/youtube-transcript-actor/run-sync-get-dataset-items" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"]}'
```

**JavaScript** (`apify-client`):

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

const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const { defaultDatasetId } = await client.actor('suicidalsquirrel/youtube-transcript-actor').call({
    videos: ['https://www.youtube.com/watch?v=dQw4w9WgXcQ'],
});
const { items } = await client.dataset(defaultDatasetId).listItems();
```

**Python** (`apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_TOKEN')
run = client.actor('suicidalsquirrel/youtube-transcript-actor').call(
    run_input={'videos': ['https://www.youtube.com/watch?v=dQw4w9WgXcQ']},
)
for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item['status'], item.get('title'))
```

#### MCP and AI agents

Any Apify Actor can be called as a tool through [Apify's MCP server](https://docs.apify.com/integrations/mcp) at `mcp.apify.com` — point an MCP-aware client at `https://mcp.apify.com?tools=suicidalsquirrel/youtube-transcript-actor` (or have the agent discover it with the server's `add-actor` tool) and it can request transcripts directly, paying only for the `transcript-extracted` events it actually triggers. This Actor requests only limited permissions and never runs in Standby mode, so it stays eligible for direct agent-to-agent payments.

#### Make and Zapier

Both platforms have an official Apify integration: in Make, use the **Run an Actor** module (and **Get Dataset Items** to read results); in Zapier, use the **Run Actor** action from the Apify app. Either way, select this Actor by its ID and supply the same input JSON shown above. For a playlist or channel large enough to take more than Zapier's ~30-second synchronous timeout, use the **Finished Actor Run** trigger (or a webhook) instead of waiting on the action step.

### FAQ

**Does it download audio or video?** No — only publicly available caption tracks and metadata, in this version.

**Will I be charged for a video that fails or has no captions?** No. Only a successful transcript is billed, once, per video — see [Pricing explained](#pricing-explained).

**What if the same video appears in my `videos`, a playlist, and a channel?** It's deduplicated and billed once, keeping the first source it was found under for the `source` field.

**Can I point it at a channel with thousands of videos without worrying about cost?** Yes — `maxVideosPerSource` and `maxTranscripts` are hard ceilings checked before any transcript is attempted, and your Apify spending limit is also respected mid-run.

**Does it store my proxy credentials or any personal data beyond what's in the output?** No. Output is limited to public video/channel metadata and transcripts; proxy credentials are never logged.

**Why is `chapters` empty on a video I know has chapters on youtube.com?** See [Limits and honest notes](#limits-and-honest-notes) — it's a deliberate cost trade-off, not a bug.

### Changelog

- **2026-10-08 — Initial release:** video, playlist, and channel inputs; multilingual manual and auto-generated captions; proxy escalation and retry handling; RAG-ready chunks; TXT/SRT/VTT exports; pay-per-event charging; API, MCP, Make, and Zapier integrations.

# Actor input Schema

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

Video watch URLs, youtu.be URLs, Shorts/embed/live URLs, or bare 11-character video IDs. Example: https://www.youtube.com/watch?v=dQw4w9WgXcQ

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

YouTube playlist URLs or playlist IDs. Example: https://www.youtube.com/playlist?list=PL590L5WQmH8fJ54F369BLDSqIwcs-TCfs

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

YouTube channel URLs, @handles, or UC channel IDs. Example: https://www.youtube.com/@YouTube

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

Maximum number of videos to enumerate from each playlist or channel. Example: 50

## `maxTranscripts` (type: `integer`):

Hard cap on transcripts attempted in one run to guard cost. Example: 1000

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

Caption language codes in preference order. Example: en, es, de

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

Use another available caption language when none of the preferred languages exists. Example: true

## `allowAutoGenerated` (type: `boolean`):

Allow YouTube auto-generated captions, while still preferring manual captions. Example: true

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

Include individual caption segments with start times and durations. Example: true

## `chunking` (type: `object`):

Split transcripts on caption boundaries into overlapping, token-sized chunks. Example: {"enabled":true,"maxTokens":800,"overlapTokens":80}

## `extraFormats` (type: `array`):

Also save selected transcript files in the key-value store. Example: txt and srt

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

Choose the proxies used for YouTube requests. Apify Proxy automatic mode is the default. Example: {"useApifyProxy":true}

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "playlists": [],
  "channels": [],
  "maxVideosPerSource": 50,
  "maxTranscripts": 1000,
  "languages": [
    "en"
  ],
  "fallbackToAnyLanguage": true,
  "allowAutoGenerated": true,
  "includeSegments": true,
  "chunking": {
    "enabled": true,
    "maxTokens": 800,
    "overlapTokens": 80
  },
  "extraFormats": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "playlists": [],
    "channels": [],
    "maxVideosPerSource": 50,
    "maxTranscripts": 1000,
    "languages": [
        "en"
    ],
    "fallbackToAnyLanguage": true,
    "allowAutoGenerated": true,
    "includeSegments": true,
    "chunking": {
        "enabled": true,
        "maxTokens": 800,
        "overlapTokens": 80
    },
    "extraFormats": [],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("suicidalsquirrel/youtube-transcript-actor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "playlists": [],
    "channels": [],
    "maxVideosPerSource": 50,
    "maxTranscripts": 1000,
    "languages": ["en"],
    "fallbackToAnyLanguage": True,
    "allowAutoGenerated": True,
    "includeSegments": True,
    "chunking": {
        "enabled": True,
        "maxTokens": 800,
        "overlapTokens": 80,
    },
    "extraFormats": [],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("suicidalsquirrel/youtube-transcript-actor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "playlists": [],
  "channels": [],
  "maxVideosPerSource": 50,
  "maxTranscripts": 1000,
  "languages": [
    "en"
  ],
  "fallbackToAnyLanguage": true,
  "allowAutoGenerated": true,
  "includeSegments": true,
  "chunking": {
    "enabled": true,
    "maxTokens": 800,
    "overlapTokens": 80
  },
  "extraFormats": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call suicidalsquirrel/youtube-transcript-actor --silent --output-dataset

```

## MCP server setup

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

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/iGvPeyhSykkGJ97mQ/builds/vwX4pe0u3vII5Re25/openapi.json
