# YouTube Transcript Scraper – Subtitles, Captions, Playlists (`pulsedata/youtube-transcript-scraper`) Actor

Bulk-extract YouTube transcripts (manual or auto captions) with timestamps as text, SRT, VTT or JSON – original language or auto-translated. Videos, Shorts & playlists; includes title, channel, duration, views, publish date. $2 per 1,000 videos.

- **URL**: https://apify.com/pulsedata/youtube-transcript-scraper.md
- **Developed by:** [PulseData](https://apify.com/pulsedata) (community)
- **Categories:** Videos, AI, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 transcript scrapeds

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 Transcript Scraper – Subtitles, Captions & Playlists in Bulk

Extract the **transcript of any YouTube video** – manually created subtitles or auto-generated captions – with timestamps, as plain text, SRT, WebVTT or JSON segments. Feed video URLs, Shorts, bare video IDs or **whole playlists**, choose your preferred languages or let YouTube **auto-translate** the transcript into any language, and get video metadata (title, channel, duration, views, publish date, keywords) in the same item.

Reliable and cheap: **$3 per 1,000 videos**, no YouTube API key, no quotas.

### Output

```json
{
  "videoId": "aircAruvnKk",
  "url": "https://www.youtube.com/watch?v=aircAruvnKk",
  "title": "But what is a neural network? | Deep learning chapter 1",
  "channelName": "3Blue1Brown", "channelId": "UCYO_jab_esuFRV4b17AJtAw",
  "durationSeconds": 1104, "viewCount": 18923411, "publishDate": "2017-10-05",
  "language": "en", "languageName": "English", "isAutoGenerated": false, "translatedTo": null,
  "availableLanguages": [ { "language": "en", "name": "English", "autoGenerated": false, "translatable": true }, { "language": "de", "name": "German", "autoGenerated": false } ],
  "segmentCount": 304, "wordCount": 3120,
  "text": "Here is a 28 by 28 pixel image …",
  "segments": [ { "start": 4.2, "duration": 3.1, "text": "Here is a 28 by 28 pixel image" }, … ],
  "srt": "1\n00:00:04,200 --> 00:00:07,300\nHere is a …"
}
```

Videos without captions or with a playability problem (private, age-restricted, removed) are returned with an `error` field (`NO_CAPTIONS`, `NO_MATCHING_LANGUAGE`, `LOGIN_REQUIRED`, …) and are **not charged**.

### Input

| Field | Description |
|---|---|
| `videoUrls` | Video URLs, Shorts, `youtu.be` links, embed URLs, bare IDs or playlist URLs (`…/playlist?list=…`). |
| `languages` | Preferred language codes in order (`en`, `de`, `es`, …). Manual captions are preferred over auto-generated ones. |
| `fallbackToAnyLanguage` | If no preferred language exists, use the first available track (default on). |
| `translateTo` | Let YouTube translate the transcript into this language (e.g. `en`). |
| `outputFormats` | `text`, `segments`, `srt`, `vtt` – pick any combination. |
| `includeMetadata` | Title, description, channel, duration, views, publish date, keywords, thumbnail, category. |
| `maxVideosPerPlaylist` | Cap when expanding playlists. |
| `concurrency` | Parallel videos (default 5). |
| `proxyConfiguration` | Optional. The actor runs without proxies and automatically switches to Apify residential proxy only for videos where YouTube asks for a sign-in. |

### Use cases

- **AI / LLM pipelines** – summarize, translate, answer questions over video content, build RAG knowledge bases from channels and playlists.
- **Content repurposing** – turn videos into blog posts, newsletters, social posts, show notes.
- **Research & monitoring** – keyword search across transcripts, sentiment, competitor content analysis.
- **Accessibility & localization** – SRT/VTT subtitle files in the original or translated language.

### Pricing

**$0.003 per transcript** returned. Videos without transcript are free.

### Integrations

Run on schedule or via API/SDK; export JSON, CSV, Excel; connect to Google Sheets, Make, Zapier, n8n, LangChain, LlamaIndex; use as an MCP tool from Claude, Cursor or ChatGPT.

# Actor input Schema

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

Video URLs (`https://www.youtube.com/watch?v=…`, `youtu.be/…`, Shorts, embed), bare video IDs, or playlist URLs (`…/playlist?list=…`) – one per line.

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

Language codes in order of preference (e.g. `en`, `de`, `es`). The first available track wins; manually created captions are preferred over auto-generated ones. Leave empty to take the video's default/first track.

## `fallbackToAnyLanguage` (type: `boolean`):

If none of the preferred languages exist, use the first available caption track instead of failing.

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

Optional. Have YouTube auto-translate the transcript into this language code (e.g. `en`, `de`, `fr`). Works for any video whose captions are translatable.

## `outputFormats` (type: `array`):

Which representations to include in each item: `text` (plain text), `segments` (array with start/duration/text), `srt`, `vtt`.

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

Title, description, channel, duration, view count, publish date, keywords, thumbnail, category, available caption languages.

## `maxVideosPerPlaylist` (type: `integer`):

Limit when expanding playlists (0 = all).

## `concurrency` (type: `integer`):

Videos processed in parallel.

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

Usually not required. If YouTube starts blocking, enable Apify Proxy (residential).

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "fallbackToAnyLanguage": true,
  "outputFormats": [
    "text",
    "segments"
  ],
  "includeMetadata": true,
  "maxVideosPerPlaylist": 0,
  "concurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Transcripts stored in the default dataset (JSON/CSV/Excel via the dataset API).

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pulsedata/youtube-transcript-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/0M2eADhOHlr7WxDIr/builds/YnbsugS7jYYxDngFh/openapi.json
