# Unlimited YouTube Subtitle & Transcript Scraper Pro (`xtech/youtube-transcript-scraper-pro`) Actor

𝗬𝗼𝘂𝗧𝘂𝗯𝗲 𝗦𝘂𝗯𝘁𝗶𝘁𝗹𝗲 & 𝗧𝗿𝗮𝗻𝘀𝗰𝗿𝗶𝗽𝘁 𝗗𝗼𝘄𝗻𝗹𝗼𝗮𝗱𝗲𝗿 - Extract subtitles and transcripts in 𝗺𝘂𝗹𝘁𝗶𝗽𝗹𝗲 𝗹𝗮𝗻𝗴𝘂𝗮𝗴𝗲𝘀 from any YouTube video. Supports 𝗯𝘂𝗹𝗸 𝗱𝗼𝘄𝗻𝗹𝗼𝗮𝗱𝘀, auto-generated captions & custom language selection.

- **URL**: https://apify.com/xtech/youtube-transcript-scraper-pro.md
- **Developed by:** [Xtech](https://apify.com/xtech) (community)
- **Categories:** Developer tools, Automation, Social media
- **Stats:** 74 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Pro

Extract clean transcripts from one or many YouTube videos in a single run.

#### Fastest first run

```json
{
  "videos": ["dQw4w9WgXcQ"],
  "type": "plain",
  "maxConcurrency": 1,
  "maxRetries": 1
}
```

Validate one known-caption video first, then increase the batch size. Successful transcript rows and unbilled error rows are separated so downstream workflows can retry only unavailable inputs. Every run also writes a `RUN_SUMMARY` key-value record with requested, successful, failed, output-format, language, retry, concurrency, and proxy fields. If every requested video fails, the run is marked **FAILED** after its error rows are written.

This Actor accepts YouTube video URLs or video IDs and returns transcripts in the format you need: plain text, timestamped text, SRT, VTT, JSON, CSV, or all formats at once. It prefers manually created captions when they are available and otherwise uses an auto-generated transcript.

### What you get

- Bulk processing for multiple videos
- Support for standard YouTube URLs, short URLs, Shorts URLs, embed URLs, live URLs, and raw video IDs
- Automatically returns the best available transcript, preferring manually created captions when available
- Optional language setting for users who need a specific transcript language
- Structured dataset output for downstream automations
- Output format control for different workflows (LLM prep, subtitle editing, QA, analytics)
- Apify Proxy support for cloud runs where YouTube blocks datacenter IPs

### Input

#### `videos` (required)

List of YouTube videos.

Supported values:

- Video ID: `VIDEO_ID`
- Watch URL: `https://www.youtube.com/watch?v=VIDEO_ID`
- Short URL: `https://youtu.be/VIDEO_ID`
- Shorts URL: `https://www.youtube.com/shorts/VIDEO_ID`
- Embed URL: `https://www.youtube.com/embed/VIDEO_ID`
- Live URL: `https://www.youtube.com/live/VIDEO_ID`

#### `type` (optional)

Output format for `transcript`.

Allowed values:

- `plain` (default)
- `timestamped`
- `srt`
- `vtt`
- `json`
- `csv`
- `all`

#### `language` (optional)

Leave empty to return the best available transcript in any language. If you enter a language code such as `en`, `es`, or `de`, the Actor will try to return that language and otherwise report which languages are available.

#### `keepMusicMarkers` (optional)

- Type: boolean
- Default: `false`
- When `false`, markers like `[Music]` are removed.

#### `dropEmpty` (optional)

- Type: boolean
- Default: `true`
- Removes empty transcript segments after cleanup.

#### `maxConcurrency` (optional)

- Type: integer
- Default: `3`
- Range: `1` to `10`
- Controls how many videos are processed in parallel.

#### `maxRetries` (optional)

- Type: integer
- Default: `2`
- Range: `0` to `5`
- Retries transient transcript request failures.

#### `proxyConfiguration` (optional)

- Type: object
- Default: Apify Proxy with the `RESIDENTIAL` group
- YouTube often blocks cloud datacenter IPs, so proxy use is recommended for Apify platform runs. You can disable it for local/direct runs if transcript requests work without a proxy.
- Residential proxy traffic is separately billable; API/CLI callers can explicitly set `"proxyConfiguration": {"useApifyProxy": false}` when they prefer a lower-cost direct attempt.

### Output

Each dataset item contains:

- `recordType` (`transcript` or `error`)
- `success` (boolean)
- `originalInput` (string)
- `videoId` (string)
- `videoUrl` (string)
- `languageCode` (string or `null`)
- `languageName` (string or `null`)
- `isGenerated` (boolean or `null`)
- `isTranslatable` (boolean or `null`)
- `outputFormat` (string)
- `transcript` (string, array, object, or `null` depending on `type`)
- `segments` (array or `null`)
- `segmentCount` (integer)
- `availableLanguages` (array)
- `errorMessage` (string or `null`)
- `scrapedAt` (UTC timestamp)

If a video fails, the item is still returned with:

- `success: false`
- `transcript: ""`
- `errorMessage` explaining the failure

When this Actor is configured for pay-per-event pricing, successful transcript rows are the only billable dataset items. Failed inputs and spending-limit diagnostics are written to the separate **Unbilled errors** dataset.

### Example input

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=VIDEO_ID_1",
    "https://youtu.be/VIDEO_ID_2",
    "VIDEO_ID_3"
  ],
  "type": "all",
  "language": "",
  "keepMusicMarkers": false,
  "dropEmpty": true,
  "maxConcurrency": 4,
  "maxRetries": 2,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

