# YouTube Transcript Scraper: Videos, Channels & Playlists (`inimi/youtube-transcript-scraper`) Actor

Get YouTube transcripts as clean text, timestamped segments or SRT. Videos, Shorts, whole channels and playlists, any language, with title, channel, views and description. Fast, no browser, no API key. Pay only for transcripts you get.

- **URL**: https://apify.com/inimi/youtube-transcript-scraper.md
- **Developed by:** [Inimi](https://apify.com/inimi) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 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: Videos, Channels & Playlists

Get the **transcript of any YouTube video** as clean text, timestamped segments or an SRT subtitle file. Paste video links, Shorts, a playlist or a whole channel, and get one row per video with the transcript plus title, channel, duration, views and description.

No browser and no YouTube API key. The Actor talks to YouTube directly, so it is **fast and cheap**, and residential proxies are included in the price, so blocks are handled for you.

### What can you use it for?

- **AI & RAG pipelines**: feed video content into ChatGPT, Claude, embeddings or a vector database.
- **Summaries & notes**: summarize lectures, podcasts, interviews and tutorials.
- **Content repurposing**: turn videos into blog posts, newsletters, threads or show notes.
- **Research & monitoring**: track what competitors, creators or experts say across a whole channel.
- **Subtitles**: download captions as SRT files.
- **SEO & keyword research**: see which words and topics top videos in your niche actually use.

### Features

| | |
|---|---|
| Inputs | Video URLs, video IDs, Shorts, live replays, playlists, channels (@handle or URL) |
| Formats | Plain text, text with `[m:ss]` timestamps, segments (start + duration), SRT |
| Languages | Pick preferred languages; falls back to the video's own transcript |
| Caption type | Human-made, auto-generated, or either (human-made first) |
| Video details | Title, channel, channel ID, duration, views, description, tags, thumbnail, available languages |
| Bulk | Whole channels and playlists, several videos in parallel |

### How to use

1. Add videos, playlists or channels to **Videos, channels or playlists**, one per line.
2. Optionally set **preferred languages** (e.g. `en`, `es`) and the output format.
3. For channels and playlists, set **max videos per channel or playlist** (latest first).
4. Click **Start** and download results as JSON, CSV or Excel, or use the API.

### Input example

```json
{
    "videos": [
        "https://www.youtube.com/watch?v=aircAruvnKk",
        "https://www.youtube.com/@3blue1brown",
        "https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi"
    ],
    "maxVideosPerSource": 20,
    "languages": ["en"],
    "includeTimestamps": false,
    "includeSegments": true
}
```

### Output example

```json
{
    "videoId": "aircAruvnKk",
    "url": "https://www.youtube.com/watch?v=aircAruvnKk",
    "title": "But what is a neural network? | Deep learning chapter 1",
    "channelName": "3Blue1Brown",
    "channelId": "UCYO_jab_esuFRV4b17AJtAw",
    "durationSeconds": 1120,
    "viewCount": 24976939,
    "language": "en",
    "languageName": "English",
    "isAutoGenerated": false,
    "availableLanguages": [{ "code": "en", "name": "English", "isAutoGenerated": false }, { "code": "de", "name": "German", "isAutoGenerated": false }],
    "transcript": "This is a 3. It's sloppily written and rendered at an extremely low resolution...",
    "wordCount": 3357,
    "segments": [{ "start": 4.22, "duration": 1.18, "text": "This is a 3." }],
    "status": "ok",
    "error": null
}
```

Videos without a transcript still get a row, with `status: "no_transcript"` (captions turned off) or `status: "unavailable"` (private, removed, wrong ID) and the reason in `error`, so you know what happened. A run summary is saved to the key-value store as `SUMMARY`.

### Pricing

You pay **only for transcripts you get**. Videos without a transcript are free. Proxies and compute are included. Set a maximum cost per run and the Actor stops cleanly when it is reached.

### FAQ

**Does it work for videos without captions?**
YouTube auto-generates captions for most videos in common languages. If a video has no captions at all (the creator turned them off, or it is too new), there is no transcript to get, and that row is free.

**Can I get a channel's videos?**
Yes. Paste the channel URL or @handle. The Actor takes the channel's latest uploads (including Shorts and live replays), up to your **max videos** setting.

**Which language do I get?**
The first of your preferred languages that the video has, otherwise the video's own transcript. `availableLanguages` lists every language the video has, so you can run again for another one.

**Is this legal?**
The Actor only reads captions that YouTube shows publicly on the video page. It does not log in or download the video itself. Check that your use of the text respects the creator's rights.

**Can I call it from code or an AI agent?**
Yes, via the Apify API, the official JS/Python clients, or Apify's MCP server.

# Actor input Schema

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

One per line. Any of: video URL (youtube.com/watch?v=..., youtu.be/..., Shorts, live), video ID, playlist URL, or channel URL / @handle (gets the channel's latest uploads).

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

For channels and playlists, how many of the latest videos to get. 0 = all.

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

Language codes in order of preference (e.g. "en", "es", "de"). If none is available, the video's own transcript is used.

## `transcriptType` (type: `string`):

"Any" prefers human-made captions and falls back to auto-generated ones.

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

Write the transcript text as one line per caption with \[m:ss] timestamps, instead of one paragraph.

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

Include the list of caption segments with start time and duration (seconds).

## `includeSrt` (type: `boolean`):

Also return the transcript as an .srt subtitle file (as text).

## `includeVideoDetails` (type: `boolean`):

Include the video description, keywords and thumbnail. Title, channel, duration and views are always included.

## `maxConcurrency` (type: `integer`):

How many videos to fetch at the same time.

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

YouTube blocks data-center IPs. Residential proxies are included in the price and strongly recommended.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://youtu.be/kCc8FmEb1nY"
  ],
  "maxVideosPerSource": 50,
  "languages": [
    "en"
  ],
  "transcriptType": "any",
  "includeTimestamps": false,
  "includeSegments": true,
  "includeSrt": false,
  "includeVideoDetails": true,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One row per video.

## `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 = {
    "videos": [
        "https://www.youtube.com/watch?v=aircAruvnKk",
        "https://youtu.be/kCc8FmEb1nY"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,inimi/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/8dSAgZNkUwNr0UMZ5/builds/66ENBAGVEEgOOD0C6/openapi.json
