# YouTube Transcript Scraper (`jadey_orbit/youtube-transcript-scraper`) Actor

Extract transcripts and subtitles from YouTube videos with timestamps — any language, auto-generated included. Pay per video.

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

## Pricing

from $3.00 / 1,000 transcript delivereds

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

Extract **transcripts and subtitles from YouTube videos** — with timestamps, in any available language, including auto-generated captions. Built for AI/LLM pipelines: clean text plus structured segments, at **$3 per 1,000 videos**.

### What does it extract?

Per video: full transcript text, timestamped segments (start, duration, text), language and auto-generated flag, all available caption languages, plus video metadata (title, channel, duration, view count).

```json
{
    "videoId": "dQw4w9WgXcQ",
    "title": "Rick Astley - Never Gonna Give You Up (Official Video)",
    "channel": "Rick Astley",
    "language": "en",
    "isAutoGenerated": false,
    "transcript": "We're no strangers to love You know the rules and so do I...",
    "segments": [
        { "start": 18.64, "duration": 3.96, "text": "We're no strangers to love" }
    ]
}
```

### Why this scraper?

- 💰 **$3 per 1,000 transcripts** — comparable actors charge $5–$10 per 1,000.
- 🧾 **You only pay for delivered transcripts** — videos without captions or unavailable videos are reported but never charged.
- 🌍 **Any language** — request a preferred language with automatic fallback; manual captions preferred over auto-generated (configurable).
- ⏱️ **Timestamps included** — per-line start/duration for subtitle regeneration, clip finding, or RAG chunking.
- 🔗 **Flexible input** — full URLs, short youtu.be links, Shorts URLs, or bare video IDs.

### Pricing

| Event | Price | When charged |
|---|---|---|
| Actor start | $0.01 | Once per run |
| Transcript scraped | $0.003 | Per video with a successfully delivered transcript |

**Example**: transcripts for 500 videos ≈ $0.01 + $1.50 = **$1.51**.

### Input

```json
{
    "videos": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ", "youtu.be/jNQXAC9IVRw", "jNQXAC9IVRw"],
    "language": "en",
    "preferManual": true,
    "includeSegments": true
}
```

### Use cases

- **AI & RAG pipelines** — turn video libraries into searchable text corpora
- **Content repurposing** — blog posts, summaries, and social snippets from videos
- **Research & media monitoring** — analyze what's being said across channels
- **Subtitle workflows** — extract and translate caption tracks
- **SEO** — mine competitor video content for topic coverage

Works out of the box with the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) so AI agents (Claude, Cursor, etc.) can call it directly, and with the Apify API/SDKs, Zapier, and Make.

### Notes

- Only publicly available caption data is collected.
- Videos with captions disabled return an item with `error: "No captions available"` and the list of available languages (never charged).
- Residential proxy (default) recommended: YouTube throttles datacenter IPs.
- Need batch channel-level extraction, SRT/VTT export, or translation? Open an issue in the **Issues** tab — answered within 24 hours.

# Actor input Schema

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

YouTube video URLs or video IDs (e.g. <code>https://www.youtube.com/watch?v=dQw4w9WgXcQ</code>, <code>youtu.be/abc123</code>, or just <code>dQw4w9WgXcQ</code>).

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

Preferred transcript language code (e.g. <code>en</code>, <code>es</code>, <code>de</code>). Falls back to the first available track if not found.

## `preferManual` (type: `boolean`):

Prefer human-created captions over auto-generated ones when both exist.

## `includeSegments` (type: `boolean`):

Include the segments array (start time, duration, text per caption line) in addition to the full transcript text.

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

Residential proxies recommended — YouTube throttles datacenter IPs.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "language": "en",
  "preferManual": true,
  "includeSegments": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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("jadey_orbit/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=dQw4w9WgXcQ"] }

# Run the Actor and wait for it to finish
run = client.actor("jadey_orbit/youtube-transcript-scraper").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 '{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ]
}' |
apify call jadey_orbit/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/yG5Mng2DFicX7EbC4/builds/YeHoFfoKgQBinieCG/openapi.json