### Example output item

```json
{
  "recordType": "transcript",
  "success": true,
  "originalInput": "https://www.youtube.com/watch?v=VIDEO_ID_1",
  "videoId": "VIDEO_ID_1",
  "videoUrl": "https://www.youtube.com/watch?v=VIDEO_ID_1",
  "languageCode": "en",
  "languageName": "English",
  "isGenerated": false,
  "isTranslatable": true,
  "outputFormat": "all",
  "transcript": {
    "plain": "Never gonna give you up...",
    "timestamped": "00:00:01.200 Never gonna give you up...",
    "srt": "1\\n00:00:01,200 --> 00:00:03,800\\nNever gonna give you up...",
    "vtt": "WEBVTT\\n\\n00:00:01.200 --> 00:00:03.800\\nNever gonna give you up...",
    "json": [
      {
        "text": "Never gonna give you up...",
        "start": 1.2,
        "duration": 2.6
      }
    ],
    "csv": "start,duration,text\\n1.2,2.6,\"Never gonna give you up...\""
  },
  "segmentCount": 42,
  "errorMessage": null,
  "scrapedAt": "2026-05-22T12:34:56Z"
}
```

### Typical use cases

- Build subtitle files (`srt` or `vtt`) for editing or publishing
- Prepare clean text for AI/LLM pipelines (`plain` or `json`)
- Create timestamped transcripts for compliance or QA reviews
- Batch-export transcripts for research and analytics

### Notes

- The Actor deduplicates repeated video IDs in one run.
- Transcript availability depends on whether subtitles exist for a given video.
- Leave `language` empty for the simplest and most reliable result. The Actor will choose a manually created transcript when available, otherwise an auto-generated transcript.
- For best throughput on larger batches, increase `maxConcurrency` gradually.

# Actor input Schema

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

Enter one or more YouTube video IDs or URLs. Supported URL formats include standard watch URLs, short youtu.be URLs, Shorts URLs, embed URLs, and live URLs.

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

Choose the format stored in the `transcript` field. Select `all` to include every supported format in one object.

## `language` (type: `string`):

Optional transcript language code, for example `en`, `es`, or `de`. Leave empty to return the best available transcript in any language.

## `preserveFormatting` (type: `boolean`):

Keep YouTube transcript formatting tags where the upstream transcript API provides them.

## `keepMusicMarkers` (type: `boolean`):

Keep markers such as `[Music]` in transcript text. When disabled, these markers are removed.

## `dropEmpty` (type: `boolean`):

Remove transcript segments that become empty after cleanup.

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

Number of videos to process in parallel. Increase gradually for larger batches.

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

Number of retries for transient transcript request failures.

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

Proxy settings for transcript requests. Apify Proxy is enabled by default because YouTube often blocks cloud datacenter IPs.

## Actor input object example

```json
{
  "videos": [
    "dQw4w9WgXcQ"
  ],
  "type": "plain",
  "language": "",
  "preserveFormatting": false,
  "keepMusicMarkers": false,
  "dropEmpty": true,
  "maxConcurrency": 3,
  "maxRetries": 2,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `dataset_items` (type: `string`):

No description

## `errorResults` (type: `string`):

When pay-per-event pricing is active, failed inputs and spending-limit diagnostics are saved here without a transcript charge.

# 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": [
        "dQw4w9WgXcQ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtech/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 = { "videos": ["dQw4w9WgXcQ"] }

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

```

## MCP server setup

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