# Free YouTube Transcript API - Subtitles, AI Translation & Audio (`luisbendeckdev/youtube-transcript-scraper`) Actor

YouTube transcripts and subtitles in bulk, even when YouTube says no: AI translation when YouTube refuses, audio transcription for videos without captions. Timestamps, SRT, VTT. Callable from AI agents via Apify MCP.

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

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/store.md#pay-per-usage

## 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: captions, AI translation and audio transcription

Get the transcript of **any** YouTube video, playlist or channel as clean text, timestamped segments, SRT or
WebVTT, with title, channel, length, views and publish date. Built for feeding videos into ChatGPT, Claude and
other AI tools, for research, SEO and content repurposing.

Most transcript scrapers stop at "no transcript". This one keeps going:

| The video has... | A typical transcript scraper | This scraper |
|---|---|---|
| Captions in your language | ✅ Transcript | ✅ Transcript |
| Captions, but not in your language | YouTube's translation, which YouTube often refuses (3 of 5 in our side-by-side test); then you get the original language back | YouTube's translation if it works, else **AI translation of the original, with every timestamp kept** |
| **No captions at all** | ❌ "Captions are disabled" | ✅ **We transcribe the audio** (Whisper large-v3-turbo), with timestamps, then translate if you asked |
| Auto-dubbed audio tracks | May return the dub's captions, unmarked | Detects the **original spoken language** |
| A caption track labeled with the wrong language (e.g. Spanish lyrics uploaded as "English") | Depends on which track it picks | Detects it, uses a correctly labeled track if the video has one, else labels it right (`languageMismatch`) and translates if you asked |
| TV-news captions that repeat every line as it grows | Returns the stutter | Cleans it into normal lines |
| A playlist or channel link | Varies | ✅ Paste the link, we list the videos |

The middle column is what we measured on 27 Nov 2026 running the two most-used transcript Actors on the Store on
the same videos. On a Chinese newscast with captions disabled, both said "no transcript"; on a Spanish newscast
asked for in English, one returned Spanish and the other an error. The second one charged $0.005 for each of
those errors. We returned the Chinese transcript from the audio and an AI English translation of the Spanish one, and we
never charge for a failed video. AI translation and audio transcription run on paid Apify plans (see FAQ).

### Why people pick it

- **Never a silent wrong answer.** Every item says how it was made: `transcriptSource` (`captions` or `audio`),
  `translationStatus` (`youtube`, `ai`, `unavailable`, `failed`, `paid-plan-only`), the original language and the source track.
- **Free during launch** (see Pricing). Even after launch, failed videos and clips with almost no speech will
  stay free, and if the language you asked for can't be produced you still get the original transcript free.
- **No surprise bills.** Audio transcription is capped per video ("Max audio minutes", default 60). Longer videos
  without captions are skipped free, with a clear message.
- **Bulk.** Mix video links, playlist links and channel links (`@handle`, `/channel/UC...`) in one run.
- **Every link format.** watch, youtu.be, Shorts, embed, live, or a bare ID. Duplicates removed.
- **Doesn't fail your runs.** Residential proxies, a fresh IP on every retry, one bad video never stops the batch.
  Live streams and premieres get their own codes instead of a hang.

### Input

| Field | What it does |
|---|---|
| `videos` | Video, playlist or channel links, or video IDs |
| `maxVideosPerSource` | Videos to take from each playlist or channel (default 50) |
| `languages` | Language codes in order of preference, e.g. `["en", "es"]`. Empty = the video's own spoken language |
| `translate` | Translate into your first language if it's missing (default on) |
| `audioFallback` | Transcribe the audio of videos that have no captions (default on) |
| `maxAudioMinutes` | Longest video we'll transcribe from audio (default 60) |
| `preferManualCaptions` | Human captions over auto-generated ones (default on) |
| `includeText` / `includeTimestampedText` / `includeSegments` / `includeSrt` / `includeVtt` | Output formats |

### Output (one item per video)

```json
{
  "status": "success",
  "videoId": "vFcFdEUrpN4",
  "title": "Mbunge kutoka Kenya akana kuiba simu bungeni.",
  "channelName": "...",
  "durationSeconds": 94,
  "transcriptSource": "audio",
  "languageCode": "en",
  "isTranslated": true,
  "translationStatus": "ai",
  "originalLanguageCode": "sw",
  "audioSeconds": 94,
  "wordCount": 212,
  "text": "Can you go inside the Kenyan Parliament? How could this happen? ...",
  "segments": [{ "start": 0, "duration": 2.6, "text": "Can you go inside the Kenyan Parliament?" }]
}
```

Failed videos have `"status": "error"`, an `errorCode` and a readable `error`. They are never charged.

| errorCode | Meaning |
|---|---|
| `NO_TRANSCRIPT` | No captions, and audio transcription is off |
| `NO_SPEECH` | We transcribed the audio and there is no speech in it (music, silence) |
| `AUDIO_TOO_LONG` | No captions and longer than your "Max audio minutes" |
| `LANGUAGE_NOT_AVAILABLE` | Your language doesn't exist and translation is off |
| `LIVE_NOW` / `UPCOMING` | A stream that is live right now, or hasn't started |
| `UNAVAILABLE` / `LOGIN_REQUIRED` / `MEMBERS_ONLY` / `AGE_RESTRICTED` | Deleted, private, members-only or age-gated |
| `BLOCKED` | YouTube kept blocking us after all retries (rare; retry later) |
| `INVALID_URL` / `CHANNEL_NOT_FOUND` / `PLAYLIST_NOT_FOUND` | Bad link |

