# YouTube Transcript Scraper — Videos, Playlists & Channels (`jeffev/youtube-transcript-pro`) Actor

Get transcripts (captions) from YouTube videos, whole playlists or entire channels, in any language, with timestamps, full text and AI-ready chunks. Auto-translate, manual or auto-generated captions. Pay only for transcripts delivered.

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

## Pricing

from $2.80 / 1,000 transcript delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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, playlists & whole channels

Get the **transcript (captions) of any YouTube video**, or of **every video in a playlist or channel**, in one run. Full text, timestamped segments and optional **AI-ready chunks** for embeddings, RAG, summaries and content repurposing.

### Why this one

- **Videos, playlists and channels**: paste `youtube.com/@channel` and get the transcripts of its latest N videos. No need to collect video URLs first.
- **Any language, your order of preference**: `["pt", "en"]` picks Portuguese if it exists (including `pt-BR`), otherwise English, otherwise the first available.
- **Human captions first**: manual captions are preferred over auto-generated ones (optional), and every item says which one you got.
- **Auto-translate** to any language with YouTube's own translation (`translateTo`).
- **AI-ready chunks**: set `chunkWords: 300` and get blocks of ~300 words with start and end times, ready to embed.
- **Built-in block handling**: YouTube blocks many server IPs. The Actor starts direct and switches to Apify Proxy automatically on the first block, so runs don't fail halfway.
- **Pay only for transcripts delivered**. Videos without captions, private or unavailable videos are listed with the reason and cost nothing.

### Input

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://www.youtube.com/@veritasium",
    "https://www.youtube.com/playlist?list=PL..."
  ],
  "languages": ["en"],
  "maxVideosPerSource": 50,
  "chunkWords": 300
}
```

### Output (one item per video)

| Field | Description |
|---|---|
| `videoId`, `url`, `title`, `channel`, `duration` | video info |
| `language`, `languageName`, `isAutoGenerated` | which caption track was used |
| `text`, `wordCount` | full transcript as plain text |
| `segments` | `[{start, duration, text}]` — timestamped lines (optional) |
| `chunks` | `[{start, end, text}]` — ~N-word blocks for AI (optional) |
| `error` | reason when no transcript was available (not charged) |

### Example output

One real item from a test run (long texts and lists shortened):

```json
{
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "title": "Me at the zoo",
  "channel": "jawed",
  "duration": null,
  "language": "en",
  "languageName": "English",
  "isAutoGenerated": false,
  "text": "All right, so here we are, in front of the elephants the cool thing about these guys is that they have really... really really long trunks and that's cool (b...",
  "wordCount": 39,
  "segments": [
    {
      "start": 1.2,
      "duration": 2.16,
      "text": "All right, so here we are, in front of the\nelephants"
    },
    {
      "start": 5.32,
      "duration": 2.66,
      "text": "the cool thing about these guys is that they\nhave really..."
    },
    {
      "start": 7.97,
      "duration": 4.64,
      "text": "really really long trunks"
    }
  ]
}
```

### Notes

Transcripts only exist when the creator uploaded captions or YouTube generated them automatically. Live streams that are still running and some music videos have none.

### How much does it cost?

You pay only for results delivered, at a fixed price per item. **Apify platform usage is included** in that price, so there are no compute costs on top. Errors and items that couldn't be found are free.

| What you get | Price | Example |
|---|---|---|
| Transcript delivered | $0.004 each | 1,000 transcript delivereds = $4.00 |

The Apify **Free plan includes $5 of monthly credit**, enough for about **1,250 transcript delivereds** per month at no cost. You can also set a maximum spend per run.

On paid Apify plans it gets cheaper automatically: **10% off on Starter, 20% on Scale and 30% on Business**.

### Feedback

Found a bug, a site change, or need an extra field? Open an issue in the **Issues** tab: every issue is read and answered. If this actor saved you time, a **review** helps other people find it.

# Actor input Schema

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

One per line: video URL or ID, playlist URL, or channel URL (youtube.com/@name). Playlists and channels expand to their videos.

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

Language codes in order of preference, e.g. en, pt, es. 'pt' also matches 'pt-BR'. If none is available, the first available transcript is returned.

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

Limit of videos taken from each playlist or channel (newest first for channels).

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

Language code to auto-translate the transcript to, using YouTube's translation (e.g. en, pt, es).

## `preferManual` (type: `boolean`):

Use manually created captions when available, falling back to auto-generated.

## `includeTimestamps` (type: `boolean`):

Adds a 'segments' list with start time and duration for each caption line.

## `chunkWords` (type: `integer`):

If set, adds a 'chunks' list grouping the transcript into blocks of about N words with start/end times, ready for embeddings and RAG.

## `proxy` (type: `object`):

YouTube blocks many server IPs. The Actor starts without a proxy and switches to this one on the first block. Residential is recommended.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "languages": [
    "en"
  ],
  "maxVideosPerSource": 50,
  "preferManual": true,
  "includeTimestamps": true,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One item per video with full text, timestamped segments and optional AI-ready chunks.

# 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=jNQXAC9IVRw"
    ],
    "languages": [
        "en"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("jeffev/youtube-transcript-pro").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=jNQXAC9IVRw"],
    "languages": ["en"],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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

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/dvVQ7QbT0QHRpaP7X/builds/72PuB03GvTTcguCVW/openapi.json
