# YouTube Transcript & Subtitles Scraper API for AI | $4.50/1k (`glasswing/youtube-transcript-scraper`) Actor

YouTube transcripts and subtitles as plain text or with timestamps: creator subtitles or auto captions, pick a language, single videos, whole channels and playlists. No API key, no login. Built for AI, RAG and content research. $4.50/1k.

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

## Pricing

from $3.60 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### What does YouTube Transcript Scraper do?

YouTube Transcript Scraper gets the **transcript of any public YouTube video** as clean text: the creator's own subtitles when they exist, otherwise YouTube's auto-generated captions. Paste video links or IDs, or a channel or playlist link, and get one row per video with the full `transcript`, its language, whether it is auto-generated, a word count and, if you want them, timestamped caption lines. It works as a **YouTube transcript API**: no YouTube API key, no Google account, no quota and no browser.

Use it to:

- feed **LLM pipelines and RAG**: summarise videos, answer questions over a channel's back catalogue, or build a searchable knowledge base;
- turn videos into **content**: blog posts, show notes, newsletters, social posts and SEO articles;
- do **research and monitoring**: what a competitor, analyst or channel said, searched as text;
- create **datasets** for NLP, translation and speech research from real spoken language;
- add **subtitles or quotes** to your own workflow with exact timestamps.

### Why use YouTube Transcript Scraper?

- **No API key, no quota.** YouTube's Data API does not hand out caption text for videos you do not own; this Actor needs no key at all.
- **Pick the language.** Ask for `en`, `es`, `de`, `pt-BR` or any other code. A creator-made track wins, then the auto-generated one; every row also lists all tracks the video has in `availableLanguages`.
- **Search by keyword.** Type a keyword and get the transcripts of the top 10, 50 or 500 videos YouTube finds for it, sorted by relevance, upload date or views, filtered by upload date and length. Each row says which keyword found it and at what rank.
- **Channels and playlists too.** Paste `@handle`, a channel URL or a playlist URL and get the latest videos' transcripts in one run.
- **Plain text, timestamps, SRT or VTT.** `transcript` is always one clean string; switch on `includeTimestamps` for every caption line with its start time and duration, or pick **Subtitle files** to get ready-to-upload `.srt` and `.vtt` text on every row at no extra cost.
- **Video metadata included.** Views, description, tags, thumbnail, length and channel come with every transcript, so you can filter and rank without a second scraper.
- **Honest, free "no captions" rows.** A video without captions, a private or a removed video returns one free `not_found` row that says why. You pay only for transcripts.
- **Built for scale.** Every request goes through a fresh residential IP, so large batches keep working. The default run of 5 videos finishes in under a minute.

### What data can YouTube Transcript Scraper extract?

| Field | Type | Description |
|---|---|---|
| `videoId` | string | The video's 11-character id. |
| `url` | string | The video's watch URL. |
| `title` | string | Video title. |
| `channelName` | string | Name of the channel that published the video. |
| `channelId` | string | Channel id (`UC...`). |
| `language` | string | Language code of the returned transcript, e.g. `en`. |
| `languageName` | string | Track name as YouTube shows it, e.g. `English (auto-generated)`. |
| `isAutoGenerated` | boolean | `true` for YouTube's automatic speech-recognition captions, `false` for creator-made subtitles. |
| `availableLanguages` | array | Every caption track of the video: `languageCode`, `name`, `isAutoGenerated`. |
| `transcript` | string | The full transcript as one plain-text string. |
| `wordCount` | integer | Words in the transcript. |
| `segmentCount` | integer | Caption lines in the transcript. |
| `segments` | array | With **Include timestamps**: `{ start, duration, text }` per caption line, in seconds. |
| `durationSeconds` | integer | Video length in seconds. |
| `viewCount` | integer | Views at the time of the run. |
| `description` | string | Video description (email addresses, phone numbers, social profile links and @handles are removed). |
| `keywords` | array | The creator's tags. |
| `thumbnailUrl` | string | Largest thumbnail image. |
| `isLiveContent` | boolean | `true` for live streams and their replays. |
| `srt` / `vtt` | string | With **Subtitle files**: the transcript as an SRT or WebVTT file. |
| `searchQuery`, `searchRank`, `publishedTimeText` | string, integer, string | For videos found by **Search keywords**: the keyword, the position in YouTube's results (1 = top) and the upload age as YouTube shows it (e.g. `2 years ago`). |

#### Result status (tri-state output)

