# 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:** 56 total users, 2 monthly users, 100.0% 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=futurizerush/youtube-transcript-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Transcript Scraper",
        "description": "Extract YouTube video transcripts in multiple languages. Get time-stamped or text-only subtitles.",
        "version": "0.0",
        "x-build-id": "mTe5oarUfpFzVcrSt"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/futurizerush~youtube-transcript-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-futurizerush-youtube-transcript-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/futurizerush~youtube-transcript-scraper/runs": {
            "post": {
                "operationId": "runs-sync-futurizerush-youtube-transcript-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/futurizerush~youtube-transcript-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-futurizerush-youtube-transcript-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "video_ids"
                ],
                "properties": {
                    "video_ids": {
                        "title": "YouTube Video IDs or URLs",
                        "minItems": 1,
                        "type": "array",
                        "description": "Enter YouTube video IDs (e.g., 'dQw4w9WgXcQ') or full URLs. Supports watch, short, and embed URL formats.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "languages": {
                        "title": "Languages",
                        "type": "array",
                        "description": "Select specific languages to extract. Leave empty to get all available transcripts for each video.",
                        "items": {
                            "type": "string",
                            "enumSuggestedValues": [
                                "en",
                                "es",
                                "fr",
                                "de",
                                "pt-BR",
                                "ja",
                                "ko",
                                "zh-CN",
                                "zh-TW",
                                "ru",
                                "it",
                                "ar",
                                "hi",
                                "nl",
                                "pl",
                                "tr",
                                "vi",
                                "th",
                                "id",
                                "sv"
                            ],
                            "enumTitles": [
                                "English",
                                "Spanish",
                                "French",
                                "German",
                                "Portuguese (Brazil)",
                                "Japanese",
                                "Korean",
                                "Chinese (Simplified)",
                                "Chinese (Traditional)",
                                "Russian",
                                "Italian",
                                "Arabic",
                                "Hindi",
                                "Dutch",
                                "Polish",
                                "Turkish",
                                "Vietnamese",
                                "Thai",
                                "Indonesian",
                                "Swedish"
                            ]
                        },
                        "default": []
                    },
                    "text_only": {
                        "title": "Text Only Mode",
                        "type": "boolean",
                        "description": "Return plain text without timestamps or segment metadata. Useful for content analysis or AI processing.",
                        "default": false
                    },
                    "include_generated": {
                        "title": "Include Auto-Generated Transcripts",
                        "type": "boolean",
                        "description": "Include machine-generated transcripts. Most videos have auto-generated English captions even without manual subtitles.",
                        "default": true
                    },
                    "include_translation": {
                        "title": "Auto-Translate Missing Languages",
                        "type": "boolean",
                        "description": "When a transcript is not available in the requested language, use YouTube's built-in translation from an available language.",
                        "default": true
                    },
                    "fetch_all": {
                        "title": "Fetch All Available Languages",
                        "type": "boolean",
                        "description": "Extract transcripts in every available language for each video. This significantly increases processing time and output volume.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