### Pricing: free during launch

**This Actor is free while we launch it.** We charge nothing. You only pay Apify's normal platform usage for the
run, from your own Apify account (the free plan's monthly credit covers it). Measured on 27 Nov 2026:

- About **$0.0002–0.0014 per captioned video** (compute plus proxy traffic).
- About **$0.004 per audio minute** for videos with no captions, mostly the proxy traffic to download the audio.
  "Max audio minutes" caps it per video.

Later we plan to switch to pay per event: $0.003 per transcript, $0.005 per AI translation (per started 10
minutes), $0.01 per audio minute, with failed videos always free. Apify shows every user at least 14 days' notice
before a price applies, and we'll also say so here. Listing playlist and channel videos stays free.

### FAQ

**Does it work on Apify's free plan?** Yes for captions and YouTube's own translations. AI translation and audio
transcription run on paid Apify plans only (they cost us real AI fees, and free-plan runs don't bring the developer
any revenue). On the free plan those videos come back clearly marked: `translationStatus: "paid-plan-only"` with the
original transcript free, or the error code `AUDIO_PAID_PLAN_ONLY`. Nothing is charged for them.

**Which languages?** Any language YouTube has captions in, any target language for AI translation, and ~99 spoken
languages for audio transcription (Whisper).

**How good is AI translation?** It uses an open-source GPT model and translates line by line, so timestamps stay
exact. Song lyrics and talks read naturally; auto-captions that YouTube cut mid-sentence stay as fragments.

**What does a run keep about itself?** A `TELEMETRY` record in the run's own key-value store: per video the
outcome, error code, time taken and audio minutes, plus run totals. No transcript text. It stays in your account.

**Many videos without captions?** Audio is transcribed one video at a time at the default 512 MB. Give the run
1 GB or more and it transcribes 3+ at once.

**Is it legal?** It reads public YouTube pages, like a browser does. You are responsible for how you use the data.

### Development

```
npm install
npm test                                                   # offline unit tests
node --experimental-test-module-mocks test/main.smoke.mjs  # full run against fixtures
apify push                                                 # deploy (private)
```

# Actor input Schema

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

YouTube links or 11-character video IDs. Watch, youtu.be, Shorts, embed and live links all work. Playlist links (youtube.com/playlist?list=...) and channel links (youtube.com/@name, /channel/UC...) are expanded into their videos, newest first.

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

How many videos to take from each playlist or channel link. Listing videos is free; you pay only for transcripts delivered.

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

Language codes in order of preference, such as en, es or pt-BR. Leave empty to get the video's own language.

## `translate` (type: `boolean`):

If the video has no transcript in your first preferred language, translate one into it. We try YouTube's own translation first (included in the price). If YouTube refuses, we translate the original transcript with an AI model and keep every timestamp (paid Apify plans only). If translation is impossible, you get the original transcript free of charge, marked with translationStatus. If off, the video is reported as an error instead.

## `audioFallback` (type: `boolean`):

Many videos have no captions at all. With this on, we download the audio and transcribe it with Whisper (large-v3-turbo), with timestamps, then translate it if you asked for another language. Paid Apify plans only (free of our charges during launch; see Pricing). Videos with captions never use this.

## `audioOverAutoCaptions` (type: `boolean`):

YouTube's automatic captions can be poor (fast speech, music, older videos). With this on, videos that only have automatic captions are transcribed from the audio with Whisper instead. Costs audio minutes (see Pricing). Paid Apify plans only.

## `skipYouTubeTranslation` (type: `boolean`):

YouTube's machine translation of automatic captions can be hard to understand. With this on, we translate with AI line by line and keep every timestamp. Paid Apify plans only.

## `maxAudioMinutes` (type: `integer`):

Videos without captions that are longer than this are skipped (free of charge) instead of transcribed from audio, so a long video never surprises you on the bill.

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

Use creator-uploaded captions over YouTube's automatic ones when both exist in the same language.

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

The full transcript as one block of text. Best for AI, summaries and search.

## `includeTimestampedText` (type: `boolean`):

Text with a \[mm:ss] marker about every 30 seconds. Good for citing moments in a video.

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

A list of caption lines, each with start time and duration in seconds.

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

A ready-to-use .srt subtitle file as text.

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

Add a `vtt` field with WebVTT subtitles, ready for HTML5 players and video editors.

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

How many videos to fetch at the same time.

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

How many times to retry a video with a fresh IP when YouTube blocks a request.

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

YouTube blocks most datacenter IPs, so residential proxies are recommended.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxVideosPerSource": 50,
  "languages": [],
  "translate": true,
  "audioFallback": true,
  "audioOverAutoCaptions": false,
  "skipYouTubeTranslation": false,
  "maxAudioMinutes": 60,
  "preferManualCaptions": true,
  "includeText": true,
  "includeTimestampedText": false,
  "includeSegments": true,
  "includeSrt": false,
  "includeVtt": false,
  "maxConcurrency": 5,
  "maxRetries": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One item per video: transcript text, timestamped segments, language, how it was made, and an error code for videos that failed.

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

// Run the Actor and wait for it to finish
const run = await client.actor("luisbendeckdev/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=dQw4w9WgXcQ"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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