# YouTube Transcript Scraper: LLM-ready text, chapters, playlists (`eze007/youtube-transcripts-ai`) Actor

Get transcripts for YouTube videos, playlists and channels as plain text, timestamped markdown grouped by chapter, raw segments or SRT - plus title, channel, views, duration, description and chapters. Optional translation. Pay per video. Built for RAG, summarization and AI agents.

- **URL**: https://apify.com/eze007/youtube-transcripts-ai.md
- **Developed by:** [Eric Birdsong](https://apify.com/eze007) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 — LLM-ready text, chapters & metadata

Transcripts for **videos, playlists and whole channels**, returned the way language models and analysts actually want them:

- **text** — clean plain transcript
- **markdown** — timestamped paragraphs grouped under the video's **chapters** (best input for summarization and RAG)
- **segments** — raw timed segments (`start`, `duration`, `text`)
- **srt** — subtitle file text
- plus **metadata**: title, channel, duration, views, likes, comments, upload date, description, tags, chapters, thumbnail, available caption languages

Manual captions are preferred over auto-generated ones; you choose the language order. Optional **translation** via YouTube's auto-translate.

### Input

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/playlist?list=PL...",
    "https://www.youtube.com/@veritasium/videos"
  ],
  "languages": ["en", "es"],
  "outputFormats": ["text", "markdown"],
  "includeMetadata": true,
  "maxVideos": 100
}
```

Accepts video URLs (watch, youtu.be, shorts, live, embed), bare 11-character IDs, playlist URLs and channel URLs (`/@handle`, `/channel/ID`). Playlists and channels expand to the newest `maxVideos` videos.

### Output row

`videoId, url, title, channel, channelId, durationSeconds, viewCount, likeCount, commentCount, uploadDate, description, tags, chapters, thumbnail, availableCaptions, transcriptAvailable, language, generated, wordCount, segmentCount, text, markdown, segments, srt`

Videos without any captions still return a metadata row (billed at the lower metadata price) with `transcriptAvailable: false`.

### Pricing

| Event | Price |
|---|---|
| Transcript (with metadata, any formats) | $0.004 per video |
| Metadata only (no captions exist) | $0.001 per video |
| Translated transcript | +$0.002 per video |

100 videos with transcripts = **$0.40**. Residential proxy traffic is included — you don't pay platform usage on top.

### Proxy

YouTube blocks many datacenter IPs. The default input uses Apify residential proxy, which is the reliable setting for anything beyond a handful of videos. If you turn the proxy off and see `IpBlocked`, turn it back on.

### For AI agents (MCP)

One call: `videos: [url]`, `outputFormats: ["markdown"]`. The `markdown` field is ready to paste into a prompt — headings per chapter, a timestamp per paragraph.

### Notes

- Only public videos with captions can be transcribed; private, members-only and age-gated videos are reported with an error field.
- This Actor reads YouTube's publicly served caption tracks and metadata; it does not download video or audio. Not affiliated with YouTube or Google.

### Need a variant or a new data source?

Request it here — it ships as a pay-per-result Actor, usually within days, and you'll get the link in your request: https://github.com/Realdeal00/actor-requests/issues/new?template=request.yml

### Changelog

- 0.1 — initial release.

# Actor input Schema

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

Video URLs or IDs, playlist URLs, or channel URLs (/@handle/videos). Playlists and channels are expanded up to maxVideos.

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

Language codes in order of preference (manual captions first, then auto-generated).

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

Optional language code; adds a translated transcript row per video (YouTube auto-translation).

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

Title, channel, duration, views, likes, upload date, description, chapters, tags, thumbnail.

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

text = plain transcript; markdown = timestamped paragraphs grouped by chapter (best for LLMs); segments = raw timed segments; srt = subtitle file text.

## `maxVideos` (type: `integer`):

Cap when expanding playlists/channels.

## `proxy` (type: `object`):

YouTube blocks many datacenter IPs; residential proxy is recommended for volume.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "includeMetadata": true,
  "outputFormats": [
    "text",
    "markdown",
    "segments"
  ],
  "maxVideos": 50,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (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=dQw4w9WgXcQ"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("eze007/youtube-transcripts-ai").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("eze007/youtube-transcripts-ai").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=dQw4w9WgXcQ"
  ]
}' |
apify call eze007/youtube-transcripts-ai --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eze007/youtube-transcripts-ai"
        }
    }
}
```

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/OpcWc4kAEk7Q6jwt5/builds/4OJvXhKBcjTU8NHnX/openapi.json
