# YouTube Transcript Scraper – Captions & Subtitles to Text (`maged120/youtube-transcript-scraper`) Actor

YouTube transcript scraper: the full captions of any video or Short as plain text plus timed segments, with title, channel and language. Many videos per run, any caption language. Export to CSV, JSON, Excel or API.

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

## Pricing

from $5.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.
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 full transcript (captions) of any YouTube video or Short: the whole text in one field, plus every caption line with its start time and duration. Each row also has the video's title, channel, language, word count and whether the captions were made by hand or auto-generated. Paste one video or a thousand.

It runs on the [Apify platform](https://apify.com), so you can schedule it, call it from the API, or connect it to Make, Zapier, n8n, Google Sheets and AI tools.

### Why use it?

- **Ready for AI:** feed whole transcripts to ChatGPT, Claude or your RAG pipeline for summaries, Q\&A and search.
- **Content work:** turn videos into blog posts, show notes, quotes and clips (the segments have timestamps).
- **Research:** analyse what creators and competitors say, across many videos at once.
- **Any language:** list the caption languages you want, in order of preference.
- **Clean, flat rows:** one row per video, ready for CSV, Excel, JSON or the API.

### How to use it

1. Paste YouTube links (watch, youtu.be or Shorts) or video IDs into **Videos**.
2. Optionally set **Preferred languages** (for example `en`, `es`).
3. Click **Start**. Transcripts appear in the Output tab.
4. Download them as CSV, JSON or Excel, or read them through the API.

### Input

```json
{
    "video_urls": [
        "https://www.youtube.com/watch?v=X8ipUgXH6jw",
        "https://youtu.be/dQw4w9WgXcQ"
    ],
    "transcript_languages": ["en"],
    "include_segments": true
}
```

| Field | What it does |
|---|---|
| `video_urls` | Video or Shorts links, or bare video IDs. Up to 1,000 per run; duplicates are removed. |
| `transcript_languages` | Caption languages to try, in order. Hand-made captions win over auto-generated ones. Empty = each video's own captions. |
| `include_segments` | Add every caption line with its start time and duration (on by default). |
| `video_url` | A single video. Kept for older integrations. |

### Output

```json
{
    "video_id": "X8ipUgXH6jw",
    "video_url": "https://www.youtube.com/watch?v=X8ipUgXH6jw",
    "title": "React Native vs Flutter - I built the same chat app with both",
    "channel": "Fireship",
    "channel_url": "https://www.youtube.com/@Fireship",
    "thumbnail": "https://i.ytimg.com/vi/X8ipUgXH6jw/hqdefault.jpg",
    "language": "English (auto-generated)",
    "language_code": "en",
    "is_generated": true,
    "text": "if you're building a cross-platform mobile app ...",
    "word_count": 2230,
    "segments": [{"start": 0.16, "duration": 3.2, "text": "if you're building a cross-platform mobile app"}]
}
```

### How many results will I get?

One row per video that has captions. Videos with captions turned off, private or removed videos are listed in the run's status message and are not charged.

### FAQ

**Does it work for Shorts and live streams?**
Yes, as long as the video has captions.

**Can I get a translation?**
Pick the language you want in Preferred languages. If the video has captions in it, you get them; otherwise you get the video's own captions.

**Is this Actor maintained?**
Yes. Report bugs or feature requests in the Issues tab, or reach out on Discord: **maged03211**.

***

⭐ **Found this Actor useful?** A quick review on the Store helps other users find it and keeps it maintained.

### Related tools

- [YouTube Search Scraper – videos for any keyword with filters](https://apify.com/maged120/youtube-search)
- [YouTube Video Details, Transcript & Comments Scraper – metadata, tags, chapters and comments](https://apify.com/maged120/youtube-video-details)
- [YouTube Channel Scraper – every video of a channel with dates and stats](https://apify.com/maged120/youtube-channel-data)

# Actor input Schema

## `video_urls` (type: `array`):

YouTube video or Shorts links (youtube.com/watch?v=…, youtu.be/…, youtube.com/shorts/…) or bare video IDs. Up to 1,000 per run; duplicates are removed.

## `transcript_languages` (type: `array`):

Caption languages to try, in order, as codes (en, es, de, pt-BR…). Hand-made captions win over auto-generated ones. Leave empty to get each video's own captions.

## `include_segments` (type: `boolean`):

Add every caption line with its start time and duration (for subtitles, clips and quotes). Turn off if you only need the full text.

## `video_url` (type: `string`):

One video link or ID. Kept for older integrations; use Videos for one or many.

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

Used only if YouTube refuses a direct request. Leave the default for best reliability.

## Actor input object example

```json
{
  "video_urls": [
    "https://www.youtube.com/watch?v=X8ipUgXH6jw",
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/watch?v=rfscVS0vtbw"
  ],
  "include_segments": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "video_urls": [
        "https://www.youtube.com/watch?v=X8ipUgXH6jw",
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://www.youtube.com/watch?v=rfscVS0vtbw"
    ]
};

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

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

```

## MCP server setup

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