# YouTube Subtitles Scraper — SRT, VTT & Transcript (`crawlyard/youtube-video-subtitles-scraper`) Actor

YouTube subtitles scraper: download YouTube captions as SRT and VTT files, plain-text transcript and timestamped JSON segments, in any available language. Handles manual and auto-generated YouTube captions.

- **URL**: https://apify.com/crawlyard/youtube-video-subtitles-scraper.md
- **Developed by:** [Crawlyard Data](https://apify.com/crawlyard) (community)
- **Categories:** AI, Videos, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 video transcripts

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?

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 Subtitles Scraper — SRT, VTT, Captions & Transcript

Download **YouTube subtitles as SRT or VTT files**, plain-text transcripts and
timestamped JSON segments — in any available language, for manual and
auto-generated captions alike.

Typical searches this Actor answers: *youtube to srt api*, *download youtube
subtitles as srt*, *youtube captions to text*, *youtube transcript api*,
*extract closed captions*, *bulk youtube subtitle download*.

### What you get per video

- `srt` — ready-to-save SubRip file content
- `vtt` — ready-to-save WebVTT file content
- `transcript` — clean plain text
- `segments` — `[{start, duration, text}]` for precise timing work
- `language`, `languageName`, `isAutoGenerated`, `availableLanguages`
- Video metadata: title, channel, duration, views, publish date

### Bulk input: playlists & whole channels

Paste a **playlist URL** (expands to up to ~100 videos) or a **channel URL /
@handle** (latest 15 videos) alongside normal video URLs — everything is
expanded automatically and transcribed in one run. `maxVideosPerSource` caps
the expansion.

### Works with

Single videos, **whole channels**, **playlists**, YouTube Shorts, lectures, webinars and podcast episodes hosted on YouTube. Output per video: plain-text transcript, **SRT and VTT subtitle files**, timestamped segments and metadata — ready for caption editing, video-to-text conversion, note-taking and AI pipelines (works as a transcript API via the Apify API and MCP).

### Input

Paste video URLs (or IDs), pick preferred languages (fallback is automatic),
toggle timestamps/SRT/metadata. Batches run concurrently.

### Pricing

Pay per result: you are charged only for videos that actually return subtitles.
No subscription, no monthly fee.

### Why teams use it

Subtitle files for video localization and accessibility, transcripts for
LLM/RAG pipelines, caption corpora for research, and content repurposing at
scale — without browser automation or API keys.

# Actor input Schema

## `videoUrls` (type: `array`):

YouTube video, playlist or channel URLs (or bare video IDs). Playlists expand to up to ~100 videos, channels to their latest 15.

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

Preferred caption languages in priority order (ISO codes, e.g. en, ko, ja, es). If none match, the first available track is used, so you always get a transcript when one exists.

## `preferManualCaptions` (type: `boolean`):

Prefer human-written captions over auto-generated ones when both exist. Auto-generated captions are still used as a fallback.

## `includeTimestamps` (type: `boolean`):

Include the segments array with start time and duration for each caption line. Useful for clipping, search and RAG chunking.

## `includeMetadata` (type: `boolean`):

Include title, channel, duration, view count and publish date alongside the transcript.

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

Number of videos fetched in parallel.

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

Residential proxy is enabled by default and is required: YouTube refuses datacenter IP addresses, so turning this off will return no transcripts. Leave as is unless you have a specific reason to change it.

## `includeSrt` (type: `boolean`):

Add ready-to-use SRT and WebVTT subtitle strings to each item.

## `maxVideosPerSource` (type: `integer`):

Cap on how many videos a single playlist or channel expands to.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "dQw4w9WgXcQ"
  ],
  "languages": [
    "en",
    "ko",
    "ja"
  ],
  "preferManualCaptions": true,
  "includeTimestamps": true,
  "includeMetadata": true,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "includeSrt": true,
  "maxVideosPerSource": 50
}
```

# Actor output Schema

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

All scraped transcripts with metadata as JSON.

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

Same dataset exported as CSV.

# 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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlyard/youtube-video-subtitles-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 = {
    "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("crawlyard/youtube-video-subtitles-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 '{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call crawlyard/youtube-video-subtitles-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlyard/youtube-video-subtitles-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/uwJ49lzxL5YzaEUxO/builds/ckvbWVopeyDuQhvnC/openapi.json
