# YouTube Transcript & Subtitles Scraper (any language, SRT) (`scrapemole/youtube-transcript-scraper`) Actor

Get YouTube transcripts and subtitles with timestamps for any video or Short: manual or auto-generated captions, any language, auto-translation, plain text, SRT and VTT, plus title, channel, views and publish date. Never returns blank transcripts. Pay only per transcript delivered.

- **URL**: https://apify.com/scrapemole/youtube-transcript-scraper.md
- **Developed by:** [ScrapeMole](https://apify.com/scrapemole) (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.00 / 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

Get the **transcript of any YouTube video or Short**, with timestamps, in seconds. Creator-uploaded or auto-generated captions, **any language**, optional **auto-translation**, plain text for AI/LLMs, timestamped segments, and ready-made **SRT** and **WebVTT** subtitle files. Each result includes the video's title, channel, duration, views, publish date, description and keywords at no extra cost.

**You only pay for transcripts delivered.** Videos without captions, private or deleted videos and invalid links are never charged.

### Why this transcript scraper doesn't return blank results

The most common failure of YouTube transcript tools is a "successful" run with an **empty transcript**. It happens because the caption links YouTube gives the desktop website now need a hidden proof-of-origin token, and they quietly return nothing without it. This Actor:

- **Gets caption tracks through YouTube's mobile app interfaces** (iOS first, then Android), which still return working caption files, and checks that the file actually has text before returning it.
- **Falls back automatically**: if one route returns an empty file or gets rate-limited, the next one is tried. Rate limits (HTTP 429) are retried with exponential backoff; the whole run slows down together instead of hammering YouTube.
- **Detects YouTube's "confirm you're not a bot" check** and retries on a fresh IP, switching to residential IPs automatically if needed. You don't pay extra for that.
- **Tells you exactly why** when there's no transcript: `NO_DATA` (the video has no captions in any language), `NOT_FOUND` (private, deleted or wrong ID), or `INVALID_INPUT` (not a YouTube link), each with a plain-English message and the list of languages that *are* available.

**Live tests, 8 Oct 2026** (real YouTube, unbiased sample of top search results for 20 queries in 9 languages, cloud server, **no proxy**): see [Test results](#test-results).

### What you get

| Field | Description |
|---|---|
| `transcriptText` | Full transcript as one clean string (perfect for ChatGPT, Claude, RAG, summaries, search) |
| `segments` | `[{ start, duration, end, text }]` in seconds |
| `srt`, `vtt` | Ready-to-use subtitle files (optional) |
| `language`, `languageName`, `isAutoGenerated`, `isTranslated` | Which caption track you got |
| `availableLanguages` | Every caption track the video has |
| `title`, `channelName`, `channelId`, `channelUrl`, `durationSeconds`, `viewCount`, `publishDate`, `description`, `keywords`, `thumbnailUrl`, `isLive` | Video details, free |
| `wordCount`, `characterCount`, `segmentCount` | Handy for LLM token budgeting |

### How to get a YouTube transcript

1. Paste one or more **video links or IDs** (watch links, `youtu.be`, Shorts, live and embed URLs all work).
2. Optionally choose **preferred languages** (e.g. `en`, `es`, `pt-BR`) or **Translate to** a language.
3. Click **Start** and download the transcripts as JSON, CSV, Excel, or plain text through the API.

#### Input example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://youtu.be/jNQXAC9IVRw",
    "https://www.youtube.com/shorts/VIDEO_ID"
  ],
  "languages": ["en"],
  "translateTo": "",
  "includeSrt": true
}
```

#### Output example

```json
{
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "status": "ok",
  "title": "Me at the zoo",
  "channelName": "jawed",
  "durationSeconds": 19,
  "publishDate": "2005-04-23",
  "language": "en",
  "languageName": "English",
  "isAutoGenerated": false,
  "isTranslated": false,
  "availableLanguages": [{ "languageCode": "en", "languageName": "English", "isAutoGenerated": false }, { "languageCode": "de", "languageName": "German", "isAutoGenerated": false }],
  "transcriptText": "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 (baaaaaaaaaaahhh!!) and that's pretty much all there is to say",
  "segments": [{ "start": 1.2, "duration": 2.16, "end": 3.36, "text": "All right, so here we are, in front of the elephants" }],
  "wordCount": 39
}
```

#### Videos without captions

```json
{ "videoId": "M1-AuVWOo1I", "status": "error", "errorCode": "NO_DATA", "errorMessage": "This video has no captions: the uploader added none and YouTube did not auto-generate any.", "title": "How to Cook Pasta | ..." }
```

Not charged. If you need text for videos without captions, you need speech-to-text, which this Actor doesn't do.

### Switching from another transcript Actor

Already calling **pintostudio/youtube-transcript-scraper** from code, n8n, Make or Zapier? Change the Actor ID and keep your input: `{"videoUrl": "https://www.youtube.com/watch?v=…", "targetLanguage": "pt"}` works here as-is. `videoUrls`, `urls` and `url` are accepted too.

`targetLanguage` is honoured strictly: you get the video's own captions in that language when they exist, otherwise YouTube's translation into it, and the row's `language` and `isTranslated` fields tell you which. If YouTube refuses the translation (it rate-limits translations), you get the original transcript with a `translationError` note instead of an empty result. Instead of a bare list of segments you get one row per video with `segments` (start, duration, text), the plain `text`, optional SRT/VTT and video metadata. Videos without captions are reported as free error rows rather than empty results.

### Pricing

Pay per transcript. Proxy and platform costs are included, with no start fee and no charge for failed or caption-less videos, or for translations YouTube refuses.

| Apify plan | Price per transcript | 1,000 transcripts |
|---|---|---|
| Free | $0.004 | $4.00 |
| Starter (Bronze) | $0.003 | $3.00 |
| Scale (Silver) | $0.0025 | $2.50 |
| Business (Gold) | $0.002 | $2.00 |

Set **Max cost per run** and the Actor stops cleanly when it reaches it.

### Use cases

- **AI and LLM pipelines:** summarize videos, build RAG knowledge bases, generate blog posts, show notes and quizzes from YouTube content.
- **Content repurposing:** turn videos into articles, social posts and newsletters; create subtitles (SRT/VTT) for re-uploads.
- **Research and monitoring:** analyze what creators, competitors or politicians say; track mentions of brands and keywords.
- **SEO:** mine transcripts for keywords and questions your audience asks.
- **Language learning and accessibility:** get captions in another language with YouTube's own translation.

### API, Python and AI agents

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("scrapemole/youtube-transcript-scraper").call(run_input={
    "videos": ["https://www.youtube.com/watch?v=aircAruvnKk"], "languages": ["en"]
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item.get("transcriptText", item.get("errorMessage"))[:200])
```

