# YouTube Transcript Scraper – Fast, Reliable, with SRT/VTT (`tpai/youtube-transcript-pro`) Actor

Get the transcript (subtitles / captions) of any YouTube video in bulk: plain text, timestamps, SRT and VTT, video metadata and automatic translation. Pay only for successful transcripts.

- **URL**: https://apify.com/tpai/youtube-transcript-pro.md
- **Developed by:** [Tom](https://apify.com/tpai) (community)
- **Categories:** Videos, AI, Social media
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 transcripts

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 – fast, reliable, with SRT/VTT

Get the **transcript (captions / subtitles) of any YouTube video**, in bulk, in seconds. Each result includes the full plain text, timestamped segments, optional **SRT** and **WebVTT** subtitle files, and the video metadata (title, channel, duration, views, available languages), all for one low price.

It works with regular videos, **Shorts**, live replays, `youtu.be` links and plain video IDs, and supports every language YouTube has captions for.

### Why use this YouTube Transcript Scraper?

- ⚡ **Fast:** no browser, just direct requests. About 25 videos in roughly a minute with the default settings.
- 🛡️ **Reliable:** premium residential proxies and automatic retries are built in. You don't need to configure any proxy.
- 🌍 **Any language:** pick your preferred languages (e.g. `fr,en`). If none exists, you get the original captions.
- 👤 **Human captions first:** creator-uploaded subtitles are preferred over auto-generated ones, and every result says which one you got.
- 🧾 **Ready-to-use formats:** plain text for AI and LLM prompts, timestamped segments for search and chaptering, SRT and VTT for video editors.
- 📊 **Metadata included at no extra cost:** title, channel, channel ID, duration, view count, and the list of available caption languages.
- 💸 **Pay only for success:** videos without captions, private or deleted videos and invalid links are **never charged**.

### Use cases

- **AI and LLM workflows:** summarize videos, build RAG knowledge bases, create study notes, and feed transcripts to ChatGPT, Claude or your agents.
- **Content repurposing:** turn videos into blog posts, newsletters, threads and show notes.
- **SEO and research:** analyze what competitors and creators say, at scale.
- **Subtitles:** download SRT or VTT files for video editing (DaVinci Resolve, Premiere, CapCut…).
- **Education and accessibility:** searchable lecture and conference transcripts.

### How to use it

1. Paste one or more **YouTube URLs or video IDs**, one per line.
2. Optionally set your **preferred language(s)**, for example `en` or `fr,en`.
3. Click **Start**. Each video becomes one row in the **Output** tab, ready to export to JSON, CSV, Excel or HTML, or to read via API.

It also works through the Apify API, on a schedule, and from Make, Zapier, n8n and any MCP client or AI agent.

### Input example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/aircAruvnKk",
    "https://www.youtube.com/shorts/tPEE9ZwTmy0"
  ],
  "language": "en",
  "includeTimestamps": true,
  "includeSrt": true
}
```

### Output example

```json
{
  "videoId": "aircAruvnKk",
  "url": "https://www.youtube.com/watch?v=aircAruvnKk",
  "title": "But what is a neural network? | Deep learning chapter 1",
  "channelName": "3Blue1Brown",
  "channelId": "UCYO_jab_esuFRV4b17AJtAw",
  "durationSeconds": 1120,
  "viewCount": 25081107,
  "language": "en",
  "autoGenerated": false,
  "translated": false,
  "availableLanguages": [{ "code": "en", "name": "English", "autoGenerated": false }, { "code": "fr", "name": "French", "autoGenerated": false }, "…"],
  "text": "This is a 3. It's sloppily written and rendered at an extremely low resolution of 28x28 pixels...",
  "wordCount": 3357,
  "segmentCount": 286,
  "segments": [{ "start": 4.22, "duration": 1.18, "text": "This is a 3." }],
  "srt": "1\n00:00:04,220 --> 00:00:05,400\nThis is a 3.\n...",
  "success": true
}
```

Videos without a transcript are returned with `success: false` and an `errorCode`: `no_captions`, `unavailable`, `invalid_url` or `blocked`. They are not charged.

### Pricing

**$3 per 1,000 transcripts** ($0.003 per video). Metadata, SRT/VTT and timestamps are included. Proxies and retries are included. Failed videos are free.

You can cap the cost of each run with the **Maximum cost per run** setting.

### Tips and limitations

- **No captions = no transcript.** This Actor reads the captions YouTube already has, whether creator-uploaded or auto-generated. It does not do speech-to-text, and some music videos and very new uploads have no captions.
- **Translation (optional, best effort):** the `translateTo` option uses YouTube's own automatic translation. YouTube does not offer it for every video. When it isn't available, you get the original language and a `translationNote` explains why.
- Need a whole channel or playlist? Open an issue, it's on the roadmap.

### More YouTube tools from the same developer

- **YouTube Channel & Playlist Scraper:** every video of a channel or playlist, with optional transcripts in the same run.
- **YouTube Comments Scraper:** comments and replies, $1 per 1,000.
- **YouTube Scraper (search & video details):** search results with date, views and duration filters.

### FAQ

**Is it legal to download YouTube transcripts?**
Transcripts of public videos are publicly displayed by YouTube. You are responsible for how you use the content (copyright, YouTube's terms). Don't republish others' content without permission.

**Can I use it from my AI agent?**
Yes. Call it through the Apify API or the Apify MCP server. The `text` field is ready to paste into an LLM prompt.

**Something isn't working?**
Open an issue in the **Issues** tab with the video URL. We usually answer within 24–48 hours.

# Actor input Schema

## `videoUrls` (type: `array`):

Video URLs or IDs, one per line. Supports watch, youtu.be, Shorts, embed and live links.

## `language` (type: `string`):

Language code(s) in order of preference, comma-separated, e.g. 'en' or 'fr,en'. If none is available, the video's original captions are returned.

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

Optional language code (e.g. 'en', 'fr', 'es', 'de'). Uses YouTube's own automatic translation when the transcript is in another language.

## `preferManualCaptions` (type: `boolean`):

Use creator-uploaded captions when they exist, otherwise auto-generated ones.

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

Add a 'segments' list with start time, duration and text for each caption line.

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

Add the transcript as an SRT subtitle file content.

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

Add the transcript as a WebVTT subtitle file content.

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

How many videos to process at the same time.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/aircAruvnKk"
  ],
  "language": "en",
  "preferManualCaptions": true,
  "includeTimestamps": true,
  "includeSrt": false,
  "includeVtt": false,
  "maxConcurrency": 10
}
```

# Actor output Schema

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

One item per video: metadata, full text, timestamped segments and optional SRT/VTT.

# 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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://youtu.be/aircAruvnKk"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tpai/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 = { "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://youtu.be/aircAruvnKk",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("tpai/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 '{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/aircAruvnKk"
  ]
}' |
apify call tpai/youtube-transcript-pro --silent --output-dataset

```

## MCP server setup

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