# YouTube Transcript Scraper - Subtitles to Text, SRT (`librevlad/youtube-transcripts-fast`) Actor

Get transcripts (subtitles, captions) of YouTube videos as plain text, timestamped segments or SRT. Any language with fallback, batch URLs, Shorts and live. Pay only for transcripts you receive.

- **URL**: https://apify.com/librevlad/youtube-transcripts-fast.md
- **Developed by:** [Владислав Новік](https://apify.com/librevlad) (community)
- **Categories:** Videos, AI, Social media
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.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/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 Transcripts — Fast & Cheap

**Pricing:** $4.00 per 1,000 transcripts, as text, timed segments or SRT. Videos without a transcript and blocked requests are free.

Fetch subtitles (transcripts) from any public YouTube video in seconds — as clean plain text, timed segments, or SRT subtitles. Just paste video links, get transcripts.

This Actor is built for:

- **Research** — quote and analyze what was actually said in interviews, lectures, podcasts, and hearings.
- **AI & LLM pipelines** — feed transcripts into RAG, fine-tuning, summarization, and classification workflows.
- **Notes & summaries** — turn long videos into study notes, meeting minutes, or blog drafts.
- **SEO & content teams** — extract keywords, headings-ready text, and content ideas from competitors' videos.

The Actor uses YouTube's own caption tracks (manual and auto-generated) through the [`youtube-transcript-api`](https://github.com/jdepoix/youtube-transcript-api) library, through Apify Proxy. No login, no cookies, no browser.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `videos` | array of strings | — (required) | YouTube video URLs (`watch?v=`, `youtu.be/`, `shorts/`, `embed/`, `live/`) or bare 11-character video IDs. Duplicates are removed automatically. |
| `languages` | array of strings | `["en"]` | Language codes in order of preference, e.g. `["en", "de"]`. |
| `fallbackToAnyLanguage` | boolean | `true` | If none of the preferred languages is available, use any available transcript — manually created first, auto-generated last. |
| `outputFormat` | select | `text` | `text` (one line), `segments` (timed fragments), or `srt` (SubRip subtitles). |
| `maxConcurrency` | integer (1–20) | `5` | How many videos are fetched at the same time. |
| `proxyConfiguration` | proxy editor | Apify Proxy (datacenter) | The default works for most videos and is included in the price. If many videos come back blocked, switch to the `RESIDENTIAL` group. |

#### Example input

```json
{
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://youtu.be/aqz-KE-bpKQ"
    ],
    "languages": ["en"],
    "fallbackToAnyLanguage": true,
    "outputFormat": "text",
    "maxConcurrency": 5,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
}
```

### Output

Each video produces one item in the Actor's dataset (see the **Overview** view for a compact table).

Successful item:

```json
{
    "videoId": "dQw4w9WgXcQ",
    "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "language": "English",
    "languageCode": "en",
    "isGenerated": false,
    "status": "ok",
    "text": "Never gonna give you up Never gonna let you down ..."
}
```

With `"outputFormat": "segments"` the item also contains `"segments": [{"start": 0.0, "duration": 2.5, "text": "Never gonna give you up"}, ...]`; with `"outputFormat": "srt"` it also contains an `"srt"` string in SubRip format.

Failed item (not charged):

```json
{
    "videoId": "dQw4w9WgXcQ",
    "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "status": "error",
    "errorType": "TranscriptsDisabled",
    "message": "Could not retrieve a transcript: the video has no subtitles."
}
```

Typical `errorType` values: `InvalidInput` (the string was not a video URL/ID), `TranscriptsDisabled` (no caption track), `NoTranscriptFound` (requested language unavailable and fallback disabled), `VideoUnavailable` (removed, private, or region-blocked), `RequestBlocked` / `IpBlocked` (YouTube rate limiting after automatic retries).

### Pricing

**$4.00 per 1,000 transcripts — $0.004 per transcript, proxies included.**

- Billing uses Apify's **pay-per-event** model: one `transcript` event is charged for each transcript that is successfully fetched and saved to the dataset.
- **You pay only for transcripts you actually receive.** Errors (disabled subtitles, unavailable videos, blocked requests, invalid input) are saved to the dataset with a `status: "error"` row and are **not charged**.
- Platform usage (compute and proxy traffic) is included in the price: you pay only the per-transcript fee.

### Limitations

- Only **public videos that have caption tracks** (manual or auto-generated) are supported. Videos without subtitles cannot be processed.
- Private, unlisted, members-only, and deleted videos are not accessible — no login or cookies are used.
- Live streams have no transcripts until YouTube publishes caption tracks for them.
- If YouTube blocks a request, the Actor automatically retries up to **2 times** with a fresh proxy session and a short pause; if it still fails, the video is marked as an error (`RequestBlocked` / `IpBlocked`) and **is not charged**.
- Transcripts are returned in the original language only — this Actor does **not** translate captions.
- Caption availability, language names, and auto-generated text quality are controlled by YouTube and vary per video.

### FAQ

**Which video URL formats are accepted?**
All common ones: `youtube.com/watch?v=…`, `youtu.be/…`, `youtube.com/shorts/…`, `youtube.com/embed/…`, `youtube.com/live/…`, and bare 11-character video IDs. Duplicates are removed automatically.

**The video is in German but I need English — what happens?**
The Actor fetches the original caption track in the best matching language you listed. If none of your preferred languages exists and *Fallback to any language* is on, it takes any available transcript (manual before auto-generated) and reports the actual language in the `language` / `languageCode` fields. It does not translate.

**What is the difference between manual and auto-generated captions?**
Manual captions are uploaded by the creator and are usually higher quality. The Actor always prefers them; `isGenerated: false` marks them in the output.

**Why did a video fail with `RequestBlocked` or `IpBlocked`?**
YouTube rate-limited the requests. The Actor already retried twice with fresh proxy sessions. Lower `maxConcurrency`, try again later, or switch the proxy group to `RESIDENTIAL`. Blocked videos are not charged.

**Where do I find the results?**
In the run's **Dataset** (Storage → Dataset), with a ready-made **Overview** table view. You can download them as JSON, CSV, Excel, and more, or pull them via API.

**Do you need my YouTube account or cookies?**
No. The Actor never asks for cookies, logins, or API keys, and it does not solve captchas.

Use responsibly and check YouTube's terms for your use case.

### More actors from the same developer

Pay only for results, no logins:

- [YouTube Search & Channel Videos](https://apify.com/librevlad/youtube-search-channel-videos) — search results and every video of a channel.
- [YouTube Shorts Scraper](https://apify.com/librevlad/youtube-shorts-scraper-fast) — Shorts from keyword search and from channels' Shorts tab.
- [Website Crawler to Markdown](https://apify.com/librevlad/website-crawler-markdown) — crawl a website or docs section into clean Markdown for RAG and LLMs.
- [Website to Markdown](https://apify.com/librevlad/website-to-markdown) — turn a list of pages and PDFs into clean Markdown or text.
- [Website Screenshot & PDF](https://apify.com/librevlad/page-screenshot-pdf) — full-page and mobile screenshots, URL to PDF.
- [App Store Scraper](https://apify.com/librevlad/app-store-scraper) — app details, keyword search positions and reviews from Apple's public API.
- [Google Trends Scraper](https://apify.com/librevlad/google-trends-scraper-fast-cheap) — interest over time, interest by region and related queries.
- [Threads Scraper](https://apify.com/librevlad/threads-scraper) — public Threads posts and profiles without login.

# Actor input Schema

## `videos` (type: `array`):

YouTube video URLs (watch?v=, youtu.be/, shorts/, embed/, live/) or bare 11-character video IDs. Duplicates are removed automatically.

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

ISO 639-1 language codes in order of preference, e.g. \["en", "de"].

## `fallbackToAnyLanguage` (type: `boolean`):

If none of the preferred languages is available, use any available transcript — manually created ones first, auto-generated last.

## `outputFormat` (type: `string`):

text = full transcript as one line, segments = timed fragments, srt = SubRip subtitles.

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

How many videos to fetch at the same time (1-20). Higher values increase the chance of YouTube rate limiting.

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

Apify Proxy settings. The default datacenter proxy works for most videos and is included in the price; if many videos come back blocked, switch to the RESIDENTIAL group.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "fallbackToAnyLanguage": true,
  "outputFormat": "text",
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "languages": [
        "en"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("librevlad/youtube-transcripts-fast").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 = {
    "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "languages": ["en"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("librevlad/youtube-transcripts-fast").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 '{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call librevlad/youtube-transcripts-fast --silent --output-dataset

```

## MCP server setup

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

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/KdHrGLeF6wW4xcyc9/builds/KeB4ro1FJwafcCek9/openapi.json
