# YouTube Transcript Scraper - Channels, Playlists, SRT (`datafetch_labs/youtube-transcript-scraper`) Actor

Get YouTube transcripts and subtitles in bulk: paste video, channel or playlist URLs or search terms. Returns clean text, timestamped segments, SRT or VTT plus video metadata. Picks your preferred language, manual captions first. Pay only for transcripts found.

- **URL**: https://apify.com/datafetch\_labs/youtube-transcript-scraper.md
- **Developed by:** [DataFetch Labs](https://apify.com/datafetch_labs) (community)
- **Categories:** Open source
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 transcript scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

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: Videos, Channels, Playlists & Search

**Get YouTube transcripts and subtitles in bulk.** Paste video URLs, a whole **channel**, a **playlist**, or just **search terms**. You get clean transcripts as **plain text, timestamped segments, SRT or VTT**, plus video metadata (title, channel, duration, views, description, tags). **You pay only for videos that actually have a transcript.**

- ✅ **Any input**: video URLs or IDs, Shorts, `@handles`, channel URLs, playlists, search queries.
- ✅ **5 output formats**: readable paragraphs, `[hh:mm:ss]` timestamped text, JSON segments, SRT, WebVTT.
- ✅ **Smart language choice**: your preferred languages in order, human-made captions before auto-generated ones, optional fallback to whatever is available.
- ✅ **Video metadata included** at no extra cost.
- ✅ **Reliable**: switches to a proxy automatically only when YouTube starts rate-limiting, so runs stay fast and cheap.
- 💲 **$3 per 1,000 transcripts**. Videos without captions are free.

### Use cases

- **AI and LLM pipelines**: feed transcripts into RAG, summarization, chatbots and fine-tuning datasets.
- **Content repurposing**: turn videos into blog posts, newsletters, show notes and social posts.
- **Research and monitoring**: analyze what creators, competitors or experts say across hundreds of videos.
- **SEO**: mine keywords and questions from videos in your niche.
- **Subtitles**: download SRT or VTT files for editing, translation or archiving.

### Input

| Field | What it does |
|---|---|
| **YouTube URLs** | Videos, Shorts, channels (`@mkbhd`, `youtube.com/channel/UC…`), playlists (`youtube.com/playlist?list=…`). |
| **Search queries** | Get transcripts for the top results of any YouTube search. |
| **Max videos per source** | Limit per channel, playlist or search (0 = all). |
| **Channel content** | Videos, Shorts or Live streams tab. |
| **Preferred languages** | e.g. `en`, `es`, `de`, in priority order. |
| **Output formats** | Any of text, timestampedText, segments, srt, vtt. |

```json
{
    "urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ", "@mkbhd"],
    "searchQueries": ["sourdough recipe"],
    "maxVideosPerSource": 20,
    "languages": ["en"],
    "outputFormats": ["text", "segments", "srt"]
}
```

### Output

```json
{
    "videoId": "dQw4w9WgXcQ",
    "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "source": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
    "channelName": "Rick Astley",
    "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "durationSeconds": 213,
    "viewCount": 1821086987,
    "description": "The official video for “Never Gonna Give You Up” by Rick Astley...",
    "keywords": ["rick astley", "never gonna give you up"],
    "thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
    "availableLanguages": [{ "languageCode": "en", "name": "English", "isAutoGenerated": false }],
    "transcriptAvailable": true,
    "language": "en",
    "isAutoGenerated": false,
    "wordCount": 487,
    "text": "[♪♪♪] ♪ We're no strangers to love ♪ ♪ You know the rules and so do I ♪ ...",
    "segments": [
        { "start": 1.36, "duration": 1.68, "text": "[♪♪♪]" },
        { "start": 18.64, "duration": 3.24, "text": "♪ We're no strangers to love ♪" }
    ],
    "srt": "1\n00:00:01,360 --> 00:00:03,040\n[♪♪♪]\n...",
    "scrapedAt": "2026-09-28T21:10:00.000Z"
}
```

A video without captions gives a free row with `transcriptAvailable: false` and an `error` explaining why (you can turn these rows off).

### Pricing

**$0.003 per transcript ($3 per 1,000)**, with metadata included. Nothing is charged for videos without a transcript. Set a *maximum cost per run* and the Actor stops cleanly when it's reached.

### Tips

- **Whole channel**: paste the `@handle` and set *Max videos per source* to 0.
- **Only auto-generated captions?** Turn off *Prefer human-made captions* to take whatever YouTube shows first.
- **Integrations**: send transcripts to Google Sheets, Notion, Slack, Zapier, Make or n8n, or call the Actor from your own code through the Apify API. It also works as a tool for AI agents through the Apify MCP server.

### FAQ

**Does it work for videos without captions?** No. It reads YouTube's own caption tracks (uploader-made or auto-generated). Nearly all spoken videos in major languages have auto-generated captions.

**Are playlists limited?** Playlists return up to 200 videos. Channels have no limit.

**Is it legal?** The Actor reads publicly available captions and metadata. You're responsible for how you use the content, including copyright.

# Actor input Schema

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

Video URLs or IDs, Shorts, channel URLs or @handles (all their videos), and playlist URLs. One per line.

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

Search YouTube and get transcripts of the top results, e.g. "sourdough recipe".

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

0 = all videos (playlists: up to 200).

## `channelTab` (type: `string`):

Which tab of a channel to take videos from.

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

Language codes in order of preference (e.g. en, es, de, pt). The first available is used.

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

If none of the preferred languages exist, return the video's own captions in whatever language they are.

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

Use uploader-made captions over YouTube's auto-generated ones when both exist.

## `outputFormats` (type: `array`):

Transcript formats to include in each result.

## `includeVideosWithoutTranscript` (type: `boolean`):

Add a (free) row with the reason for videos that have no captions.

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

Parallel videos.

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

Used only if YouTube starts blocking direct requests. Residential proxy is recommended.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "@mkbhd"
  ],
  "maxVideosPerSource": 3,
  "channelTab": "videos",
  "languages": [
    "en"
  ],
  "fallbackToAnyLanguage": true,
  "preferManualCaptions": true,
  "outputFormats": [
    "text",
    "segments"
  ],
  "includeVideosWithoutTranscript": true,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "urls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "@mkbhd"
    ],
    "maxVideosPerSource": 3,
    "languages": [
        "en"
    ]
};

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

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

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

```

## Python example

```python
from apify_client import ApifyClient

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

# Prepare the Actor input
run_input = {
    "urls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "@mkbhd",
    ],
    "maxVideosPerSource": 3,
    "languages": ["en"],
}

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

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

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

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "@mkbhd"
  ],
  "maxVideosPerSource": 3,
  "languages": [
    "en"
  ]
}' |
apify call datafetch_labs/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/VlYqkYLmgKw5WvOrg/builds/Wfd28G8Nud36Pnbed/openapi.json
