# YouTube Transcript Scraper 📝 Text + SRT — $0.01/video (`viralanalyzer/youtube-transcript-scraper`) Actor

YouTube video transcripts as clean text, timestamped segments and SRT — creator subtitles or the original auto-generated captions, never machine translations. No API key, no cookies. $0.01 per video with a transcript; videos without captions are free.

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

## Pricing

$10.00 / 1,000 video 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 📝 YouTube Transcript Scraper — Captions to Text, Timestamps & SRT

> **$0.01 per video with a transcript** · videos without captions are **free** · 🔒 no API key, no cookies · 🌍 any caption language
> 🔗 [View on Apify Store](https://apify.com/viralanalyzer/youtube-transcript-scraper) · 🇺🇸 English · [🇧🇷 Português](#-português)

Get the **transcript of any YouTube video** — the subtitles uploaded by the creator or YouTube's **original auto-generated captions** — as **clean text, timestamped segments and a ready-to-use SRT file**. Paste watch, `youtu.be`, Shorts, embed or live-replay links (up to 500 per run). No YouTube Data API key, no quota, no login.

**Who it's for:** content and SEO teams repurposing videos into posts, researchers and journalists quoting talks, developers building search, RAG and summarization over video, accessibility teams, ad and brand monitoring.

▶️ Click **Try for free** — the prefilled example returns a real 3,300-word transcript in about 10 seconds.

### ✨ Features

- 📝 **Real captions, never machine translation** — creator subtitles first, then the original-language auto captions. Auto-*translated* tracks are never delivered.
- 🌍 **Language control** — ask for `en`, `pt`, `pt-BR`, `es`, `ja`…; if the video has no track in that language the original track is delivered and flagged (`languageFallback: true`), or use `strictLanguage` to get a free `NO_CAPTIONS` instead.
- ⏱️ **Timestamps + SRT** — `segments[]` with start/end seconds and an `srt` string, plus `wordCount` and `segmentCount`.
- 📊 **Video metadata** — title, channel, duration, upload date, view count, and the list of caption languages available (`availableLanguages`).
- 🛡️ **Honest empty results** — videos without captions come back with `hasTranscript: false` and `errorCode: NO_CAPTIONS` and are **not charged**.
- ⛑️ **Block-proof** — runs through residential proxies (YouTube bot-checks datacenter IPs) and retries blocked videos through a second provider automatically.
- ⚡ **Fast and light** — no media download, ~0.4 MB of traffic per video, 4 videos in parallel by default.

### 📥 Input

| Field | Type | Default | Description |
|---|---|---|---|
| `videoUrls` | array | — | YouTube URLs or 11-char video IDs (max 500). **Required.** |
| `language` | string | `en` | Preferred caption language (ISO 639-1, regional codes accepted). |
| `preferManual` | boolean | `true` | Creator subtitles before auto-generated captions. |
| `strictLanguage` | boolean | `false` | No fallback: `NO_CAPTIONS` (free) when the preferred language is missing. |
| `includeTimestamps` | boolean | `true` | Add `segments[]`. |
| `includeSrt` | boolean | `true` | Add `srt`. |
| `maxConcurrency` | integer | `4` | Videos fetched in parallel (1–8). |
| `proxyConfiguration` | object | RESIDENTIAL | Keep residential — YouTube blocks datacenter IPs. |
| `useBrightDataFallback` | boolean | `true` | Retry blocked videos through a second provider (slower). |
| `brightDataApiToken` | secret | — | Optional: your own provider token for the fallback. |

### 📤 Output (per video)

```json
{
  "url": "https://www.youtube.com/watch?v=aircAruvnKk",
  "videoId": "aircAruvnKk",
  "title": "But what is a neural network? | Deep learning chapter 1",
  "channel": "3Blue1Brown",
  "durationSeconds": 1120,
  "uploadDate": "2017-10-05",
  "hasTranscript": true,
  "languageCode": "en",
  "isAutoGenerated": false,
  "languageFallback": false,
  "availableLanguages": { "manual": ["en", "pt-BR", "…"], "auto": ["en"] },
  "transcript": "This is a 3. It's sloppily written and rendered at an extremely low resolution…",
  "wordCount": 3357,
  "segmentCount": 286,
  "segments": [{ "start": 4.22, "end": 5.4, "duration": 1.18, "text": "This is a 3." }],
  "srt": "1\n00:00:04,220 --> 00:00:05,400\nThis is a 3.\n",
  "source": "youtube-captions",
  "_dataQuality": "transcript"
}
```

Videos without captions: `hasTranscript: false`, `transcript: null`, `errorCode: "NO_CAPTIONS"`, `_dataQuality: "no_captions"` (free). Unavailable/private videos: `errorCode: "UNAVAILABLE"` (free). Invalid links: `errorCode: "INVALID_URL"` (free).

### 🎯 Use cases

- Turn talks, tutorials and podcasts into articles, newsletters and social posts.
- Feed video knowledge into RAG pipelines, search indexes and LLM summarizers.
- Quote and fact-check interviews with exact timestamps.
- Monitor what creators and competitors say about your brand (pair with our YouTube channel and comment scrapers).
- Generate subtitle files (`srt`) for re-uploads and translations.

### ✅ Capabilities & Limits

- Works on public videos, Shorts and finished live streams that have captions (creator-uploaded or auto-generated). Videos with captions disabled by the creator return `NO_CAPTIONS`.
- Members-only, private and age-restricted videos are reported as `UNAVAILABLE` (free).
- Auto-generated captions carry YouTube's own recognition quality — punctuation may be sparse. Need speech-to-text on a video **without** captions? Use our [Video Transcriber](https://apify.com/viralanalyzer/video-transcriber) (Whisper).
- Timestamps are those of the caption lines (per line, not per word).
- 500 videos per run; typical throughput ≈ 20–40 videos per minute with the default concurrency.

### ❓ FAQ

**Q: Do I need a YouTube API key or cookies?**
A: No. The actor reads the caption tracks YouTube serves publicly.

**Q: What if the video has captions only in another language?**
A: You get the original-language track and `languageFallback: true`. Set `strictLanguage: true` to receive a free `NO_CAPTIONS` instead. Machine-translated tracks are never delivered.

**Q: Why residential proxies? Does that cost extra?**
A: YouTube answers datacenter IPs with a bot check. The actor transfers only ~0.4 MB per video (the caption file and player data, never the media), so proxy usage stays negligible — and the actor's own platform usage is included in the $0.01, you don't pay it separately.

**Q: A video came back `BLOCKED`. What now?**
A: The actor already retried it through a second provider. Run it again in a few minutes; if it keeps happening, tell us via the Issues tab and we'll investigate.

**Q: Can I get word-level timestamps or speaker labels?**
A: Not from YouTube captions. Use [Video Transcriber](https://apify.com/viralanalyzer/video-transcriber) for Whisper-based transcription.

### 💰 Pricing

**Pay per event — $0.01 per video with a transcript** (`video-transcript-scraped`). Videos without captions, unavailable videos and invalid links are free. Platform usage (compute, proxy) is included in the price. Runs stop automatically when your *maximum charge per run* is reached.

### 🔗 Related actors

- [Video Transcriber](https://apify.com/viralanalyzer/video-transcriber) — Whisper speech-to-text for videos without captions (TikTok, Instagram, YouTube…).
- [Audio Transcriber](https://apify.com/viralanalyzer/audio-transcriber) — Whisper for audio files and podcasts.
- [YouTube Comments Scraper](https://apify.com/viralanalyzer/youtube-comments-scraper-pro) · [YouTube Channel Leads](https://apify.com/viralanalyzer/youtube-channel-leads-scraper-pro)

### 📝 Changelog

- **1.0.0** (2026-08-29) — first release: creator subtitles + original auto captions, timestamps, SRT, language preference with honest fallback, residential proxies, second-provider retry for blocked videos, pay only for delivered transcripts.

***

## 🇧🇷 Português

**Transcrição de vídeos do YouTube** — as legendas enviadas pelo criador ou as legendas automáticas originais do YouTube — em **texto limpo, segmentos com timestamps e arquivo SRT**. Aceita links watch, `youtu.be`, Shorts, embed e lives encerradas (até 500 por execução). Sem API key, sem cookies, sem login.

### ✨ Recursos

- Legendas reais, nunca tradução automática (faixas auto-traduzidas são ignoradas).
- Escolha o idioma (`pt`, `pt-BR`, `en`, `es`…); sem faixa nesse idioma, entrega a original com `languageFallback: true` — ou use `strictLanguage` para receber `NO_CAPTIONS` grátis.
- `segments[]` com início/fim em segundos, `srt` pronto, `wordCount`, metadados do vídeo e a lista de idiomas disponíveis.
- Vídeos sem legenda voltam com `hasTranscript: false` e **não são cobrados**.
- Proxies residenciais (o YouTube bloqueia IPs de datacenter) e nova tentativa por um segundo provedor quando bloqueado.

### 💰 Preço

**$0,01 por vídeo com transcrição** (`video-transcript-scraped`). Vídeos sem legenda, indisponíveis ou links inválidos não são cobrados. Uso da plataforma (computação e proxy) incluído no preço.

### ❓ FAQ

**Precisa de API key ou cookies?** Não.
**E se o vídeo só tiver legenda em outro idioma?** Você recebe a faixa original com `languageFallback: true`; com `strictLanguage: true` recebe `NO_CAPTIONS` grátis.
**Vídeo sem legenda nenhuma?** Use o [Video Transcriber](https://apify.com/viralanalyzer/video-transcriber) (Whisper) — transcreve o áudio.

### 📝 Changelog

- **1.0.0** (2026-08-29) — primeira versão.

# Actor input Schema

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

YouTube video URLs or 11-character video IDs — watch, youtu.be, Shorts, embed and live replay links all work. Up to 500 per run. Each video with a transcript costs $0.01; videos without captions are free.

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

ISO 639-1 code of the caption language you want (en, pt, es, de, ja, …). Regional codes work too (pt-BR). If the video has no track in this language the original-language track is delivered and flagged with languageFallback=true — machine-translated tracks are never used.

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

When both exist, use the subtitles uploaded by the creator instead of YouTube's auto-generated captions.

## `strictLanguage` (type: `boolean`):

Return NO\_CAPTIONS (free) instead of falling back to the original-language track when the preferred language is not available.

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

Add a `segments` array with start/end seconds for every caption line.

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

Add a ready-to-use `srt` subtitle string.

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

How many videos are fetched at the same time (1–8).

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

RESIDENTIAL by default — YouTube answers datacenter IPs with a bot check. Only ~0.4 MB per video is transferred (no media download), so proxy traffic stays negligible.

## `useBrightDataFallback` (type: `boolean`):

When YouTube blocks every proxy session for a video, retry it through Bright Data's YouTube scraper (slower, ~30–150 s). Uses the actor's own provider account unless you supply a token below.

## `brightDataApiToken` (type: `string`):

Use your own Bright Data account for the fallback instead of the actor's.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=aircAruvnKk"
  ],
  "language": "en",
  "preferManual": true,
  "strictLanguage": false,
  "includeTimestamps": true,
  "includeSrt": true,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "useBrightDataFallback": true
}
```

# Actor output Schema

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

View and export the transcripts in the Dataset tab.

# 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=aircAruvnKk"
    ],
    "language": "en",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("viralanalyzer/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 = {
    "videoUrls": ["https://www.youtube.com/watch?v=aircAruvnKk"],
    "language": "en",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("viralanalyzer/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 '{
  "videoUrls": [
    "https://www.youtube.com/watch?v=aircAruvnKk"
  ],
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call viralanalyzer/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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