Works with n8n, Make, Zapier, LangChain, LlamaIndex and the Apify MCP server, so Claude, ChatGPT or Cursor agents can fetch transcripts on their own.

### Test results

Live tests on 2026-10-08 against real YouTube, from a cloud server with **no proxy**. The videos were the top search results for 20 queries in 9 languages (cooking, news, lectures, Shorts, music, gaming...), not hand-picked:

| Metric | Result |
|---|---|
| Runs with varied options (languages, translation, SRT/VTT, manual-first) | **12/12 (100.0%)** |
| Videos | 60 |
| Transcripts returned where captions exist | **47/47 (100.0%)** |
| Empty transcripts returned | **0** |
| Videos with no captions on YouTube | 13: reported as `NO_DATA`, not charged (each one checked independently) |
| Billing accuracy | Charged exactly once per transcript delivered |
| Stress run: 120 videos, 8 parallel | **91/91 (100.0%)** transcripts where captions exist, 0 failures, 7.9s total |

### FAQ

**Does it work for YouTube Shorts and live streams?** Yes. Shorts and finished live streams with captions work like normal videos. Live streams that are still running usually have no caption track yet.

**Which language will I get?** The first of your preferred languages that exists (creator captions before auto-generated, unless you change that). If none exist and "Fall back to any language" is on, you get the video's original-language transcript. `availableLanguages` lists everything the video has.

