# YouTube Transcript Scraper (Captions & Subtitles) (`actorlab/youtube-transcript-scraper`) Actor

Get YouTube transcripts from videos, Shorts, playlists and channels: full text + timestamped segments, any language, auto-translation, free video metadata. No API key. $1.50 per 1,000 transcripts, no charge for videos without captions.

- **URL**: https://apify.com/actorlab/youtube-transcript-scraper.md
- **Developed by:** [actorlab](https://apify.com/actorlab) (community)
- **Categories:** Videos, AI, Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 transcripts

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/actors/running/actors-in-store.md#pay-per-event

## 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 (Captions & Subtitles)

Get **YouTube transcripts** from single videos, Shorts, **whole playlists and channels** in one run. Each result has the full transcript text, **timestamped segments**, language info (human-made or auto-generated) and video metadata: title, channel, duration, views, description, keywords and thumbnail. You can pick a language, and translation into other languages is available on a best-effort basis. You pay only for transcripts you actually get.

No YouTube API key, no login, no quota. It runs at **128 MB**.

### Why use this YouTube transcript scraper?

- 📝 **Full text + timestamps.** A clean `transcript` string for LLMs and search, plus a `segments` array (`start`, `duration`, `text`) for subtitles, quotes and chapters.
- 📺 **Videos, Shorts, playlists, channels.** Paste any mix of URLs. Playlists and channels (`@handle`, `/channel/UC…`) are expanded automatically.
- 🌍 **Any language.** Choose the language you want and prefer human-made captions over auto-generated ones. *Translate to* uses the creator's track in that language when there is one, or YouTube's machine translation (best effort).
- 📊 **Free video metadata.** Title, channel, duration, view count, description, keywords and thumbnail come with every transcript.
- 💸 **Pay per transcript only.** Videos without captions, private or removed videos cost nothing.
- ⚡ **Reliable.** Retries on fresh IPs, so you don't see YouTube's "Sign in to confirm you're not a bot" errors.

### Use cases

- **AI & LLM pipelines**: summarise videos, build RAG knowledge bases, generate notes, quizzes, blog posts or social threads from videos
- **Content repurposing & SEO**: turn videos into articles, show notes and captions
- **Research & monitoring**: analyse what channels, competitors, politicians or influencers say; track mentions and topics
- **Education**: study notes and searchable lecture transcripts
- **Data science**: build speech/text datasets by channel, topic or language

### How to use

1. Click **Try for free**.
2. Paste YouTube URLs into **YouTube URLs or video IDs**, one per line:
   - `https://www.youtube.com/watch?v=jNQXAC9IVRw` or `https://youtu.be/jNQXAC9IVRw` or `jNQXAC9IVRw`
   - `https://www.youtube.com/shorts/…`
   - `https://www.youtube.com/playlist?list=PL…`
   - `https://www.youtube.com/@mkbhd` (latest videos of a channel)
3. Optionally set **Preferred language**, **Translate to** and **Max videos per playlist / channel**.
4. Click **Start**. Export as JSON, CSV, Excel or HTML, or use the API, webhooks, Make, Zapier, n8n, LangChain…

### Input example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://www.youtube.com/@3blue1brown"
  ],
  "language": "en",
  "translateTo": "",
  "preferManual": true,
  "includeSegments": true,
  "includeMetadata": true,
  "maxVideosPerSource": 20
}
```

### Output example

```json
{
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "source": null,
  "title": "Me at the zoo",
  "channelName": "jawed",
  "channelId": "UC4QobU6STFB0P71PMvOGN5A",
  "channelUrl": "https://www.youtube.com/channel/UC4QobU6STFB0P71PMvOGN5A",
  "durationSeconds": 19,
  "viewCount": 380000000,
  "description": "Microformats …",
  "keywords": ["me at the zoo", "jawed karim"],
  "isLive": false,
  "thumbnail": "https://i.ytimg.com/vi/jNQXAC9IVRw/hqdefault.jpg",
  "language": "en",
  "originalLanguage": "en",
  "isAutoGenerated": false,
  "isTranslated": false,
  "availableLanguages": [{ "code": "en", "name": "English", "autoGenerated": false }],
  "wordCount": 39,
  "transcript": "All right, so here we are, in front of the elephants …",
  "segments": [
    { "start": 1.2, "duration": 2.16, "text": "All right, so here we are, in front of the elephants" },
    { "start": 5.318, "duration": 2.656, "text": "the cool thing about these guys is that they have really..." }
  ],
  "scrapedAt": "2026-11-25T02:30:00.000Z"
}
```

Videos without a transcript are still listed, with an `error` field (e.g. `"No captions/transcript available for this video"`), and they are **not charged**.

### How much does it cost?

Pay-per-event pricing, with platform usage and proxies included:

| Event | Price |
|---|---|
| Actor start | $0.0005 per run |
| Transcript | **$0.0015** per video with a transcript ($1.50 per 1,000) |

Examples: 1 video ≈ $0.002. A 200-video channel ≈ $0.30. Metadata, segments and translation are included at no extra cost. Set **Maximum cost per run** and the scraper stops cleanly at your budget.

### FAQ

**Does it work for videos without captions?** It returns the transcript YouTube has, either creator-uploaded or auto-generated. Most videos with speech have auto-generated captions. If a video has none (music-only, very new, or captions disabled), you get an `error` and pay nothing.

**Can I get transcripts in another language?** Set **Preferred language** to pick an existing caption track. **Translate to** first looks for the creator's own track in that language, then tries YouTube's machine translation. YouTube heavily rate-limits machine translation, so when it isn't available you get the original transcript with a `translationError` note. You're charged the same single transcript event either way.

**Do I need a YouTube API key or account?** No.

**Can I scrape a whole channel?** Yes. Paste the channel URL and set **Max videos per playlist / channel**. Videos come newest first.

**Is it legal?** The scraper only reads publicly available captions and metadata. Transcripts are the creators' content, so use them in line with copyright law and YouTube's terms (e.g. research, analysis, accessibility, summaries). If unsure, consult a lawyer.

**Found a bug or need a feature?** Open an issue in the **Issues** tab and we'll respond quickly.

# Actor input Schema

## `urls` (type: `array`):

Videos (youtube.com/watch?v=…, youtu.be/…, /shorts/…, or an 11-character ID), playlists (…?list=…) and channels (youtube.com/@handle, /channel/UC…). Playlists and channels are expanded to their videos (newest first for channels).

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

Transcript language code to pick, e.g. en, es, de, ms, ja, pt. If the video has no track in this language, the video's original transcript is returned. Leave empty to always get the original language.

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

Get the transcript in this language, e.g. en, es, fr, id. Uses the creator's caption track in that language when one exists, otherwise YouTube's machine translation (best effort: YouTube rate-limits translation, and when it's unavailable you get the original transcript with a translationError note). Leave empty for no translation.

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

When both exist, use creator-uploaded captions instead of YouTube's auto-generated ones.

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

Add a 'segments' array with start time, duration and text for every caption line (for subtitles, chapters, quotes with timestamps). The full plain text is always included in 'transcript'.

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

Add channel, duration, view count, description, keywords and thumbnail. Free.

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

Limit how many videos are taken from each playlist or channel. Single video URLs are always processed.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "language": "en",
  "preferManual": true,
  "includeSegments": true,
  "includeMetadata": true,
  "maxVideosPerSource": 50
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "urls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("actorlab/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 = { "urls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"] }

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

```

## MCP server setup

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

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/FzEChqdEQl3S7DuII/builds/dM1bSQ4eiONhaikLO/openapi.json
