# YouTube Transcript Scraper: Videos, Shorts, Channels, Search (`murch1k/youtube-transcript-scraper`) Actor

Get YouTube transcripts with timestamps, SRT and video metadata. Input video URLs, Shorts, @channels, playlists or search keywords. Manual or auto captions, 100+ languages, auto-translate. Pay only per transcript delivered.

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

## Pricing

$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, Shorts, Channels, Playlists & Search

Get clean **YouTube transcripts** (captions/subtitles) with **timestamps, SRT and video metadata** — in bulk, without the YouTube API, without logging in.

Paste video links, Shorts, `@channels`, playlists or just **search keywords**. You get one row per video with the full text, ready for AI/LLM pipelines, RAG, content repurposing, SEO research or market analysis.

### Why this actor

- **Any input**: video URLs (`watch`, `youtu.be`, `/shorts/`, `/live/`), video IDs, channel URLs or `@handles` (Videos, Shorts or Live tab), playlists, and YouTube search.
- **Pick the language**: ordered language preference, manual captions preferred over auto-generated (or the other way round), and optional **auto-translation** to any language YouTube supports.
- **Ready-to-use formats**: plain text, timestamped segments (`start`, `duration`, `text`) and an **SRT** file per video.
- **Metadata included**: title, channel, channel ID, duration, view count, thumbnail, and optionally the description and tags.
- **Fair pricing**: you pay **only for transcripts delivered**. Private, removed and caption-less videos are free.
- **Built for reliability**: residential proxy rotation, automatic session retirement when YouTube shows a bot check, mobile-client fallback and retries.

### Pricing

**Pay per result: $3.00 per 1,000 transcripts** ($0.003 per transcript).

| Use case | Transcripts | Cost |
|---|---|---|
| Try it out | 10 | $0.03 |
| One channel's back catalogue | 500 | $1.50 |
| Research dataset | 10,000 | $30.00 |

Use **Max transcripts in total** to put a hard cap on any run. Apify's free plan monthly credits work with this actor.

### Input

| Field | Description |
|---|---|
| `urls` | Videos, Shorts, channels (`@handle`, `/channel/UC…`), playlists — URLs or IDs. |
| `searchQueries` | Keywords; the actor takes videos from YouTube search results. |
| `maxVideosPerSource` | Max videos per channel / playlist / search (default 50). |
| `maxResults` | Stop after this many transcripts (0 = unlimited). |
| `channelTab` | `videos`, `shorts` or `streams`. |
| `languages` | Preferred caption languages in order, e.g. `["en", "es"]`. |
| `preferAutoGenerated` | Prefer auto captions over manual ones. |
| `translateTo` | Translate captions to this language code (e.g. `en`). |
| `includeSegments` | Timestamped segments array (default on). |
| `includeSrt` | Add an `srt` field. |
| `includeDescription` | Add the description and tags. |
| `outputFailedVideos` | Also list videos without transcripts, with a reason (free). |
| `proxyConfiguration` | Residential proxy is the default and strongly recommended. |

Example:

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/@mkbhd",
    "https://www.youtube.com/playlist?list=PL-osiE80TeTt2d9bfVyTiXJA-UTHn6WwU"
  ],
  "searchQueries": ["how to start a saas"],
  "maxVideosPerSource": 20,
  "languages": ["en"],
  "includeSrt": true
}
```

### Output

One dataset item per video. Export as JSON, CSV, Excel, XML or HTML, or read it via the API.

```json
{
  "videoId": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley",
  "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "channelUrl": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw",
  "lengthSeconds": 213,
  "viewCount": 1826117339,
  "thumbnail": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/sddefault.webp",
  "source": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "scrapedAt": "2026-10-13T09:58:37.060Z",
  "status": "ok",
  "language": "en",
  "languageName": "English",
  "isAutoGenerated": false,
  "isTranslated": false,
  "availableLanguages": ["en", "en (auto)", "de-DE", "ja", "pt-BR", "es-419"],
  "wordCount": 487,
  "transcript": "[♪♪♪] ♪ 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…"
}
```

Run statistics (transcripts, videos without captions, failures) are saved to the `RUN_STATS` record in the run's key-value store.

### Use with AI agents (MCP), LangChain, RAG & the API

This actor is a ready-made **tool for AI agents**: an LLM can call it, wait for the run and read clean JSON back.

**MCP server (Claude Desktop, Claude Code, Cursor, VS Code, any MCP client)** — add Apify's hosted MCP server with this actor enabled as a tool:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com/?tools=murch1k/youtube-transcript-scraper",
      "headers": { "Authorization": "Bearer <APIFY_TOKEN>" }
    }
  }
}
```

