# YouTube Transcript & Subtitles Scraper API (`johnvc/youtubetranscripts`) Actor

Scrape YouTube transcripts, subtitles, and captions in bulk, the cheapest pay-per-video YouTube transcript API on Apify. Callable from any MCP client (Claude, Cursor, ChatGPT). Supports YouTube videos, Shorts, and every URL format.

- **URL**: https://apify.com/johnvc/youtubetranscripts.md
- **Developed by:** [John](https://apify.com/johnvc) (community)
- **Categories:** SEO tools, Social media, Videos
- **Stats:** 132 total users, 54 monthly users, 99.9% runs succeeded, 10 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.01 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 & Subtitles Scraper: Pay-Per-Video MCP API

Scrape **YouTube transcripts, subtitles, and captions** in bulk at near-free pay-per-video rates. Built for **MCP clients** (Claude, Cursor, VS Code, ChatGPT), AI agents, content pipelines, and SEO research. Works with standard videos, **YouTube Shorts**, and every URL format.

> 💡 Pricing: **$0.0001 per video transcribed**, about **$0.10 per 1,000 videos**. Tiny per-run startup + per-result fees ($0.00001 each, set by Apify). No subscription, no proxy fees.

---

> **Example code (Python):** <https://github.com/johnisanerd/Apify-Youtube-Transcripts-API>

### ⚡ What you get back

For every video, the dataset receives:

- `non_timestamped` - full transcript text, ready for LLMs.
- `timestamped` - every snippet with `text`, `start`, and `duration` in seconds.
- `language`, `language_code`, `is_generated`, `is_translatable`, `translation_languages`.
- `total_seconds` - video duration.
- `video_id`, `url`, `success`, `timestamp`.
- On failure: structured `error`, `error_message`, `error_type` (no crash; the run continues).

---

### 🎯 Use cases

- **LLM training data** - bulk-collect transcripts for fine-tuning or RAG.
- **AI agents that watch YouTube** - let Claude or Cursor pull a transcript on demand via MCP.
- **Content repurposing** - turn videos into blog posts, summaries, or social clips.
- **SEO research** - mine transcripts for keywords, topics, and competitor analysis.
- **Podcast & video search** - index thousands of videos by their actual spoken content.

---

### 🤖 Use with MCP (Claude, Cursor, VS Code, ChatGPT)

This Actor is callable as a tool from any [Model Context Protocol](https://modelcontextprotocol.io) client. The [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) exposes every Actor on the store: **no installation, no separate package**.

#### Step 1: Get an Apify API token

Grab a token from your [Apify account → Integrations](https://console.apify.com/account/integrations).

#### Step 2: Connect your MCP client

**Claude Desktop / Claude Code**: edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com",
      "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
    }
  }
}
````

**Cursor**: add `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` globally):

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com",
      "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
    }
  }
}
```

**VS Code**: add `.vscode/mcp.json`:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com",
      "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
    }
  }
}
```

