# YouTube Transcript Scraper API: Subtitles & Captions (`best_apis/youtube-transcript-scraper`) Actor

YouTube transcript API: bulk transcripts, subtitles and captions from videos, Shorts, playlists, channels and searches. Any language, auto-translate, timestamps, text/SRT/VTT. $2.50 per 1,000.

- **URL**: https://apify.com/best_apis/youtube-transcript-scraper.md
- **Developed by:** [A Q](https://apify.com/best_apis) (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

Pay per event

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 API: Bulk Subtitles & Captions

**YouTube Transcript Scraper** is a fast **YouTube transcript API** for getting **transcripts, subtitles and closed captions** in bulk from videos, **Shorts, playlists, whole channels and search results**. Pick any language, use YouTube's **auto-translate**, and download **timestamped JSON, plain text, SRT or VTT**. It costs **$2.50 per 1,000 transcripts**, and **videos without captions are free**.

### What can this YouTube transcript extractor do?

- 🎬 **Every input type**: `watch?v=`, `youtu.be/`, `/shorts/`, `/embed/`, `/live/`, video IDs, `@handles`, channel URLs, playlists and plain search keywords.
- 🌍 **Languages that actually work**: a priority list such as `["es", "en", "auto"]`, where `auto` is the spoken language. Human captions are preferred over auto-generated ones, and every result lists `availableLanguages`.
- 🔤 **Translation** to any language YouTube supports (`translateTo: "en"`).
- 🧾 **Formats**: timestamped segments, plain text, SRT and VTT subtitle files.
- ✅ **Never silently empty**: every video gets a clear `status` (`ok`, `no_captions`, `language_unavailable`, `private`, `age_restricted`, `unavailable`, `live`, `error`).
- ⚡ **Fast and block-resistant**: no browser, 20+ videos in parallel, session rotation and residential proxy by default.
- 🔔 **Channel monitoring**: *Only new videos* returns just new uploads on a schedule.

### Why use it?

- **AI, LLM and RAG**: feed clean YouTube transcripts into ChatGPT, Claude, embeddings or vector databases.
- **Content and SEO**: turn videos into blog posts, show notes, quotes and subtitles.
- **Research and monitoring**: track what channels or competitors say and find keyword mentions.
- **Accessibility and localization**: download or translate subtitles as SRT or VTT.

### How to get a YouTube transcript

1. Paste video, Shorts, playlist or channel URLs, or search terms, into **Videos**.
2. Set **Preferred caption languages** and, optionally, **Translate to**.
3. Choose **Output formats** (segments, text, SRT, VTT).
4. Click **Start** and download the transcripts, or call the API.

### Input

```json
{
  "videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw", "@mkbhd", "how to bake sourdough"],
  "languages": ["en", "auto"],
  "outputFormats": ["segments", "text", "srt"],
  "maxVideosPerSource": 25
}
```

### Output example

Real output for "Me at the zoo" (long fields shortened):

```json
{
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "input": "jNQXAC9IVRw",
  "title": "Me at the zoo",
  "channelName": "jawed",
  "channelId": "UC4QobU6STFB0P71PMvOGN5A",
  "channelUrl": "https://www.youtube.com/channel/UC4QobU6STFB0P71PMvOGN5A",
  "durationSeconds": 19,
  "viewCount": 441996352,
  "isLive": false,
  "description": "Microplastics are accumulating in human brains at an alarming rate\nhttps://www.youtube.com/watch?v=0PT5c1z3LL8\n\n“Nanoplastics and Human Health” with Matthew J Campen, PhD, MSPH\nhttps://www.youtube.com…",
  "keywords": [
    "me at the zoo",
    "jawed karim",
    "first youtube video"
  ],
  "thumbnail": "https://i.ytimg.com/vi/jNQXAC9IVRw/hqdefault.jpg?sqp=-oaymwEmCOADEOgC8quKqQMa8AEB-AG-AoAC8AGKAgwIABABGFUgWShlMA8=&rs=AOn4CLA9eLBatYv9WbkD4BbZ2Im-biSPTw",
  "status": "ok",
  "language": "en",
  "languageName": "English",
  "originalLanguage": "en",
  "isAutoGenerated": false,
  "isTranslated": false,
  "availableLanguages": [
    {
      "code": "en",
      "name": "English",
      "isAutoGenerated": false
    },
    {
      "code": "de",
      "name": "German",
      "isAutoGenerated": false
    }
  ],
  "segmentCount": 6,
  "wordCount": 39,
  "text": "All right, so here we are, in front of the elephants the cool thing about these guys is that they have really... really really long trunks and that's cool (baaaaaaaaaaahhh!!) and that's pretty much al…",
  "segments": [
    {
      "start": 1.2,
      "dur": 2.16,
      "text": "All right, so here we are, in front of the elephants"
    },
    {
      "start": 5.318,
      "dur": 2.656,
      "text": "the cool thing about these guys is that they have really..."
    },
    {
      "start": 7.974,
      "dur": 4.642,
      "text": "really really long trunks"
    }
  ],
  "scrapedAt": "2026-10-09T22:46:52.775Z"
}
```

### Proxy: residential by default

YouTube blocks most datacenter IPs, so this Actor uses **Apify RESIDENTIAL proxy by default**, billed by Apify to your plan (roughly 40 KB per video, a few cents per 1,000 transcripts). **The Apify Free plan has no residential proxy, so expect blocked videos there.** Blocked videos get `error` status and are not charged.

### How much does the YouTube transcript API cost?

| | This Actor | Typical alternatives |
|---|---|---|
| Per 1,000 transcripts | **$2.50** | $5 to $10 |
| Videos without captions | **Free** | Often charged |
| Run start | $0.005 | varies |

Examples: 100 videos ≈ $0.26, a 1,000-video channel ≈ $2.51, plus residential proxy traffic. Set a **maximum cost per run** and the Actor stops at that limit.

### How to use the API (Python, JavaScript, cURL)

Every run is available through the [Apify API](https://docs.apify.com/api/v2). Get your API token in **Apify Console → Settings → API & Integrations**.

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("best_apis/youtube-transcript-scraper").call(run_input={"videos": ["https://youtu.be/dQw4w9WgXcQ"], "languages": ["en"], "outputFormats": ["text"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### JavaScript / Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('best_apis/youtube-transcript-scraper').call({"videos": ["https://youtu.be/dQw4w9WgXcQ"], "languages": ["en"], "outputFormats": ["text"]});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### cURL (run and get transcripts in one request)

```bash
curl -X POST "https://api.apify.com/v2/acts/best_apis~youtube-transcript-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videos": ["https://youtu.be/dQw4w9WgXcQ"], "languages": ["en"], "outputFormats": ["text"]}'
```

#### Integrations

Connect results to **Google Sheets, Slack, email, Zapier, Make, n8n, Airbyte, webhooks** or AI agents through the **Apify MCP server**. Use **Schedules** in Apify Console to run it hourly, daily or weekly. Export any dataset as **JSON, CSV, Excel, XML or HTML**.

Works with LangChain, LlamaIndex and AI agents through the Apify MCP server.

### FAQ

**Is there an official YouTube transcript API?** The YouTube Data API only downloads captions for videos you own. This Actor gets public transcripts for any video and returns JSON.

**How do I download a YouTube transcript as text or SRT?** Add `text`, `srt` or `vtt` to **Output formats**. Each result includes the transcript in those formats.

**Can I get transcripts for a whole channel or playlist?** Yes. Paste the channel URL, @handle or playlist URL and set **Max videos per source**. Shorts are included.

**Does it work for auto-generated captions and other languages?** Yes, every language YouTube has captions for, plus auto-translation into 100+ languages.

**What if a video has no captions?** You get a `no_captions` row with the reason, free of charge.

**Is it legal to scrape YouTube transcripts?** The Actor reads only publicly available captions, without logging in. You are responsible for how you use the content, including copyright and YouTube's terms. See Apify's [guide to web scraping legality](https://blog.apify.com/is-web-scraping-legal/).

### Related Actors

- [App Store & Google Play Reviews Scraper](https://apify.com/best_apis/app-store-play-reviews): reviews, ratings and app details from both app stores
- [US Retail Price Scraper](https://apify.com/best_apis/us-retail-price-scraper): prices and stock from Walmart, Target, Best Buy, Home Depot and Lowe's
- [Walmart Scraper](https://apify.com/best_apis/walmart-product-price-scraper): Walmart products, prices, UPCs and a price tracker
- [Government Tenders Scraper](https://apify.com/best_apis/government-tenders-scraper): UK, EU TED and SAM.gov tenders with daily alerts
- [Google Trends API](https://apify.com/best_apis/google-trends-api): interest over time, regions, related queries and Trending Now

Questions, bugs or feature requests? Open an issue on the **Issues** tab. We usually reply within 24 hours.

# Actor input Schema

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

One per line. Accepts any YouTube link (watch, youtu.be, Shorts, embed, live), bare 11-character video IDs, channel URLs or @handles (latest uploads), playlist URLs or IDs, and plain search keywords.

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

Language codes in order of preference, e.g. en, es, pt-BR. Use "auto" to get the video's original spoken language. The first available match wins; manually written captions are preferred over auto-generated ones in the same language.

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

Language code (e.g. en, es, de, ja). If the picked captions are in another language, YouTube's own auto-translation is returned. Also used as a fallback when none of your preferred languages exist.

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

Which transcript formats to include in each result.

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

How many videos to take from each channel, playlist or search (newest first for channels).

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

Title, channel, duration, views, description, keywords, thumbnail.

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

When both exist in a language, use manually created captions over auto-generated ones.

## `onlyNewVideos` (type: `boolean`):

Skip videos already transcribed in previous runs with the same state key. Great for scheduled channel monitoring.

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

Name for the 'already seen' memory used by 'Only new videos'. Use different keys for different feeds.

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

Parallel videos.

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

Defaults to Apify RESIDENTIAL proxy, which YouTube needs from cloud IPs. Residential traffic is billed to your own Apify plan (about 40 KB per video). Free Apify plans have no residential access, so expect blocks there. Set "No proxy" to try direct and datacenter IPs only.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://www.youtube.com/shorts/VIDEO_ID",
    "@mkbhd",
    "https://www.youtube.com/playlist?list=PLAYLIST_ID",
    "how to bake sourdough"
  ],
  "languages": [
    "en",
    "auto"
  ],
  "outputFormats": [
    "segments",
    "text"
  ],
  "maxVideosPerSource": 10,
  "includeMetadata": true,
  "preferManualCaptions": true,
  "onlyNewVideos": false,
  "stateKey": "default",
  "maxConcurrency": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

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

No description

## `stats` (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 = {
    "videos": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://youtu.be/dQw4w9WgXcQ"
    ],
    "languages": [
        "en",
        "auto"
    ],
    "outputFormats": [
        "segments",
        "text"
    ],
    "maxVideosPerSource": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("best_apis/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 = {
    "videos": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://youtu.be/dQw4w9WgXcQ",
    ],
    "languages": [
        "en",
        "auto",
    ],
    "outputFormats": [
        "segments",
        "text",
    ],
    "maxVideosPerSource": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("best_apis/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 '{
  "videos": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://youtu.be/dQw4w9WgXcQ"
  ],
  "languages": [
    "en",
    "auto"
  ],
  "outputFormats": [
    "segments",
    "text"
  ],
  "maxVideosPerSource": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call best_apis/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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