# YouTube Transcript Scraper (`getdataforu/youtube-transcript-scraper`) Actor

Full transcripts of any list of YouTube videos and Shorts - human-written or auto-generated captions in any language the video has, as clean text, timestamped text and timed segments. Ready for ChatGPT, RAG and content research. No API key.

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

## Pricing

from $0.70 / 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

## YouTube Transcript Scraper

Paste a list of YouTube video or Shorts links. Get back the **full transcript** of every one — as clean text, timestamped lines and timed segments — in the video's original language or the language you choose.

No YouTube API key, no Google account, no quota.

### What it's for

- **AI and LLM workflows** — feed transcripts to ChatGPT, Claude or your RAG pipeline to summarise, answer questions or write show notes.
- **Content research** — find what top creators in your niche actually say, and how often they mention a product or keyword.
- **Repurposing** — turn videos into blog posts, newsletters, social threads and quotes.
- **Subtitles and accessibility** — timed segments with start time and duration for every caption line.
- **Monitoring** — check what was said about your brand in reviews, interviews and news coverage.

### What you get for each video

| | |
|---|---|
| **Transcript** | Full text, word count, character count; optional `[01:05]` timestamped lines |
| **Segments** | Every caption line with start time and duration in seconds |
| **Language** | Language code and name, human-written or auto-generated, whether it is the video's original language |
| **All languages** | Every caption track the video offers, so you know what else is available |
| **Video** | Title, channel, channel ID, length, exact view count |

Real results from a test run of 42 videos:

| Channel | Language | Words | Length |
|---|---|---|---|
| Veritasium | English (original) | 8,346 | 47 min |
| MrBeast | English (original) | 17,462 | 58 min |
| BBC News | English (auto-generated) | 6,289 | 32 min |
| officialpsy | Korean (auto-generated) | 194 | 4 min |

### Picks the right language for you

Big channels add a dozen translated caption tracks to every video. This actor knows which one is the **original** and returns that by default — not whichever language happens to come first in the list. Want another language? Set `languages` to your preferences in order, for example `["es", "en"]`; `en` also matches `en-US` and `en-GB`. Human-written captions always beat auto-generated ones in the same language.

### Input

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/IwZVXmQdX1E",
    "https://www.youtube.com/shorts/-62C9R_41Sc"
  ],
  "languages": ["en"],
  "includeSegments": true,
  "includeTimestampedText": false
}
```

| Field | Default | Notes |
|---|---|---|
| `videoUrls` | — | **Required.** Watch pages, youtu.be links, Shorts, live streams, embeds or bare video IDs. Duplicates are removed. |
| `languages` | original | Preferred language codes, in order. |
| `fallbackToAnyLanguage` | `true` | When none of your languages exist, return the original transcript instead of skipping the video. |
| `includeAutoGenerated` | `true` | Accept YouTube's automatic captions when no human-written ones exist. |
| `includeSegments` | `true` | Add timed segments. |
| `includeTimestampedText` | `false` | Add `[mm:ss] text` lines. |
| `maxConcurrency` | `5` | Videos fetched in parallel. |

### Speed

Measured: **42 videos from 8 channels in under a minute**, every one with a transcript, including hour-long videos with 17,000+ words.

### You only pay for transcripts you get

Videos without captions, private, deleted or mistyped links are never written to the dataset, so they are never charged. They are listed with the reason in `RUN_SUMMARY`.

### Limitations

- **Only languages the video has.** YouTube does not let logged-out visitors use its machine translation, so a video with English captions only cannot be returned in Spanish. `availableLanguages` shows exactly what exists.
- Videos with captions turned off, age-restricted and members-only videos have no transcript available and are reported as failed.
- Live streams in progress have no transcript until YouTube processes them.

### Legal

Reads only what YouTube shows any visitor without logging in. You are responsible for how you use the data, including the creators' copyright in what they say.

# Actor input Schema

## `videoUrls` (type: `array`):

YouTube links of any kind - watch pages, youtu.be short links, Shorts, live streams, embeds - or bare 11-character video IDs, one per line. Duplicates are removed automatically.

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

Language codes in order of preference, such as en, es, de, pt, ja. "en" also matches en-US and en-GB. Leave empty to get each video's original transcript.

## `fallbackToAnyLanguage` (type: `boolean`):

When a video has none of your preferred languages, return its original transcript instead of skipping it. Each record says whether the language matched.

## `includeAutoGenerated` (type: `boolean`):

Most videos only have YouTube's automatic captions. Human-written captions are always preferred when both exist. Turn off to accept human-written captions only.

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

Add every caption line with its start time and duration in seconds - for subtitles, clipping and search.

## `includeTimestampedText` (type: `boolean`):

Add the transcript as readable lines like "\[01:05] text" - handy for notes and summaries that link back to the moment.

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

Each video is fetched through its own proxy IP.

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

Residential proxies are required: YouTube shows server IPs a bot check instead of the caption list.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/IwZVXmQdX1E",
    "https://www.youtube.com/shorts/-62C9R_41Sc"
  ],
  "languages": [
    "en",
    "es"
  ],
  "fallbackToAnyLanguage": true,
  "includeAutoGenerated": true,
  "includeSegments": true,
  "includeTimestampedText": false,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Full transcript text, timed segments, language, word count and video details for every video that has captions.

## `runSummary` (type: `string`):

How many transcripts were saved, in which languages, and which videos had none, with the reason.

# 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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://youtu.be/IwZVXmQdX1E"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("getdataforu/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 = { "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://youtu.be/IwZVXmQdX1E",
    ] }

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

```

## MCP server setup

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