# YouTube Transcript Scraper (`futurizerush/youtube-transcript-scraper`) Actor

Extract YouTube video transcripts in multiple languages. Get time-stamped or text-only subtitles.

- **URL**: https://apify.com/futurizerush/youtube-transcript-scraper.md
- **Developed by:** [Rush](https://apify.com/futurizerush) (community)
- **Categories:** Videos, AI, Agents
- **Stats:** 69 total users, 2 monthly users, 94.1% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$50.00 / 1,000 results

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

Extract transcripts and subtitles from YouTube videos in multiple languages. Get time-stamped or text-only output with support for auto-generated captions and automatic translation.

### What does YouTube Transcript Scraper do?

YouTube Transcript Scraper extracts subtitle and caption data from YouTube videos. It retrieves transcripts in all available languages, including auto-generated and manually uploaded subtitles.

Use it to:

- Extract video transcripts for content analysis, SEO, or accessibility purposes
- Get subtitles in multiple languages from a single video
- Process large batches of videos efficiently
- Obtain time-stamped segments or plain text output

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `video_ids` | Array | Required | YouTube video IDs or full URLs |
| `languages` | Array | All available | Specific language codes to fetch (e.g., `en`, `zh-TW`, `es`) |
| `text_only` | Boolean | `false` | Return plain text without timestamps |
| `include_generated` | Boolean | `true` | Include auto-generated (machine-created) transcripts |
| `include_translation` | Boolean | `true` | Auto-translate when requested language is unavailable |
| `fetch_all` | Boolean | `false` | Fetch all available languages regardless of language setting |

#### Example Input

```json
{
    "video_ids": [
        "dQw4w9WgXcQ",
        "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    ],
    "languages": ["en", "es"],
    "text_only": false,
    "include_generated": true
}
```

#### Supported Language Codes

YouTube uses ISO 639-1 language codes. Common examples:

| Code | Language | Code | Language |
|------|----------|------|----------|
| `en` | English | `ja` | Japanese |
| `es` | Spanish | `ko` | Korean |
| `fr` | French | `zh-CN` | Chinese (Simplified) |
| `de` | German | `zh-TW` | Chinese (Traditional) |
| `pt-BR` | Portuguese (Brazil) | `ru` | Russian |

Full language code reference: [ISO 639-1 codes](https://www.loc.gov/standards/iso639-2/php/code_list.php)

### Output

Each video produces one dataset item with the following fields:

| Field | Type | Description |
|-------|------|-------------|
| `video_id` | String | 11-character YouTube video ID |
| `video_url` | String | Full YouTube URL |
| `transcripts` | Object | Transcript data keyed by language code |
| `languages_count` | Number | Number of successfully extracted languages |
| `successful_languages` | Array | Language codes that were extracted |
| `failed_languages` | Array | Language codes that failed |
| `text_only` | Boolean | Whether text-only mode was used |
| `metadata` | Object | Extraction timestamp and proxy status |

#### Time-Stamped Output Example

```json
{
    "video_id": "dQw4w9WgXcQ",
    "video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "transcripts": {
        "en": {
            "language": "en",
            "language_name": "English",
            "is_generated": false,
            "is_translatable": true,
            "transcript": [
                {
                    "index": 0,
                    "text": "Never gonna give you up",
                    "start": "00:00.000",
                    "end": "00:03.120",
                    "start_seconds": 0.0,
                    "end_seconds": 3.12,
                    "duration": 3.12,
                    "word_count": 5,
                    "char_count": 23
                }
            ],
            "stats": {
                "total_segments": 87,
                "total_words": 435,
                "total_characters": 2340,
                "average_segment_duration": 3.2,
                "total_duration": 278.4
            }
        }
    },
    "languages_count": 1,
    "successful_languages": ["en"],
    "failed_languages": [],
    "text_only": false,
    "metadata": {
        "fetched_at": "2026-02-27T12:34:56.789+00:00",
        "proxy_used": true
    }
}
```

#### Text-Only Output Example

```json
{
    "video_id": "dQw4w9WgXcQ",
    "video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "transcripts": {
        "en": {
            "language": "en",
            "language_name": "English",
            "is_generated": false,
            "is_translatable": true,
            "transcript": [
                "Never gonna give you up",
                "Never gonna let you down",
                "Never gonna run around and desert you"
            ],
            "stats": {
                "total_segments": 87,
                "total_words": 435,
                "total_characters": 2340,
                "average_segment_duration": 0.0,
                "total_duration": 0.0
            }
        }
    },
    "languages_count": 1,
    "successful_languages": ["en"],
    "failed_languages": [],
    "text_only": true
}
```

#### Error Output Example

When a video has no subtitles or is unavailable:

```json
{
    "video_id": "INVALID_ID",
    "video_url": "https://www.youtube.com/watch?v=INVALID_ID",
    "error": "Video unavailable",
    "code": "VIDEO_UNAVAILABLE"
}
```

### Use Cases

- **Content Analysis** - Extract transcripts for sentiment analysis, topic modeling, or keyword extraction
- **Multi-Language Research** - Compare transcripts across languages for translation quality analysis
- **Accessibility** - Create text versions of video content for hearing-impaired users
- **SEO and Marketing** - Repurpose video content into blog posts, articles, or social media
- **Education** - Extract lecture transcripts for study notes or course materials
- **Data Collection** - Build datasets for natural language processing or machine learning

### Tips

- Enable **Include Auto-Generated Transcripts** for videos without manual subtitles (most videos have auto-generated English captions)
- Use **Fetch All Available Languages** when you need comprehensive multilingual coverage
- For large batches (50+ videos), the scraper automatically manages rate limiting and proxy rotation
- Videos without any subtitles will return an error result but will still be included in the output
- Run statistics are saved in the Key-Value Store under the `SUMMARY` key

### Frequently Asked Questions

**Q: Why do some videos return errors?**
A: Videos may have subtitles disabled by the uploader, be private, age-restricted, or region-blocked. The scraper reports the specific reason for each failure.

**Q: What is the difference between auto-generated and manual transcripts?**
A: Manual transcripts are uploaded by the video creator and tend to be more accurate. Auto-generated transcripts are created by YouTube's speech recognition and may contain errors, especially for specialized terminology.

**Q: Can I get transcripts for live streams?**
A: Only if the live stream has been completed and YouTube has processed the auto-generated or manual captions.

**Q: How many videos can I process in one run?**
A: There is no hard limit, but larger batches take longer due to rate limiting. The scraper handles batches of any size with built-in delays to avoid being blocked.

***

YouTube Transcript Scraper is built for reliability with automatic retry, proxy rotation, and intelligent rate limiting. Compatible with Claude Code, Gemini, Codex, OpenClaw and other AI coding agents.

# Actor input Schema

## `video_ids` (type: `array`):

Enter YouTube video IDs (e.g., 'dQw4w9WgXcQ') or full URLs. Supports watch, short, and embed URL formats.

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

Select specific languages to extract. Leave empty to get all available transcripts for each video.

## `text_only` (type: `boolean`):

Return plain text without timestamps or segment metadata. Useful for content analysis or AI processing.

## `include_generated` (type: `boolean`):

Include machine-generated transcripts. Most videos have auto-generated English captions even without manual subtitles.

## `include_translation` (type: `boolean`):

When a transcript is not available in the requested language, use YouTube's built-in translation from an available language.

## `fetch_all` (type: `boolean`):

Extract transcripts in every available language for each video. This significantly increases processing time and output volume.

## Actor input object example

```json
{
  "video_ids": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [],
  "text_only": false,
  "include_generated": true,
  "include_translation": true,
  "fetch_all": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

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

No description

## `summary` (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 = {
    "video_ids": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ]
};

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

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

```

## MCP server setup

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