# YouTube Transcript Scraper: Subtitles + Metadata (`ech0blaz3/youtube-transcripts`) Actor

Get YouTube transcripts from videos, whole channels or playlists as JSON, text or SRT, with views, likes and publish date included free. No login. $1.99 per 1,000 videos.

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

## Pricing

$1.99 / 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/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: Subtitles + Metadata

**YouTube Transcript Scraper** gets the transcript of any public YouTube video, together with **all of its metadata**. Paste video links, **whole channels** or **playlists**, press Start, and download the results as JSON, CSV, Excel or through the API.

Each video gives one row with:

- the subtitles, as JSON with timestamps, plain text or SRT;
- title, channel, duration, views, **likes**, **publish date**, description and tags;
- the list of every subtitle language the video has.

No YouTube account, no cookies, no browser. Each video is requested from a fresh residential IP.

### Full metadata is included, free

**$1.99 per 1,000 transcripts, and that price already includes all metadata.** Likes, publish date, views, channel, description, tags, category and thumbnail come in every row. There are no add-ons and no "extended metadata" option charged per video.

In our 50-video test run, likes and publish date came back for every one of the 42 videos that returned a transcript.

**You pay only for videos that return a transcript.** Videos that fail are saved with the reason and cost nothing. That covers videos without subtitles, private, deleted and age-restricted videos, and broken links.

### What can this YouTube transcript scraper do?

| You give | You get |
| --- | --- |
| **Video links or IDs** (up to 1,000 per run) | One row per video: the transcript and the full metadata |
| **Channels**: `@handle`, `/channel/UC...`, `/c/name`, `/user/name` | The channel's newest videos (up to `maxVideosPerSource`, default 50, max 5,000), each with its transcript. Shorts are skipped unless you turn on `includeShorts`. |
| **Playlists**: any link with `list=PL...`, or the playlist ID | The playlist's videos in playlist order, up to `maxVideosPerSource` |
| **Language** (optional) | Subtitles in the language spoken in the video, or in the language you choose. When the video has no track in your language, YouTube's own auto-translation is used. |
| **Format** | `json`: `[{start, duration, text}]` in seconds. `text`: one plain string, ready for an LLM. `srt`: the content of a ready-to-use subtitle file. |

Typical uses:

- **Transcripts for AI and RAG**: feed lectures, podcasts and talks to an LLM or a vector store.
- **Content repurposing**: turn videos into articles, summaries, social posts or SRT subtitles.
- **SEO and research**: analyse what competitors, creators or a whole topic actually say, with views and likes alongside.
- **Channel monitoring**: pull the latest 50 videos of a channel with transcripts and stats in one run.

### How much does it cost to get YouTube transcripts?

**$1.99 per 1,000 videos with a transcript.** There is no charge for the run itself, for metadata, for failed videos, or for collecting the video list of a channel or playlist.

| Example run | Successful videos | Cost |
| --- | --- | --- |
| 10 videos | 10 | $0.02 |
| 50 mixed videos, including private, deleted and age-restricted ones (our test run) | 42 | $0.08 |
| 1 channel, latest 50 videos | 50 | $0.10 |
| 1,000 videos | 1,000 | $1.99 |

A long video costs the same as a short one: a 3-hour lecture and a 1-minute Short are one result each.

Set a maximum cost per run in the run options. The Actor stops before going over it.

### Input

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://youtu.be/dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/F85HVFug52A"
  ],
  "channels": ["@TED"],
  "playlists": ["https://www.youtube.com/playlist?list=PLpeyFKIeKP17OnH06JtETP8sLGNOBZUwV"],
  "maxVideosPerSource": 50,
  "includeShorts": false,
  "language": "en",
  "outputFormat": "text",
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

- **`videos`**: links of these forms are accepted: `watch?v=`, `youtu.be/`, `/shorts/`, `/embed/`, `/live/`, and bare 11-character IDs. Duplicates are processed once.
- **`channels`**: the newest videos come first. With `includeShorts` off you get the channel's Videos tab. With it on you get all uploads, including Shorts and live-stream replays.
- **`playlists`**: videos keep the playlist's order. `includeShorts` does not apply to playlists. Mixes (`list=RD...`) are personal to each viewer and are not supported.
- Fill in any combination of `videos`, `channels` and `playlists`. A video that appears in several of them is transcribed and charged once.
- **`language`**: leave it empty to get the video's own language. The Actor takes the language from YouTube's metadata first: the default audio track, or the default caption track. Without that, it prefers **manual subtitles over auto-generated ones**. It picks manual subtitles in the speech-recognition language, then manual English, then any manual track. Auto-generated subtitles are used only when the video has no manual ones. This guards against YouTube's speech recognition mislabelling the language, for example an English talk tagged as Swedish.
- Keep the default residential proxy. YouTube quickly blocks repeated requests from one IP.

### Output

One row per video (abridged):

