# YouTube Transcript Scraper: Captions, Metadata & Playlists (`neon_innovation_lab/youtube-transcript-scraper`) Actor

Get YouTube transcripts with timestamps and video metadata for videos, playlists and channels. Pick languages, translate captions, chunk for RAG. Pay per transcript.

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

## Pricing

from $6.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: Captions, Metadata & Playlists

Get the **transcript of any YouTube video** with timestamps, plus title, channel, publish date, views and length. Give it video links, whole **playlists** or **channels** and it returns one row per video. Choose languages, auto-translate captions, and split transcripts into ready-to-embed chunks for RAG, summaries and AI agents.

Videos without captions, private or unavailable videos are **never charged**. Only delivered transcripts are billed.

### What you get

| Field | Description |
|---|---|
| `status` | `ok`, `no_captions`, `unavailable` or `error` |
| `videoId`, `url`, `title` | Video identity |
| `channelName`, `channelId`, `channelUrl` | Channel |
| `publishDate`, `lengthSeconds`, `viewCount` | Metadata |
| `language`, `isAutoGenerated`, `isTranslation` | Which captions were used |
| `transcript`, `wordCount` | Full transcript text |
| `segments` | `[{ start, duration, text }]` timestamps (optional) |
| `chunks` | `[{ start, end, text }]` fixed-length pieces for embeddings (optional) |
| `availableLanguages` | All caption languages the video offers |

```json
{
  "status": "ok",
  "videoId": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up",
  "channelName": "Rick Astley",
  "language": "en",
  "isAutoGenerated": false,
  "wordCount": 342,
  "transcript": "[Music] We're no strangers to love ...",
  "segments": [{ "start": 18.64, "duration": 3.24, "text": "We're no strangers to love" }]
}
```

(Shortened example.)

### Input

| Field | Default | Notes |
|---|---|---|
| `urls` | required | Video URLs/ids, playlist URLs, channel URLs or `@handles` |
| `languages` | `["en"]` | Preferred languages in order. Manual captions are preferred over auto-generated. If none match, captions are auto-translated into the first language when the video allows it |
| `maxVideosPerSource` | `50` | Limit per playlist or channel |
| `includeSegments` | `true` | Timestamped segments |
| `chunkSeconds` | `0` | Set e.g. `60` to get RAG chunks |
| `includeDescription` | `false` | Adds the video description |

```json
{ "urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ", "@mkbhd"], "languages": ["en", "es"], "maxVideosPerSource": 20, "chunkSeconds": 60 }
```

### Pricing (pay per event)

| Event | Price |
|---|---|
| Transcript scraped | $0.006 per transcript delivered |
| Actor start | $0.00005 per run |

That is **$6 per 1,000 transcripts**. 100 videos cost about $0.60. Set a maximum cost per run in the Apify console and the run stops cleanly when it is reached.

### Why it is reliable

YouTube blocks most automated traffic from data-center IPs. This Actor routes through residential proxies by default, rotates the IP and retries on bot checks and rate limits, and reports a clear status per video instead of silently skipping it.

### Limits

- Only videos that have captions (written or auto-generated) can return a transcript. Auto-generated captions can contain errors.
- Private, deleted, age-restricted or members-only videos return `unavailable`.
- Live streams without captions yet return `no_captions`.
- Very large channels are capped by `maxVideosPerSource`.
- Respect YouTube's terms and the rights of content owners when using transcripts.

### FAQ

**Can I get transcripts for a whole channel?** Yes. Pass the channel URL or @handle and set `maxVideosPerSource`.

**Can I get a language the video does not offer?** If the video allows translation, captions are auto-translated into your first preferred language and marked `isTranslation: true`.

**How do I use it with an AI agent or RAG pipeline?** Set `chunkSeconds` and embed the `chunks`, or pass `transcript` directly to your LLM. The Actor can also be called over MCP through Apify.

**Something broke?** Open an issue from the Issues tab with the run URL and the video link.

### More from Neon Innovation Lab

- [AI Web Search & RAG Scraper](https://apify.com/neon_innovation_lab/ai-search-rag-scraper): live web search results as clean Markdown for LLM prompts.
- [App Store & Google Play Reviews Scraper](https://apify.com/neon_innovation_lab/app-store-play-store-reviews-scraper): reviews for many apps and countries in one run.
- [E-Commerce Price Tracker](https://apify.com/neon_innovation_lab/ecommerce-pricing-intel): product prices and stock levels across online stores.
- [Google Maps Leads Scraper](https://apify.com/neon_innovation_lab/google-maps-b2b-lead-enricher): businesses from Google Maps with phones, websites and emails found on their sites.

# Actor input Schema

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

YouTube video URLs or 11-character ids (watch, youtu.be, shorts), playlist URLs, and channel URLs or @handles. Playlists and channels are expanded to their videos.

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

Language codes such as en, es, de. The first available language is used (manually written captions before auto-generated ones). If none is available but the video allows translation, captions are auto-translated into the first language.

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

Limit for each playlist or channel URL (newest first for channels).

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

Adds a segments array (start, duration, text) to each row. The plain transcript text is always included.

## `chunkSeconds` (type: `integer`):

If above 0, adds a chunks array grouping the transcript into pieces of about this many seconds, ready for embeddings. 0 disables chunking.

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

Adds the video description to each row.

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

Residential proxies are used by default because YouTube blocks most datacenter IPs. Leave unchanged unless you have a reason to override.

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

Videos processed in parallel.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/jNQXAC9IVRw"
  ],
  "languages": [
    "en"
  ],
  "maxVideosPerSource": 10,
  "includeSegments": true,
  "chunkSeconds": 0,
  "includeDescription": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 5
}
```

# Actor output Schema

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

One row per video.

# 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",
        "https://youtu.be/jNQXAC9IVRw"
    ],
    "languages": [
        "en"
    ],
    "maxVideosPerSource": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("neon_innovation_lab/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",
        "https://youtu.be/jNQXAC9IVRw",
    ],
    "languages": ["en"],
    "maxVideosPerSource": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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