| `status` | Meaning | Billed? |
|---|---|---|
| `ok` | One video's transcript. | Yes |
| `not_found` | The video has no captions, or YouTube does not show it to logged-out visitors (private, removed, age-restricted), or a keyword found no videos. `error` says which; the video's metadata is still included. | No |
| `error` | The video could not be read after several retries, or an input line was not a YouTube link. `error` says why. | No |

### How to scrape YouTube transcripts with YouTube Transcript Scraper

1. Open the Actor in Apify Console and go to the **Input** tab.
2. Paste **YouTube video URLs or IDs** (watch links, youtu.be links, Shorts, live links or bare 11-character IDs), channel and playlist links, or type **Search keywords**.
3. Set the **Preferred language**, switch on **Include timestamps** or pick **Subtitle files** if you need them, and choose **Videos per keyword** or **Videos per channel or playlist**.
4. Click **Start**. The default input (5 videos) finishes in under a minute.
5. Download the transcripts as JSON, CSV, Excel or HTML, or read them through the API.

Need richer filters (likes, exact upload dates, comments)? List the videos with [YouTube Scraper](https://apify.com/glasswing/youtube-scraper) and pass their URLs here.

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

The Actor uses pay-per-event pricing: you pay for the transcripts you get, Apify platform usage and residential proxy traffic are included.

| Event | Price |
|---|---|
| Actor start | $0.005 per run |
| Result (`status: ok` row: one video's transcript) | $0.0045 per transcript ($4.50 per 1,000) |

Example: 1,000 transcripts cost about $4.51 ($4.50 plus the $0.005 start fee). Long videos cost the same as short ones, and searching, metadata and SRT/VTT files cost nothing extra. Rows with `status` `not_found` or `error` are never billed. You can cap spending per run with **Maximum results** and in the run's **Max total charge** option.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `startUrls` | array of strings | five sample videos | Video URLs or IDs; channel URLs, `@handles` or `UC...` ids; playlist URLs or ids; YouTube search URLs. One per line. Left at the example, it is skipped when you give `searchQueries`. |
| `searchQueries` | array of strings | none | Keywords; the top videos YouTube finds for each are transcribed. |
| `maxVideosPerSearch` | integer | 10 | Top search results taken per keyword (1 to 500). |
| `searchSort` | string | `relevance` | `relevance`, `date` (upload date), `views` or `rating`. |
| `uploadDate` | string | `any` | `any`, `hour`, `today`, `week`, `month` or `year`. |
| `videoDuration` | string | `any` | `any`, `short` (under 4 min), `medium` (4-20 min) or `long` (over 20 min). |
| `subtitleFormats` | array of strings | none | `srt` and/or `vtt`: add the transcript as subtitle files. |
| `language` | string | `en` | Preferred transcript language code. Falls back to YouTube's default track when the video has no track in this language. |
| `includeTimestamps` | boolean | false | Add the `segments` array (start, duration, text per caption line). |
| `maxVideosPerSource` | integer | 10 | Latest videos taken from each channel or playlist link (1 to 100). |
| `maxItems` | integer | 20 | Total rows; each `ok` row is one billable transcript. |

Example input (the prefill):

```json
{
    "startUrls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://www.youtube.com/watch?v=RcGyVTAoXEU",
        "https://www.youtube.com/watch?v=0NY2gAftzJE",
        "https://www.youtube.com/watch?v=kJQP7kiw5Fk"
    ],
    "language": "en",
    "maxItems": 20
}
```

The latest 25 videos of a channel in Spanish where available, with timestamps:

```json
{
    "startUrls": ["@TED"],
    "language": "es",
    "includeTimestamps": true,
    "maxVideosPerSource": 25,
    "maxItems": 25
}
```

The transcripts of the 50 most-viewed long videos about a topic from this year, with SRT files:

```json
{
    "searchQueries": ["kubernetes tutorial"],
    "maxVideosPerSearch": 50,
    "searchSort": "views",
    "uploadDate": "year",
    "videoDuration": "long",
    "subtitleFormats": ["srt"],
    "maxItems": 50
}
```

### Output

A real row from the default run (transcript and track list shortened):

```json
{
    "url": "https://www.youtube.com/watch?v=RcGyVTAoXEU",
    "status": "ok",
    "scrapedAt": "2026-10-19T07:07:27.425Z",
    "videoId": "RcGyVTAoXEU",
    "title": "How to Make Stress Your Friend | Kelly McGonigal | TED",
    "channelName": "TED",
    "channelId": "UCAuUUnT6oDeKwE6v1NGQxug",
    "durationSeconds": 869,
    "language": "en",
    "languageName": "English",
    "isAutoGenerated": false,
    "availableLanguages": [
        { "languageCode": "sq", "name": "Albanian", "isAutoGenerated": false },
        { "languageCode": "en", "name": "English", "isAutoGenerated": false },
        { "languageCode": "en", "name": "English (auto-generated)", "isAutoGenerated": true }
    ],
    "transcript": "I have a confession to make. But first, I want you to make a little confession to me. In the past year, I want you to just raise your hand if you've experienced relatively little stress ...",
    "wordCount": 2012,
    "segmentCount": 284
}
```

With **Include timestamps** on, each row also has a `segments` array (first line of video jNQXAC9IVRw shown):

```json
"segments": [
    { "start": 1.2, "duration": 2.16, "text": "All right, so here we are, in front of the elephants" }
]
```

Every row also carries the video's `viewCount`, `description`, `keywords`, `thumbnailUrl` and `isLiveContent`; rows found by a keyword search add `searchQuery`, `searchRank` and `publishedTimeText`. With **Subtitle files** set to SRT, `srt` holds the file:

```json
"srt": "1
00:00:01,200 --> 00:00:03,360
All right, so here we are, in front of the elephants

2
..."
```

A video without captions (free):

```json
{
    "url": "https://www.youtube.com/watch?v=oNTaHYXQ4MM",
    "status": "not_found",
    "error": "This video has no captions or subtitles (free row, not charged).",
    "videoId": "oNTaHYXQ4MM",
    "title": "Humans Can Regrow an Organ",
    "channelName": "Kurzgesagt – In a Nutshell",
    "durationSeconds": 74
}
```

### Tips

- **For LLMs:** `transcript` is a single clean string, ready to chunk and embed; `wordCount` helps you estimate tokens before you send it anywhere.
- **Creator subtitles first:** filter on `isAutoGenerated: false` when punctuation and spelling matter; auto-generated captions are lowercase-heavy and unpunctuated.
- **Multilingual channels:** check `availableLanguages` to see every track, then rerun with `language` set to the one you need.
- **Whole channels:** a channel link takes its newest uploads (videos, Shorts and live replays), up to 100 per link.
- **Research a topic:** search a keyword with `searchSort: views` and `videoDuration: long` to get the most-watched in-depth videos; `searchRank` keeps YouTube's order.
- **Subtitles for editing:** `srt` and `vtt` open directly in video editors and players; save the field's text as a `.srt` or `.vtt` file.

### Limitations

- Only captions that exist on YouTube are returned. Videos without any caption track (common for music, very new uploads and some Shorts) give a free `not_found` row; the Actor does not transcribe audio itself.
- No translation: you get the tracks the video has, not YouTube's machine-translated versions (YouTube refuses automated translation requests).
- Keyword search takes up to 500 videos per keyword, in YouTube's order for a logged-out visitor in the US. A video found by two keywords is transcribed (and billed) once.
- Channel and playlist links take up to 100 of the latest videos per link.
- Private, removed, members-only and age-restricted videos are not available to logged-out visitors and return a free `not_found` row.
- Results reflect what YouTube shows a logged-out visitor at the time of the run; if YouTube changes its data, rows come back as `error` and the Actor is updated quickly (report it in the **Issues** tab).

### FAQ

#### Do I need a YouTube API key or a Google account?

No. The Actor reads the same caption tracks the YouTube player loads for a logged-out visitor. There is no API key, no quota and nothing to sign in to.

#### Which transcript do I get when a video has several?

A creator-made track in your **Preferred language**, else the auto-generated track in that language, else YouTube's default track for the video (usually the spoken language). `language`, `languageName` and `isAutoGenerated` tell you what you got, and `availableLanguages` lists every track.

#### Does a 3-hour podcast cost more than a 1-minute Short?

No. Every transcript is one result at $0.0045, whatever its length.

#### Is it legal to scrape YouTube transcripts?

Scraping publicly available data is generally legal, but you are responsible for how you use the output. Transcripts are the creators' content and may be protected by copyright: use them for analysis, research, search and other purposes the law allows, and get permission before republishing them. Read the legal notice below and YouTube's terms of service.

#### Can I use this Actor from an AI agent or MCP client?

Yes. Call it through the Apify API or the Apify MCP server with a list of video URLs; every row has a fixed set of fields and a `status`, so an agent can tell "no captions" from "could not read".

#### Why did I get fewer rows than `maxItems`?

`maxItems` is a ceiling. You get fewer rows when you pass fewer videos, when a channel or playlist has fewer videos than **Videos per channel or playlist**, or when that setting times the number of links is below `maxItems`.

#### What if a field is missing?

Optional fields are omitted when YouTube does not provide them (for example `title` on a removed video). If a field that should always be present is missing, open an issue in the **Issues** tab with the run ID.

### Related Actors

- [YouTube Scraper](https://apify.com/glasswing/youtube-scraper) - search YouTube, list a channel's videos or a playlist with views, likes and durations, then get their transcripts here.
- [YouTube Comments Scraper](https://apify.com/glasswing/youtube-comments-scraper) - add what viewers said under the same videos.
- [Google Trends Scraper](https://apify.com/glasswing/google-trends-scraper) - check whether the topics in the transcripts are rising or fading.
- [Keyword Suggestions API](https://apify.com/glasswing/keyword-suggestions-scraper) - turn the themes you find into the searches people actually type.

### Legal and data-protection notice

This Actor extracts only data that YouTube publishes publicly to logged-out visitors; it does not extract private user data such as e-mail addresses, phone numbers, gender or precise location, and it does not log in or get around access controls. Transcripts are the creators' content and may be protected by copyright; spoken words can also mention people, so a transcript could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you are unsure whether your reason is legitimate, consult your lawyers. You are responsible for complying with YouTube's terms of service, copyright and applicable law when using the extracted data.

This Actor is an independent tool and is not affiliated with, endorsed by or sponsored by YouTube or Google. All trademarks belong to their respective owners.

# Changelog

This Actor's version history is a separate document: https://apify.com/glasswing/youtube-transcript-scraper/changelog.md

# Actor input Schema

## `startUrls` (type: `array`):

One per line: video URLs (watch, youtu.be, Shorts, live, embed) or bare 11-character video IDs; channel URLs, @handles or UC channel IDs (latest videos); playlist URLs or IDs; YouTube search result URLs (youtube.com/results?search_query=...). Leave the example in place and fill Search keywords to search instead.

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

Transcribe the top videos YouTube finds for each keyword (videos only, no channels or playlists). Each found video carries `searchQuery` and `searchRank`. Can be combined with Start URLs.

## `maxVideosPerSearch` (type: `integer`):

How many of the top search results to transcribe per keyword (up to 500). Videos without captions come back as free `not_found` rows and still count toward this number.

## `searchSort` (type: `string`):

Order of the search results, as on YouTube's own filter menu.

## `uploadDate` (type: `string`):

Only search results uploaded within this period.

## `videoDuration` (type: `string`):

Only search results of this length: short = under 4 minutes, medium = 4-20 minutes, long = over 20 minutes.

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

Language code of the transcript you want, e.g. en, es, de, pt-BR. A creator-made track in this language wins, then YouTube's auto-generated one. When the video has neither, you get YouTube's default track (usually the spoken language) and `language` shows which one it is. Translation is not offered.

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

Add a `segments` array to each row: every caption line with its start time and duration in seconds. The plain `transcript` text is always included.

## `subtitleFormats` (type: `array`):

Also return the transcript as ready-to-use subtitle files: `srt` (SubRip) and/or `vtt` (WebVTT), each as a text field on the row. Same price.

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

For channel and playlist links: how many of the latest videos to transcribe (up to 100 per link). Video links are always one video each.

## `maxItems` (type: `integer`):

Stop after this many rows. Each row with status `ok` (one video's transcript) is one billable result; videos without captions are free.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/watch?v=RcGyVTAoXEU",
    "https://www.youtube.com/watch?v=0NY2gAftzJE",
    "https://www.youtube.com/watch?v=kJQP7kiw5Fk"
  ],
  "maxVideosPerSearch": 10,
  "searchSort": "relevance",
  "uploadDate": "any",
  "videoDuration": "any",
  "language": "en",
  "includeTimestamps": false,
  "subtitleFormats": [],
  "maxVideosPerSource": 10,
  "maxItems": 20
}
```

# 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 = {
    "startUrls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://www.youtube.com/watch?v=RcGyVTAoXEU",
        "https://www.youtube.com/watch?v=0NY2gAftzJE",
        "https://www.youtube.com/watch?v=kJQP7kiw5Fk"
    ],
    "language": "en",
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("glasswing/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 = {
    "startUrls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://www.youtube.com/watch?v=RcGyVTAoXEU",
        "https://www.youtube.com/watch?v=0NY2gAftzJE",
        "https://www.youtube.com/watch?v=kJQP7kiw5Fk",
    ],
    "language": "en",
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("glasswing/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 '{
  "startUrls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/watch?v=RcGyVTAoXEU",
    "https://www.youtube.com/watch?v=0NY2gAftzJE",
    "https://www.youtube.com/watch?v=kJQP7kiw5Fk"
  ],
  "language": "en",
  "maxItems": 20
}' |
apify call glasswing/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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