**Can it translate?** Yes. Set **Translate to** (e.g. `en`) and YouTube's own auto-translation is used whenever the original track supports it (`isTranslated: true`). YouTube rate-limits translation more strictly than plain captions. If a translation is refused even after retries, you still get the original-language transcript with a `translationError` note, and **that item isn't charged**. For large translation jobs, use residential proxy.

**Why does a video return NO_DATA when I can see captions on YouTube?** Very rarely YouTube shows captions that are burned into the video picture. Those are part of the image, not a caption track, so no tool can download them as text.

**Age-restricted or members-only videos?** YouTube requires a signed-in account for these. This Actor doesn't log in, so they return a clear `NO_DATA` or `NOT_FOUND` message and aren't charged.

**How fast is it?** In our stress test, 120 videos took 7.9 seconds at 8 parallel requests. Thousands of videos per run are fine.

**Is it legal?** The Actor only reads publicly available captions and video details. Respect copyright and YouTube's terms when you reuse transcripts.

**Found a problem?** Open an issue with the run link. Each run stores a `RUN_SUMMARY` (requests, retries, errors) to help debug it.

### More from ScrapeMole

ScrapeMole builds focused, reliable scrapers for public data: pay per result, no start fees, clear error rows that are never charged, and a `RUN_SUMMARY` on every run.

- [Google Trends Scraper](https://apify.com/scrapemole/google-trends-scraper)
- [YouTube Scraper](https://apify.com/scrapemole/youtube-video-channel-scraper)
- [YouTube Comments Scraper](https://apify.com/scrapemole/youtube-comments-scraper)
- [Telegram Channel Scraper](https://apify.com/scrapemole/telegram-channel-scraper)
- [Amazon Product & Search Scraper](https://apify.com/scrapemole/amazon-product-scraper)

Building an AI agent with its own wallet? The YouTube and Google Trends data is also sold per call over [x402](https://www.x402.org) (USDC on Base, no account): see [scrapemole.pages.dev](https://scrapemole.pages.dev). Questions or a missing field? Open an issue on this Actor. ScrapeMole is the maker of this Actor.

# Actor input Schema

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

Video links or IDs, one per line. Works with watch links, youtu.be short links, Shorts, live and embed URLs. Duplicates are removed automatically.

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

Language codes in order of preference, e.g. en, es, pt-BR. "en" also matches en-US and en-GB.

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

If none of your languages exist, return the video's original-language transcript instead of nothing.

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

Language code to translate the transcript into using YouTube's own auto-translate (e.g. en). Leave empty to keep the original language.

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

Use human captions over YouTube's auto-generated ones when both exist (usually more accurate, with punctuation).

## `allowAutoGenerated` (type: `boolean`):

Turn off to only accept captions uploaded by the creator.

## `includeText` (type: `boolean`):

The whole transcript as one string (ideal for LLMs, summaries and search).

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

Array of { start, duration, end, text } in seconds.

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

Ready-to-use .srt subtitle text.

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

Ready-to-use .vtt subtitle text.

## `includeMetadata` (type: `boolean`):

Title, channel, duration, views, publish date, description, keywords and thumbnail. Free, no extra charge.

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

How many videos to process at once.

## `maxRetries` (type: `integer`):

Rate limits are retried with exponential backoff on a fresh IP.

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

Leave the default. If YouTube starts blocking, the scraper switches IPs, and to residential IPs if needed, at no extra cost to you.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://youtu.be/jNQXAC9IVRw"
  ],
  "languages": [
    "en"
  ],
  "fallbackToAnyLanguage": true,
  "preferManualCaptions": true,
  "allowAutoGenerated": true,
  "includeText": true,
  "includeSegments": true,
  "includeSrt": false,
  "includeVtt": false,
  "includeMetadata": true,
  "maxConcurrency": 5,
  "maxRetries": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All dataset rows (status ok or error).

## `runSummary` (type: `string`):

JSON summary: processed/ok/failed counts, error codes, events charged, HTTP stats.

# 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=aircAruvnKk",
        "https://youtu.be/jNQXAC9IVRw"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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