**ChatGPT / web-only clients**: use the hosted [Apify Tester MCP Client](https://apify.com/jiri.spilka/tester-mcp-client?fpr=9n7kx3) in the browser.

#### Step 3: Ask your agent

Once connected, prompt naturally:

> *"Use Apify to get the transcript of https://www.youtube.com/watch?v=dQw4w9WgXcQ"*

> *"Pull YouTube transcripts for these three URLs and summarize each: …"*

> *"Find the YouTube transcript scraper on Apify and run it for this Shorts URL."*

Your client will discover this Actor via the `search-actors` tool, register it as a callable function, and feed the transcript back into the conversation.

Full reference: [Apify MCP integration docs](https://docs.apify.com/platform/integrations/mcp) · [MCP server source](https://github.com/apify/apify-mcp-server).

***

### 🔧 Input

| Parameter | Type | Required | Description |
|---|---|---|---|
| `youtube_url` | string **or** array of strings | ✅ | One URL or many. Works with standard videos, Shorts, `youtu.be`, embed, and mobile URLs. |

#### Single video

```json
{ "youtube_url": "https://www.youtube.com/watch?v=p8gV_7zFN44" }
```

#### Batch (processed in parallel)

```json
{
  "youtube_url": [
    "https://www.youtube.com/watch?v=5kcaHAuGxmY",
    "https://www.youtube.com/watch?v=p8gV_7zFN44",
    "https://www.youtube.com/shorts/s4UkCaf_scs"
  ]
}
```

> 💡 **Pro tip for large batches.** For batches of more than ~25 URLs, open **Advanced settings** on the run page and increase the **Timeout** before clicking **Start**, or split the input across multiple runs. Failed or timed-out videos are still recorded in the dataset (with `success: false` and an `error_message`), so you can always retry only the missing ones.

***

### 📤 Example output

```json
{
  "url": "https://www.youtube.com/watch?v=p8gV_7zFN44",
  "video_id": "p8gV_7zFN44",
  "language": "English",
  "language_code": "en",
  "is_generated": false,
  "is_translatable": true,
  "translation_languages": ["es", "fr", "de"],
  "total_seconds": 4782.52,
  "timestamped": [
    { "text": "Hello and welcome to this video", "start": 0.08, "duration": 3.5 }
  ],
  "non_timestamped": "Hello and welcome to this video...",
  "timestamp": "2026-05-11T10:30:00",
  "success": true
}
```

***

### 💰 Pricing

| Event | Price | Charged for |
|---|---|---|
| `videoprocessed` | **$0.0001** | each video successfully transcribed (~$0.10 per 1,000 videos) |
| `apify-actor-start` | $0.00001 | one event per GB of memory at run start (Apify-managed) |
| `apify-default-dataset-item` | $0.00001 | per item stored in the dataset (Apify-managed) |

**Total cost examples** (typical 1-video run = setup + 1 video + 1 dataset item):

| Run size | Total cost |
|---|---|
| 1 video | ~$0.00012 |
| 10 videos | ~$0.0011 |
| 100 videos | ~$0.0101 |
| 1,000 videos | ~$0.101 |
| 10,000 videos | ~$1.001 |

Unlike actors that charge per second of video, this one charges **per video**: a 5-hour lecture costs the same as a 60-second Short. No subscription, no proxy fees. Failed videos and videos with no transcript are **not charged**.

***

### 🚀 Quickstart

1. Open this Actor on the [Apify store](https://apify.com/johnvc/YoutubeTranscripts?fpr=9n7kx3).
2. Paste a YouTube URL into `youtube_url` (or an array of URLs).
3. Click **Start**. Results appear in the dataset within seconds.

Prefer the API? Every Actor on Apify has an [API endpoint](https://docs.apify.com/platform/integrations) and can be called from any language, scheduled, or wired into webhooks.

***

### ❓ FAQ

**What if the video has no transcript?**
The Actor records an error entry in the dataset (`success: false`, `error_message: …`) and moves on to the next URL. You are **only charged for successful transcriptions** of the requested videos.

**Does it work for YouTube Shorts?**
Yes. `https://www.youtube.com/shorts/VIDEO_ID` works out of the box, as do `youtu.be/`, `/embed/`, and `m.youtube.com` formats.

**Can I call this from an AI agent?**
Yes, that is the primary design goal. See the **Use with MCP** section above for Claude, Cursor, VS Code, and ChatGPT setup.

**What about translation?**
The output includes `is_translatable` and a list of `translation_languages` available for each transcript. Translation itself is not performed by this Actor; pair it with your favorite LLM (or another Apify Actor) for translation.

**Why is this so much cheaper than other YouTube transcript scrapers?**
This is a loss-leader: built for adoption, not margin. The actor uses YouTube's own caption tracks via a free open-source library, so the marginal cost is near zero.

***

### 🔗 Links

- [Actor on Apify Store](https://apify.com/johnvc/YoutubeTranscripts?fpr=9n7kx3)
- [Apify MCP integration docs](https://docs.apify.com/platform/integrations/mcp)
- [Model Context Protocol](https://modelcontextprotocol.io)
- [Apify platform docs](https://docs.apify.com/platform/)

***

### Featured Tasks

Ready-to-run examples that show this API solving a specific problem. Each opens its own setup so you can
run it on your account in one click.

- [Get YouTube transcripts in Claude Code via MCP](https://apify.com/johnvc/YoutubeTranscripts/examples/get-youtube-transcripts-in-claude-code-via-mcp?fpr=9n7kx3) - pull any video's transcript straight into [Claude Code](https://claude.ai/referral/uIlpa7nPLg) (free trial available) through MCP, with timestamped and plain text output.
- [Use YouTube transcripts in Claude Cowork via MCP](https://apify.com/johnvc/YoutubeTranscripts/examples/use-youtube-transcripts-in-claude-cowork-via-mcp?fpr=9n7kx3) - fetch transcripts inside [Claude Cowork](https://claude.ai/referral/uIlpa7nPLg) (free trial available) as an MCP plugin for research and document workflows.
- [Download a batch of YouTube transcripts in bulk](https://apify.com/johnvc/YoutubeTranscripts/examples/download-a-batch-of-youtube-transcripts-in-bulk?fpr=9n7kx3) - transcribe a whole list of videos in one run, one dataset row per video with language metadata.

***

Last Updated: 2026.06.15

# Actor input Schema

## `youtube_url` (type: `string,array`):

Provide one YouTube URL as a string, or multiple as an array. Works with standard videos, Shorts, youtu.be short links, embed URLs, and m.youtube.com mobile URLs. Each URL is processed in parallel. Invalid URLs are recorded as errors in the dataset but do not stop the run. Charged per video successfully transcribed.

## Actor input object example

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

# Actor output Schema

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

Complete transcript data for all processed YouTube videos. Each item includes video metadata (URL, video ID, language info), timestamped transcript snippets with start times and durations, full non-timestamped transcript text, and processing status. Failed videos include error information.

# 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 = {
    "youtube_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
};

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

# Run the Actor and wait for it to finish
run = client.actor("johnvc/youtubetranscripts").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "youtube_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}' |
apify call johnvc/youtubetranscripts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=johnvc/youtubetranscripts",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Transcript & Subtitles Scraper API",
        "description": "Scrape YouTube transcripts, subtitles, and captions in bulk, the cheapest pay-per-video YouTube transcript API on Apify. Callable from any MCP client (Claude, Cursor, ChatGPT). Supports YouTube videos, Shorts, and every URL format.",
        "version": "0.0",
        "x-build-id": "YeYJqioeVfInpigbk"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/johnvc~youtubetranscripts/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-johnvc-youtubetranscripts",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/johnvc~youtubetranscripts/runs": {
            "post": {
                "operationId": "runs-sync-johnvc-youtubetranscripts",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/johnvc~youtubetranscripts/run-sync": {
            "post": {
                "operationId": "run-sync-johnvc-youtubetranscripts",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "youtube_url"
                ],
                "properties": {
                    "youtube_url": {
                        "title": "YouTube URL(s)",
                        "description": "Provide one YouTube URL as a string, or multiple as an array. Works with standard videos, Shorts, youtu.be short links, embed URLs, and m.youtube.com mobile URLs. Each URL is processed in parallel. Invalid URLs are recorded as errors in the dataset but do not stop the run. Charged per video successfully transcribed."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
