# YouTube Transcript Scraper - Bulk & AI-Ready (`orbifetch/youtube-transcript-scraper`) Actor

Get YouTube transcripts in bulk from videos, playlists, channels or search. Plain text, timestamps, SRT and VTT, 100+ languages with translation, plus video metadata. Built for AI, RAG and content research.

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

## Pricing

$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.

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

### What does YouTube Transcript Scraper do?

**YouTube Transcript Scraper** extracts transcripts (captions/subtitles) from YouTube in bulk. Give it any mix of:

- 🎬 **Video URLs or IDs**, including Shorts and live replays
- 📃 **Playlists**, which are expanded into all their videos
- 📺 **Channels** (`@handle`, `/channel/UC…`, `/c/…`), which return the latest uploads
- 🔍 **Search queries**, which return transcripts for the top results

For each video you get the **full transcript text**, **timestamped segments**, optional **SRT / WebVTT** subtitles and **text with \[hh:mm:ss] timestamps**. You also get **video metadata**: title, channel, duration, views, keywords, description and thumbnail.

It supports **100+ languages**: it prefers human-made captions, falls back to auto-generated ones, and can **translate** any transcript with YouTube's built-in translation.

### Why use it?

- 🤖 **AI, RAG & LLM apps**: feed clean transcripts into ChatGPT, Claude, embeddings or vector databases. Each row includes `wordCount` and `approxTokens` so you can budget context windows.
- ✍️ **Content repurposing**: turn videos into blog posts, newsletters, show notes and social threads.
- 📊 **Research & analysis**: analyze what whole channels or search results say about a topic, product or brand.
- 🎓 **Education & accessibility**: download subtitles as SRT/VTT for editing and translation.
- 🔌 **Automation**: call it from the Apify API, Make, Zapier, n8n or any MCP client. Schedule it to process new uploads from a channel.

### How much does it cost?

**$2 per 1,000 transcripts.** You pay only for videos where a transcript was extracted. Videos without captions, private or unavailable videos are **free**. Listing channel and playlist videos is also free.

| Videos | Price |
|---|---|
| 100 | $0.20 |
| 1,000 | $2 |
| 10,000 | $20 |

### How to use it

1. Click **Try for free**.
2. Paste video, playlist or channel URLs into **Videos, playlists or channels**, and optionally add **Search queries**.
3. Set **Preferred languages** (default `en`) and, if needed, **Translate to**.
4. Choose output formats: segments, timestamped text, SRT or VTT.
5. Click **Start**, then download as **JSON, CSV, Excel or HTML**, or fetch the data through the API.

### Input example

```json
{
    "sources": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://www.youtube.com/playlist?list=PL...",
        "@mkbhd"
    ],
    "searchQueries": ["python tutorial"],
    "maxVideosPerSource": 20,
    "languages": ["en"],
    "includeSegments": true,
    "includeSrt": true
}
```

### Output example

```json
{
    "videoId": "jNQXAC9IVRw",
    "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "title": "Me at the zoo",
    "channelName": "jawed",
    "channelId": "UC4QobU6STFB0P71PMvOGN5A",
    "durationSeconds": 19,
    "viewCount": 380000000,
    "hasTranscript": true,
    "language": "en",
    "isAutoGenerated": false,
    "isTranslated": false,
    "availableLanguages": ["en", "de", "es"],
    "wordCount": 39,
    "approxTokens": 52,
    "text": "All right, so here we are, in front of the elephants...",
    "segments": [
        { "start": 1.2, "duration": 2.16, "end": 3.36, "text": "All right, so here we are," }
    ],
    "srt": "1\n00:00:01,200 --> 00:00:03,360\nAll right, so here we are,\n"
}
```

Videos without a transcript are still listed, with `hasTranscript: false`, the reason in `error`, and their metadata. They are not charged.

### FAQ

**Does it work for videos without captions?** No. It returns YouTube's existing human-made or auto-generated captions. Most videos have auto-generated captions, so coverage is high. Videos with captions disabled come back with `hasTranscript: false`, and you are not charged.

**Can I get transcripts in another language?** Yes. List your preferred languages in order, and use **Translate to** to machine-translate any transcript through YouTube.

**How many videos can I process?** Thousands per run. Channels and playlists are expanded automatically up to **Max videos per playlist / channel / search**.

**Why residential proxies?** YouTube blocks data-center IPs. Residential proxies are the default because they make runs reliable, and their cost is included in the price.

**Is it legal?** It only reads publicly available captions and metadata. Make sure your use of the content respects copyright and YouTube's terms.

**Something not working?** Open an issue on the **Issues** tab. We usually fix problems within days.

# Actor input Schema

## `sources` (type: `array`):

YouTube video URLs or IDs, Shorts, playlist URLs, or channel URLs / @handles. Playlists and channels are expanded into their videos (up to the limit below).

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

Optional. Search YouTube and get transcripts of the top video results for each query.

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

Channels list their newest videos first.

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

Language codes in order of preference, e.g. en, es, de. Human-made captions are preferred over auto-generated ones in the same language.

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

If none of the preferred languages exist, return the video's original transcript instead of skipping it.

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

Use YouTube's automatic (speech recognition) captions when no human-made captions exist.

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

Optional. Language code to machine-translate transcripts into using YouTube's built-in translation, e.g. en.

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

Array of {start, duration, end, text} segments.

## `includeTimestampedText` (type: `boolean`):

Readable text with a \[hh:mm:ss] timestamp on every line. Great for LLM prompts that need citations.

## `includeSrt` (type: `boolean`):

Transcript as an .srt subtitle string.

## `includeVtt` (type: `boolean`):

Transcript as a .vtt subtitle string.

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

Videos processed in parallel.

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

YouTube blocks data-center IPs. Residential proxies (default) give reliable results.

## Actor input object example

```json
{
  "sources": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "@mkbhd"
  ],
  "maxVideosPerSource": 50,
  "languages": [
    "en"
  ],
  "fallbackToAnyLanguage": true,
  "allowAutoGenerated": true,
  "includeSegments": true,
  "includeTimestampedText": false,
  "includeSrt": false,
  "includeVtt": false,
  "maxConcurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One row per video with transcript text, formats and metadata.

# 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 = {
    "sources": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "@mkbhd"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("orbifetch/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 = { "sources": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "@mkbhd",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("orbifetch/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 '{
  "sources": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "@mkbhd"
  ]
}' |
apify call orbifetch/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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