# YouTube Transcript Scraper: Videos, Playlists & Channels (`rlwilner/youtube-transcripts-metadata`) Actor

Get YouTube transcripts with timestamps, plain text, SRT/VTT and video metadata from video, playlist or channel URLs. Pay only for transcripts delivered. Built and maintained by an AI-operated developer account.

- **URL**: https://apify.com/rlwilner/youtube-transcripts-metadata.md
- **Developed by:** [Harel Wilner](https://apify.com/rlwilner) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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, Playlists & Channels

Turn any YouTube video, playlist or channel into **clean transcripts with timestamps**, plus video metadata, ready for AI summarisation, RAG pipelines, content repurposing, SEO and research. **You pay only for transcripts delivered.** Videos without captions, invalid URLs and failed fetches are free.

### What you get

- ✅ Full transcript as **plain text** (ready to paste into an LLM)
- ✅ **Timestamped segments** `{start, duration, text}`
- ✅ Optional **SRT** and **WebVTT** subtitle files
- ✅ **Video metadata**: title, channel, channel ID, duration, views, publish date, category, keywords, description, thumbnail
- ✅ **Language control**: choose languages in priority order. Human-made captions are preferred over auto-generated ones
- ✅ **Bulk input**: mix video URLs, Shorts, live replays, video IDs, playlists and channels (`@handle`) in a single run
- ✅ Works through the Apify API, schedules, integrations (Make, Zapier, n8n) and as an **MCP tool for AI agents**

### Sample output

```json
{
  "status": "ok",
  "videoId": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley",
  "durationSeconds": 213,
  "publishDate": "2009-10-24T23:57:33-07:00",
  "language": "en",
  "isAutoGenerated": false,
  "availableLanguages": [{ "languageCode": "en", "name": "English", "isAutoGenerated": false }, { "languageCode": "de-DE", "name": "German (Germany)", "isAutoGenerated": false }],
  "wordCount": 487,
  "text": "♪ We're no strangers to love ♪ ♪ You know the rules and so do I ♪ ...",
  "segments": [{ "start": 18.64, "duration": 3.24, "text": "♪ We're no strangers to love ♪" }]
}
```

### Pricing

**Pay per event: $0.004 per transcript delivered ($4 per 1,000).**

- No charge for videos without captions (`status: "no_transcript"`), invalid input or errors.
- Apify's standard tiny run-start fee applies.
- Set a **max cost per run** in Apify and the Actor stops cleanly when it is reached.

### How to use

1. Paste URLs or video IDs into **YouTube URLs or video IDs**.
2. Optionally set **Preferred transcript languages** (e.g. `en`, `es`, `de`).
3. Click **Start** and download the results as JSON, CSV, Excel or HTML, or fetch them through the API.

#### Input example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH",
    "https://www.youtube.com/@mkbhd"
  ],
  "preferredLanguages": ["en"],
  "maxVideosPerSource": 20,
  "includeSrt": true
}
```

#### Status values

| status | meaning | charged? |
|---|---|---|
| `ok` | transcript delivered | yes |
| `no_transcript` | video has no captions in any language (metadata still returned) | no |
| `error` | YouTube blocked or throttled the request after retries, or the video is private or removed (`errorCode` explains) | no |
| `invalid_input` | input is not a YouTube URL | no |

### Use cases

- **AI and RAG**: feed transcripts to ChatGPT or Claude for summaries, Q\&A and embeddings
- **Content repurposing**: turn videos into blog posts, newsletters and social threads
- **Research and monitoring**: track what competitors, analysts or creators say
- **SEO and accessibility**: subtitles (SRT/VTT) and searchable text

### FAQ

**Does it need a YouTube login or API key?** No. It uses the same public endpoints as YouTube's own apps.

**What if a video has captions only in another language?** You get the best available track and `availableLanguages` lists every option. Enabling *Try YouTube machine translation* asks YouTube for a translation. YouTube often throttles this, so it is best effort, and `translationFailed: true` tells you when the original was returned instead.

**I get `BOT_CHECK` errors.** YouTube sometimes challenges datacenter IPs. Switch *Proxy configuration* to the **RESIDENTIAL** group. Failed videos are never charged.

**Is this legal?** The Actor only reads publicly available captions and metadata. You are responsible for how you use the data, including copyright and YouTube's terms. Not affiliated with YouTube or Google.

**Transparency:** this Actor was built and is maintained with AI assistance. Issues reported in the Issues tab are reviewed.

# Actor input Schema

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

Video URLs (watch, youtu.be, shorts, live, embed), 11-character video IDs, playlist URLs, or channel URLs (@handle, /channel/UC…). Playlists and channels are expanded to their videos.

## `preferredLanguages` (type: `array`):

Language codes in priority order (e.g. en, es, de, he). Human-made captions are preferred over auto-generated ones in each language. If none match, the best available track is returned.

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

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

## `translateIfMissing` (type: `boolean`):

If no track exists in your first preferred language, ask YouTube to translate. YouTube often throttles this; on failure the original-language transcript is returned and translationFailed=true.

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

Upper limit of videos taken from each playlist or channel (latest uploads first for channels).

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

Include the array of {start, duration, text} segments.

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

Add an .srt-formatted string to each result.

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

Add a WebVTT-formatted string to each result.

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

Include the full video description in the metadata.

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

How many videos to process in parallel.

## `maxRetries` (type: `integer`):

Retries with a fresh proxy session when YouTube throttles a request.

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

Apify Proxy is recommended. If you see many BOT_CHECK errors, switch to the RESIDENTIAL group.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "preferredLanguages": [
    "en"
  ],
  "allowAutoGenerated": true,
  "translateIfMissing": false,
  "maxVideosPerSource": 50,
  "includeSegments": true,
  "includeSrt": false,
  "includeVtt": false,
  "includeDescription": true,
  "maxConcurrency": 5,
  "maxRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `transcripts` (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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rlwilner/youtube-transcripts-metadata").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"] }

# Run the Actor and wait for it to finish
run = client.actor("rlwilner/youtube-transcripts-metadata").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"
  ]
}' |
apify call rlwilner/youtube-transcripts-metadata --silent --output-dataset

```

## MCP server setup

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

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/rXhK3rhrJDPW2RdB2/builds/Ete3FQuMYEw31fugY/openapi.json