```json
{
  "video_id": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "source_type": "video",
  "success": true,
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channel_name": "Rick Astley",
  "channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "duration_seconds": 213,
  "view_count": 1834528866,
  "like_count": 19494218,
  "published_at": "2009-10-24T23:57:33-07:00",
  "category": "Music",
  "description": "The official video for “Never Gonna Give You Up” by Rick Astley...",
  "tags": ["rick astley", "Never Gonna Give You Up", "nggyu", "..."],
  "available_languages": [
    {"language_code": "en", "name": "English", "is_auto_generated": false},
    {"language_code": "en", "name": "English (auto-generated)", "is_auto_generated": true},
    {"language_code": "de-DE", "name": "German (Germany)", "is_auto_generated": false}
  ],
  "language": "en",
  "is_auto_generated": false,
  "translated_from": null,
  "format": "json",
  "segment_count": 61,
  "transcript": [{"start": 18.64, "duration": 3.24, "text": "..."}, "..."],
  "warnings": [],
  "error": null
}
```

Other fields in every row: `channel_url`, `thumbnail_url`, `is_live_content`, and `source_input` (the video, channel or playlist link exactly as you gave it). `source_type` is `video`, `channel` or `playlist`.

A failed video looks like this, and is not charged:

```json
{
  "video_id": "Xq0deleted1",
  "success": false,
  "transcript": null,
  "error": {"type": "unavailable", "message": "ERROR: This video is unavailable"}
}
```

| `error.type` | Meaning |
| --- | --- |
| `no_captions` | The video has no subtitles at all, neither manual nor auto-generated. The metadata is still returned. |
| `unavailable` | The video is private, deleted, age-restricted or blocked. |
| `language_unavailable` | The language you asked for has no track, and YouTube cannot auto-translate into it. |
| `blocked` / `network_error` | YouTube or the network refused 4 times in a row (the first try and 3 retries, each from a new IP). This is rare; run the video again. |

The **OUTPUT** record in the key-value store holds the run report. For each channel and playlist it shows how many videos were found and added, or why the listing failed, for example `not_found`. For each video it shows the status, attempts, requests and traffic.

### Limitations

- **Age-restricted and private videos do not work.** YouTube shows them only to signed-in users, and this Actor never logs in. They return `unavailable` and are not charged.
- **Private playlists, and the private or members-only videos of a channel, are not listed.** The OUTPUT report shows `not_found` for such a playlist.
- **Videos without subtitles return an error, free of charge.** The Actor reads the subtitles YouTube already has, manual or auto-generated. It does not transcribe audio itself.
- **`like_count` can be empty** when the channel hides likes. In the rare case where the extra lookup fails, the row says so in `warnings`.
- **Auto-generated subtitles** have no punctuation in some languages, and they contain whatever errors YouTube's speech recognition made.
- **Videos with several audio tracks** (dubbed videos): the video's language is taken from YouTube's default audio track, which can be a dub. Set `language` explicitly for such videos.
- **Default language choice favours manual subtitles.** A video that has only auto-generated subtitles in its spoken language, plus a manual translation, returns the manual translation. Set `language` to get the original.
- YouTube changes its internal interfaces from time to time. The Actor has a fallback route and retries, and a daily test run checks that it still works.

### FAQ

**Is it legal to scrape YouTube transcripts?** The Actor reads only public information that YouTube shows to any visitor without an account. You are responsible for how you use the data, including copyright and personal data rules in your jurisdiction.

**Can I get a whole channel or playlist?** Yes. Put it into `channels` or `playlists` and set `maxVideosPerSource` (up to 5,000). Collecting the list is free, and you pay only for the transcripts.

**Can I use it from my code or an AI agent?** Yes. Use the Apify API, the Python or JavaScript client, or the Apify MCP server.

# Actor input Schema

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

Video links or 11-character video IDs, up to 1,000 per run. Accepts watch, youtu.be, Shorts, embed and live links. Duplicates are skipped. Fill in videos, channels or playlists (any combination).

## `channels` (type: `array`):

Channel links or handles: @handle, youtube.com/@handle, /channel/UC..., /c/name or /user/name. The newest videos are taken first. Listing is free; you pay only for transcripts.

## `playlists` (type: `array`):

Playlist links (anything with list=PL...) or playlist IDs. Videos are taken in playlist order. Listing is free; you pay only for transcripts.

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

How many videos to take from each channel or playlist (newest first for channels).

## `includeShorts` (type: `boolean`):

Off: only the channel's Videos tab. On: all uploads, including Shorts and live-stream replays. Playlists are always taken as they are.

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

Language code such as en, ru, de or pt-BR. Leave empty for the video's own language: from YouTube's metadata first, manual subtitles preferred over auto-generated ones. If the video has no subtitles in this language, YouTube auto-translation is used when available.

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

How the transcript field is returned.

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

Residential proxy is recommended: every video and every retry gets a new IP. Without a proxy YouTube blocks quickly.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "channels": [],
  "playlists": [],
  "maxVideosPerSource": 50,
  "includeShorts": false,
  "outputFormat": "json",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

## `report` (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=jNQXAC9IVRw"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

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

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

```

## MCP server setup

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

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/I6rgmteaYMPe1Xxw9/builds/XvtzthxbIUj3UGdX7/openapi.json