**LangChain / LangGraph** (`pip install langchain-apify`, set `APIFY_API_TOKEN`):

```python
from langchain_apify import ApifyActorsTool, ApifyWrapper
from langchain_core.documents import Document

## 1) give the actor to an agent as a tool
tool = ApifyActorsTool("murch1k/youtube-transcript-scraper")

## 2) or load results as Documents for a RAG index
loader = ApifyWrapper().call_actor(
    actor_id="murch1k/youtube-transcript-scraper",
    run_input={"urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ", "https://www.youtube.com/@mkbhd", "https://www.youtube.com/playlist?list=PL-osiE80TeTt2d9bfVyTiXJA-UTHn6WwU"], "searchQueries": ["how to start a saas"], "maxVideosPerSource": 20, "languages": ["en"], "includeSrt": True},
    dataset_mapping_function=lambda item: Document(page_content=item["transcript"], metadata={"url": item.get("url")}),
)
docs = loader.load()
```

**REST API — one synchronous call, dataset items in the response:**

```bash
curl -X POST "https://api.apify.com/v2/acts/murch1k~youtube-transcript-scraper/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ", "https://www.youtube.com/@mkbhd", "https://www.youtube.com/playlist?list=PL-osiE80TeTt2d9bfVyTiXJA-UTHn6WwU"], "searchQueries": ["how to start a saas"], "maxVideosPerSource": 20, "languages": ["en"], "includeSrt": true}'
```

Also works with the Apify Python/JS clients, **Make, Zapier, n8n**, Google Sheets, webhooks and schedules. Export as JSON, CSV, Excel, XML or RSS.

**RAG tip:** `transcript` is the field to chunk and embed; keep `videoId`, `title`, `channelName` and `url` as metadata, and use `segments[].start` to link answers back to the exact second.

### Use cases

- **AI & LLM**: feed transcripts into ChatGPT/Claude, build RAG knowledge bases, summarise channels.
- **Content repurposing**: turn videos into blog posts, newsletters, social threads.
- **Market & competitor research**: what topics, products and claims competitors talk about.
- **SEO**: mine keywords and questions from top-ranking videos.
- **Subtitles**: download SRT files for editing or translation.

### Integrations

Works with the Apify API, Make, Zapier, n8n, Google Sheets, webhooks and the Apify MCP server, so AI agents can call it directly.

### FAQ

**Does it need a YouTube account or API key?** No.

**What if a video has no captions?** It is skipped and not charged. Turn on `outputFailedVideos` to see these videos with the reason.

**Why are some videos missing?** Private, deleted, members-only and some age-restricted videos have no public captions.

**Is scraping YouTube legal?** The actor only reads publicly available caption data. You are responsible for how you use the data, including copyright and YouTube's Terms of Service, and local law.

### Support

Found a problem or need a feature (e.g. comments, chapters, Whisper transcription for videos without captions)? Open an issue on the actor's **Issues** tab and we'll respond quickly.

# Actor input Schema

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

Any mix of: video URLs (watch, youtu.be, /shorts/, /live/), 11-char video IDs, channel URLs or @handles, playlist URLs or IDs.

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

Find videos by YouTube search and return their transcripts.

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

Limit of videos taken from each channel, playlist or search query. Direct video URLs are not limited.

## `maxResults` (type: `integer`):

Stop after this many transcripts (0 = no limit). Useful to cap costs.

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

Which channel tab to read videos from.

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

Language codes in order of preference (e.g. en, es, de). If none is available, the best other track is returned.

## `preferAutoGenerated` (type: `boolean`):

By default manually uploaded captions win over auto-generated ones in the same language.

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

Optional language code (e.g. en, es). Uses YouTube's own caption translation when the chosen track is in another language.

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

Adds a 'segments' array: \[{start, duration, text}] in seconds.

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

Adds an 'srt' field with a ready-to-use .srt subtitle file.

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

Adds the full video description and keywords.

## `outputFailedVideos` (type: `boolean`):

Also write rows for videos that are private, removed or have no captions (status field explains why). These rows are free.

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

Parallel requests. Higher is faster but may trigger more blocks.

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

YouTube blocks datacenter IPs. Residential proxy is strongly recommended and used by default.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxVideosPerSource": 50,
  "maxResults": 0,
  "channelTab": "videos",
  "languages": [
    "en"
  ],
  "preferAutoGenerated": false,
  "translateTo": "",
  "includeSegments": true,
  "includeSrt": false,
  "includeDescription": false,
  "outputFailedVideos": false,
  "maxConcurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `runStats` (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"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("murch1k/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"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("murch1k/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"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call murch1k/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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