# YouTube TRANSCRIPT Scraper PRO (`imemi/youtube-transcript-scraper-pro`) Actor

Professional YouTube Transcript Scraper. Extract subtitles and captions from any video in seconds. Supports multiple languages and includes a smart proxy rotation system to bypass blocking. Outputs a variety of structured datasets (JSON, CSV, Excel,srt ,vtt & etc.)

- **URL**: https://apify.com/imemi/youtube-transcript-scraper-pro.md
- **Developed by:** [imemi](https://apify.com/imemi) (community)
- **Categories:** Developer tools, Videos, Automation
- **Features:** Limited permissions
- **Stats:** 23 total users, 1 monthly users, 100.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/running/actors-in-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 Pro

**Extract subtitles, captions, and transcripts from YouTube videos in JSON, Text, SRT, or VTT formats.**

This Actor allows you to scrape transcripts from any public YouTube video. It supports multiple languages, auto-retry mechanisms, and smart proxy handling to avoid blocking.

***

#### ⚠️ IMPORTANT: Extraction vs. Translation

> **Please Read:** This scraper **extracts existing transcripts** uploaded by the creator or auto-generated by YouTube.
>
> - ❌ It **DOES NOT** perform AI translation on the fly.
> - ✅ It **ONLY FETCHES** languages that are already available on the video.
> - 💡 **Tip:** Always include `'en'` (English) as a fallback in your language list to ensure you get a result if your preferred language is missing.

***

#### ✨ Key Features

- **Multi-Format Output:** Get `JSON`, `Plain Text`, `SRT` (Subtitles), and `WebVTT` in a single run.
- **Smart Retry System:** Automatically handles connection drops and YouTube blocking.
- **Global Support:** Works with `youtube.com`, `youtu.be`, Shorts, Embeds, and localized domains (e.g., `youtube.es`).
- **Case Insensitive:** Handles language codes smarty (e.g., `EN`, `en`, `En` are all valid).

***

#### 🚀 How to Use

##### 1. Input Configuration

- **Start URLs:** Paste one or more YouTube video links.
- **Preferred Languages:** Enter the language codes you want (priority order).
  - *Default:* `en`, `ru`, `es`, `iw`
- **Output Format:** Choose between specific formats or "All Formats" (Recommended).
- **Proxy Configuration:** **CRITICAL!** See the section below.

##### 2. Proxy Configuration (Residential) 🛡️

YouTube aggressively blocks server IPs (Datacenter proxies). To ensure this actor works correctly, you **MUST** use Residential Proxies.

1. In the **Proxy Configuration** section, keep "Use Apify Proxy" checked.
2. Click on "Groups" or "Edit".
3. **Select `Residential`** (This mimics a real home user connection).
4. If you use "Datacenter" or "Automatic" without Residential, you will likely get `Login Page Found` or `429 Too Many Requests` errors.

***

#### 🔗 Supported Link Formats

The scraper automatically detects the Video ID from various URL structures:

- **Standard:** `https://www.youtube.com/watch?v=jvUK2zQBLrY`
- **Shortened:** `https://youtu.be/jvUK2zQBLrY`
- **Shorts:** `https://www.youtube.com/shorts/jvUK2zQBLrY`
- **Embed:** `https://www.youtube.com/embed/jvUK2zQBLrY`
- **Localized:** `https://www.youtube.co.il/watch?v=jvUK2zQBLrY`

***

#### 🌍 Supported Languages & Codes

You can use standard ISO 639-1 codes. The scraper is case-insensitive (e.g., `IW` and `iw` both work).

**Remember:** The language must exist on the specific video you are scraping.

| Language | Code | Note |
| :--- | :--- | :--- |
| **English** | `en` | Most common (Global) |
| **Hebrew** | `he` or `iw` | עברית|
| **Spanish** | `es` | Español |
| **French** | `fr` | Français |
| **German** | `de` | Deutsch |
| **Russian** | `ru` | Русский |
| **Arabic** | `ar` | العربية |
| **Hindi** | `hi` | हिन्दी |
| **Portuguese**| `pt` | Português (Brazil/Portugal) |
| **Chinese (Simplified)** | `zh-Hans` | 简体中文 |
| **Chinese (Traditional)**| `zh-Hant` | 繁體中文 |
| **Japanese** | `ja` | 日本語 |
| **Korean** | `ko` | 한국어 |
| **Vietnamese** | `vi` | Tiếng Việt |
| **Dutch** | `nl` | Nederlands |
| **Italian** | `it` | Italiano |
| **Turkish** | `tr` | Türkçe |
| **Polish** | `pl` | Polski |
| **Indonesian**| `id` | Bahasa Indonesia |

*(And any other standard ISO language code supported by YouTube)*

***

#### 📦 Output Example

If you select **"All Formats"**, the dataset will contain a rich object for each video:

```json
{
  "videoUrl": "[https://www.youtube.com/watch?v=jvUK2zQBLrY](https://www.youtube.com/watch?v=*******)",
  "videoId": "****",
  "status": "success",
  "languageFound": "yes",
  "text": "Hello everyone and welcome...",
  "srt": "1\n00:00:00,000 --> 00:00:02,500\nHello everyone...",
  "vtt": "WEBVTT\n\n00:00:00.000 --> 00:00:02.500\nHello everyone...",
  "json": [
    {
      "text": "Hello everyone",
      "start": 0.0,
      "duration": 2.5
    }
  ]
}

```

***

#### 🛠️ Troubleshooting

| Error | Cause | Solution |
| --- | --- | --- |
| **LANGUAGE_NOT_AVAILABLE** | The video does not have subtitles in the requested language. | Add `en` (English) to your language list as a backup. |
| **TRANSCRIPTS_DISABLED** | The video owner has turned off subtitles completely. | Nothing can be done. This video has no captions. |
| **MAX_RETRIES_EXCEEDED** | Connection blocked or unstable. | Ensure you are using **Residential Proxy**. Try again later. |
| **VIDEO_UNAVAILABLE** | Video is private, deleted, or region-locked. | Check if the link works in your browser (Incognito mode). |

***

#### 📞 Support & Feedback

If you encounter any issues or have feature requests, please check the "Issues" tab or create a new issue.

````



# Actor input Schema

## `startUrls` (type: `array`):

Enter YouTube video links here (Videos, Shorts, or Live streams).
## `languages` (type: `array`):

Select languages for extraction. Pick from the list OR type any custom 2-letter code (e.g. 'yi') and hit Enter.
## `outputConfiguration` (type: `string`):

Select the format for the transcript.
## `proxyConfiguration` (type: `object`):

⚠️ YouTube requires Residential Proxies to avoid blocking.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "outputConfiguration": "srt",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
````

# Actor output Schema

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

// Run the Actor and wait for it to finish
const run = await client.actor("imemi/youtube-transcript-scraper-pro").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 = {
    "startUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "languages": ["en"],
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,imemi/youtube-transcript-scraper-pro"
        }
    }
}
```

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/IUgcTJCmL0PsK9p3y/builds/LgxKLTgm5ycMFQASJ/openapi.json
