# 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:** 81 total users, 4 monthly users, 94.2% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.77 / 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 Pro

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

#### Fastest first run

```json
{
  "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"]
}
```

Paste your video links and click Start. Plain text, automatic caption selection and the included residential connection are already configured. Choose a different output format or preferred caption language if needed; optional text cleanup settings are in a collapsible section. The Actor manages the connection, parallel processing and retries for you. 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)
- Residential 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. Choose a suggested language or enter a caption language code such as `en`, `es`, or `de`. If it is unavailable, the Actor returns another available caption language. Check `languageCode` for the language actually returned. Captions are not translated.

#### `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.

### Advanced API compatibility options

These settings are preconfigured by the Actor and hidden from the normal input form. Existing API integrations can continue to supply them.

#### `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: proxy-enabled requests use the Actor's included managed connection.
- YouTube often blocks cloud datacenter IPs, so proxy use is recommended for platform runs. Set `"proxyConfiguration": {"useApifyProxy": false}` for direct requests.
- Explicit URLs you supply in `proxyUrls` are used exactly as given. There are no separate proxy traffic charges on the included connection.
- Residential and country selections are served by the included connection. If the connection is unavailable for a deployment, the run stops before the first request instead of using a different route.

#### `useExternalProxy` (optional)

- Type: boolean
- Default: `true`
- Routes every proxy-enabled request through the included managed connection. Set `false` to connect directly instead, without a proxy.

### Output

The **Transcripts** table shows the video link, transcript, caption language, caption source and format. Open **Details** for timed segments and all metadata. **Failed videos (no result charge)** explains failed inputs; platform run costs still apply. Export results in your preferred dataset format.

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
  }
}
```

### 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`):

Paste video links or IDs, one per item. Watch, youtu.be, Shorts, embed and live links are supported.

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

Plain text works well for reading and AI tools. Choose SRT or VTT for subtitles, JSON or CSV for structured data, or All formats for every version.

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

Automatic selects the best available captions, preferring manual captions. Choose or enter a language code. If it is unavailable, another available caption language is returned; this does not translate captions.

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

Keep formatting tags such as italics when they are provided by the captions.

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

Include music markers such as \[Music] in the transcript.

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

Remove segments with no text after cleanup.

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

Operator-configured parallel processing limit. The default is 3 videos at once.

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

Operator-configured retry limit. Temporary failures receive up to 2 retries; permanent failures are not retried.

## `useExternalProxy` (type: `boolean`):

Recommended. Every proxy-enabled request is routed through the actor's included managed connection. Turn off to connect directly without a proxy.

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

Leave the default to use the included managed connection. Explicit custom URLs in proxyUrls are used exactly as given. Disable proxies for direct requests. No separate proxy traffic charges apply on the included connection.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "type": "plain",
  "language": "",
  "preserveFormatting": false,
  "keepMusicMarkers": false,
  "dropEmpty": true,
  "maxConcurrency": 3,
  "maxRetries": 2,
  "useExternalProxy": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Successful transcripts in your chosen format, with timed segments and caption language metadata.

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

Videos that could not be retrieved, with an explanation. Failed retrievals have no successful-transcript result charge; run costs still apply.

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

// 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": ["https://www.youtube.com/watch?v=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": [
    "https://www.youtube.com/watch?v=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/F9OAM2HRgauA20lTY/openapi.json
