# Youtube Transcript Scraper (`devon_gtme/youtube-transcript-scraper`) Actor

Extract transcripts, subtitles and closed captions from YouTube videos in bulk - fast and reliable. Accepts URLs, youtu.be links or bare IDs; returns timestamped segments plus full plain text, with language preference and fallback. Built for AI/LLM pipelines, RAG, research and SEO.

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

## Pricing

from $2.00 / 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 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 — Bulk Video to Text

Extract **transcripts, subtitles and closed captions from YouTube videos in bulk** — clean, structured, and cheap. Paste video URLs (or just video IDs), get back timestamped segments **and** the full plain-text transcript for every video. No YouTube API key, no quota, no browser automation.

**~$2 per 1,000 videos** — and videos with no transcript are **skipped, not charged**. No data, no charge.

### Why this one

- **Built for bulk** — paste hundreds or thousands of URLs in one run; videos are processed concurrently with automatic retries and rotating proxy sessions
- **No data = no charge** — videos with captions disabled, unavailable videos, and age-restricted videos are skipped and never billed as results. Competing actors charge you for empty rows
- **Any URL shape** — full `watch?v=` URLs, `youtu.be` short links, Shorts, embeds, live URLs, or bare 11-character video IDs
- **Language-smart** — give a preference order (`en`, `de`, `pt` …); the actor takes the best match (human-created transcripts first) and gracefully falls back to whatever language the video actually has, so you always get a transcript when one exists

### Who uses this data

- **AI / LLM pipelines** — turn videos into training data, RAG knowledge bases, embeddings, or summarisation inputs at scale
- **Content repurposing** — convert videos into blog posts, newsletters, show notes, and social snippets
- **Research & analysis** — study interviews, lectures, earnings calls, podcasts and news coverage as searchable text
- **SEO & competitive intel** — mine competitor channels for topics, keywords and hooks that work

### What you get

One record per video:

| Field | Example |
|---|---|
| `videoId` | `jNQXAC9IVRw` |
| `url` | `https://www.youtube.com/watch?v=jNQXAC9IVRw` |
| `title` | Me at the zoo |
| `language` / `languageCode` | English / `en` |
| `isAutoGenerated` | `false` |
| `segments` | `[{ "start": 1.2, "duration": 2.16, "text": "All right, so here we are…" }, …]` |
| `plainText` | The full transcript joined into one clean string |
| `wordCount` / `segmentCount` | `39` / `6` |

Choose `segments`, `plainText`, or `both` (default) via the **Output format** option.

### Input example

```json
{
    "videoUrls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://youtu.be/dQw4w9WgXcQ",
        "9bZkp7q19f0"
    ],
    "languages": ["en"],
    "includeAutoGenerated": true,
    "outputFormat": "both"
}
```

### Languages

Works with every language YouTube supports — both human-created subtitles and auto-generated captions. Set `languages` as a preference order; turn `includeAutoGenerated` off if you only want human-created transcripts.

### Videos without transcripts

Some videos have captions disabled, are unavailable, or are age-restricted. These are **skipped**: they don't appear in the dataset and are **not charged**. The run log and status message report exactly how many were skipped.

### Proxy

YouTube blocks most datacenter IPs, so the actor defaults to **Apify residential proxies** — this is what makes the 100%-reliability bulk runs possible. Leave the default proxy configuration unless you know what you're doing.

### Export & integrations

Results land in an Apify dataset — export **CSV, Excel, JSON**, or connect Google Sheets, Make, Zapier, Slack, and webhooks via Apify integrations.

***

**Need something more custom?** Channel-level scraping, transcript summarisation, keyword extraction, translation, or a fully managed video-to-text pipeline — message me via my Apify profile and I'll build it.

# Actor input Schema

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

YouTube videos to transcribe. Accepts full URLs (watch, shorts, embed, live), short youtu.be links, or bare 11-character video IDs. One per line — paste hundreds or thousands for bulk runs.

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

ISO language codes in preference order (e.g. en, de, es, pt, en-US). The first available transcript matching this order is used. If none match, the actor falls back to whatever language the video actually has — so you always get a transcript when one exists.

## `includeAutoGenerated` (type: `boolean`):

When on (default), YouTube's auto-generated captions are used if no manually created transcript exists. Turn off to only accept human-created transcripts.

## `outputFormat` (type: `string`):

"segments" = timestamped array of {start, duration, text}. "plainText" = the full transcript joined into one string. "both" (default) = both fields on every record.

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

Proxies used to fetch transcripts. YouTube blocks most datacenter IPs, so RESIDENTIAL proxies (the default) are strongly recommended — datacenter proxies will usually fail with 'IP blocked' errors.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://youtu.be/dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "includeAutoGenerated": true,
  "outputFormat": "both",
  "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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://youtu.be/dQw4w9WgXcQ"
    ],
    "languages": [
        "en"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devon_gtme/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=jNQXAC9IVRw",
        "https://youtu.be/dQw4w9WgXcQ",
    ],
    "languages": ["en"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

```

## MCP server setup

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

```

## OpenAPI specification

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