# YouTube Transcript Scraper - LLM-Ready Video Text (`get_anything/youtube-transcript-scraper`) Actor

Get clean, LLM-ready transcripts and metadata from any YouTube video, playlist, channel or search query. Feed videos straight into ChatGPT / Claude for summaries, research and RAG. Timestamps, chapters, plain text and Markdown included.

- **URL**: https://apify.com/get\_anything/youtube-transcript-scraper.md
- **Developed by:** [Get Anything](https://apify.com/get_anything) (community)
- **Categories:** Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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 — LLM-Ready Video Text

Turn any YouTube video into clean, structured text you can drop straight into **ChatGPT, Claude, or your own RAG pipeline**. Give it video links, a whole playlist, a channel, or a search query — get back the full transcript, timestamps, and metadata.

Built for the thing millions of people do every day: *"summarize this video," "pull the key points," "search across these 40 talks."*

### What you get per video

| Field | Description |
|-------|-------------|
| `transcript` | Clean, joined plain-text transcript — ready to paste into an LLM |
| `segments` | Timestamped caption lines (`start`, `duration`, `text`) |
| `markdown` | Ready-to-paste Markdown (title + channel + link + transcript) |
| `language` / `isGenerated` | Transcript language and whether it's auto-generated |
| `title`, `channel`, `channelUrl` | Video and creator info |
| `durationSeconds`, `viewCount`, `publishDate` | Video metadata |
| `description`, `thumbnail`, `wordCount` | Extra context |

### Inputs

- **Video URLs or IDs** — `watch?v=`, `youtu.be/`, Shorts, embed, or a bare 11-char ID.
- **Playlist URLs** — expanded into their videos.
- **Channel URLs** — recent uploads from `@handle` or `/channel/UC...`.
- **Search queries** — top matching videos for each query.
- **Preferred languages** + optional **auto-translation**.
- **Timestamps / Markdown** toggles.
- **Proxy** — residential recommended (YouTube blocks transcript requests from datacenter IPs).

### Use it with your LLM

The dataset is JSON, so you can pipe results straight into any model. Example — get results via the Apify API and hand the `markdown` field to your LLM:

```bash
curl "https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=json"
```

Every item's `transcript` and `markdown` fields are pre-cleaned for token efficiency (HTML entities decoded, newlines collapsed). Perfect for summarization, Q\&A over videos, content repurposing, and building searchable knowledge bases.

### Pricing

Pay-per-result: you're charged once per **successfully extracted transcript** (`transcript-scraped` event). Videos with no captions available are **not** charged. Set the per-result price in the Apify Console monetization settings — a low price (e.g. a fraction of a cent per transcript) keeps it affordable for daily, high-volume use.

### Notes

- Works with both manually-created and auto-generated captions.
- Falls back to any available language when your preferred languages aren't present.
- Metadata is best-effort and never blocks a transcript from being returned.
- Respect YouTube's Terms of Service and creators' rights when using scraped content.

# Actor input Schema

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

One or more YouTube video URLs or 11-character video IDs. Accepts youtube.com/watch?v=..., youtu.be/... and Shorts links.

## `playlistUrls` (type: `array`):

Playlist URLs to expand into their videos (e.g. youtube.com/playlist?list=...). Limited by 'Max videos per source'.

## `channelUrls` (type: `array`):

Channel URLs to pull recent uploads from (e.g. youtube.com/@handle or youtube.com/channel/UC...). Limited by 'Max videos per source'.

## `searchQueries` (type: `array`):

Search YouTube and scrape the top matching videos for each query. Limited by 'Max videos per source'.

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

Preferred transcript language codes in priority order, e.g. 'en', 'es', 'ar'. Falls back to any available language if none match.

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

If set (e.g. 'en'), auto-translate the transcript to this language when the original differs and YouTube offers translation.

## `includeTimestamps` (type: `boolean`):

Add a 'segments' array with start time + text for each caption line. The clean 'transcript' text is always included.

## `includeMarkdown` (type: `boolean`):

Add a ready-to-paste Markdown field (title, channel, link + transcript) for pasting straight into an LLM.

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

Cap on how many videos to take from each playlist / channel / search query.

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

YouTube blocks transcript requests from datacenter IPs. Residential proxy is strongly recommended for reliable results.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "includeTimestamps": true,
  "includeMarkdown": true,
  "maxVideosPerSource": 25,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One item per video in the default dataset.

# 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"
    ],
    "languages": [
        "en"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

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

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

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9xhoJcqQDivVmC8qS/builds/VP3TAr1mM0c1kbTPr/openapi.json
