# Youtube Transcript (`data_xplorer/youtube-transcript`) Actor

🎬 EXTRACT YOUTUBE TRANSCRIPTS in seconds. Get timestamped captions in 40+ languages with auto-translation built in. Supports auto-generated subtitles, batch processing and three output formats: segments, full text or \[MM:SS]. Built for AI, LLMs and content teams.

- **URL**: https://apify.com/data\_xplorer/youtube-transcript.md
- **Developed by:** [Data Xplorer](https://apify.com/data_xplorer) (community)
- **Categories:** Social media, Videos, Integrations
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🎬 YouTube Transcript Scraper

Extract the **full transcript of any YouTube video** in seconds. No YouTube API key required, no browser automation, no manual copy-paste. Get word-level timestamps, auto-generated captions, and optional auto-translation into 40+ languages.

- 📝 **Full Transcript Extraction**: Scrape the complete YouTube video transcript with millisecond-precision timestamps
- 🌍 **40+ Languages**: Extract captions in any available language (English, French, Spanish, German, Japanese, Korean, Arabic, and more)
- 🔄 **Auto-Translation**: No English transcript? YouTube auto-translate kicks in automatically to convert any caption track into your target language
- ⏱️ **3 Output Formats**: Structured segments `{ start, duration, end, text }`, full plain text, or timestamped `[MM:SS]` text
- 🔗 **All YouTube URL Formats**: Works with `youtube.com/watch?v=`, `youtu.be/`, `youtube.com/shorts/`, and bare video IDs
- 🤖 **Auto-Generated Captions Supported**: Works on videos with manually uploaded subtitles *and* YouTube's auto-generated ASR captions
- ⚡ **No API Key Required**: Directly taps YouTube's internal InnerTube API with no quota limits and no Google Cloud setup
- 🛡️ **Resilient by Design**: Multi-client fallback (Android → iOS → TV), proxy rotation, and automatic retry on rate limits

> ℹ️ **Proxy note**: YouTube's transcript API blocks datacenter IPs. Use **Apify Residential Proxy** for reliable results. The proxy selector is pre-configured in the input form.

***

### 💎 Why Choose This YouTube Transcript Scraper?

Most YouTube transcript scrapers rely on fragile HTML parsing or third-party libraries that break every few weeks. This scraper uses **YouTube's own InnerTube API**, the same internal API the YouTube app uses, making it significantly more stable and capable.

| Feature | This Scraper | Generic scrapers |
|---|---|---|
| No API key required | ✅ | ✅ |
| Multi-client bot bypass | ✅ | ❌ |
| Auto-translate fallback | ✅ | ❌ |
| Millisecond timestamps | ✅ | ❌ |
| Proxy rotation per request | ✅ | ❌ |
| Batch processing | ✅ | Rarely |

***

### 🚀 How to Scrape YouTube Transcripts

#### 1. 🔗 Paste Your YouTube URLs

Add one or more YouTube video URLs. Supported formats:

- `https://www.youtube.com/watch?v=dQw4w9WgXcQ`
- `https://youtu.be/dQw4w9WgXcQ`
- `https://www.youtube.com/shorts/dQw4w9WgXcQ`
- Bare video ID: `dQw4w9WgXcQ`

#### 2. 🌍 Select Your Language

Pick the transcript language from the dropdown (40+ ISO 639-1 codes). If the requested language has no native caption track, the scraper automatically uses YouTube's built-in auto-translate to convert the closest available track.

#### 3. 📄 Choose Your Output Format

| Format | Output field | Best for |
|---|---|---|
| **Segments** *(default)* | `segments` array | AI pipelines, RAG, search indexing |
| **Full text** | `fullText` string | LLM prompts, summarization, translation |
| **Timestamps** | `fullText` string | Subtitles, video editing, karaoke |

#### 4. 🔒 Configure Your Proxy

Select **Apify Residential** in the proxy dropdown (pre-selected by default). YouTube's InnerTube API rejects datacenter IPs, so residential proxies are required for stable operation.

***

### ✨ What You'll Get

#### 📊 Output Data Structure

| Field | Type | Description |
|---|---|---|
| `videoId` | string | YouTube video ID |
| `videoUrl` | string | Full YouTube watch URL |
| `title` | string | Video title |
| `author` | string | Channel name |
| `channelId` | string | YouTube channel ID |
| `durationSeconds` | number | Total video duration in seconds |
| `language` | string | Language code of the returned transcript |
| `nativeLanguage` | string | Original caption track language |
| `isAutoTranslated` | boolean | `true` if YouTube auto-translated the transcript |
| `isAutoGenerated` | boolean | `true` if captions were auto-generated by YouTube (ASR) |
| `segmentCount` | number | Total number of transcript segments |
| `availableLanguages` | array | All available caption tracks for this video |
| `segments` | array | `[{ start, duration, end, text }]` with times in seconds (3 decimal places) |
| `fullText` | string | Full transcript as plain text or `[MM:SS]` timestamped text |

#### 📋 Output Example — Segments Format

```json
{
  "videoId": "dQw4w9WgXcQ",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video)",
  "author": "Rick Astley",
  "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "durationSeconds": 212,
  "language": "en",
  "nativeLanguage": "en",
  "isAutoTranslated": false,
  "isAutoGenerated": false,
  "segmentCount": 87,
  "availableLanguages": [
    { "code": "en", "name": "English", "isAutoGenerated": false }
  ],
  "segments": [
    { "start": "0.320", "duration": "4.080", "end": "4.400", "text": "We're no strangers to love" },
    { "start": "4.400", "duration": "3.920", "end": "8.320", "text": "You know the rules and so do I" }
  ]
}
```

#### 📋 Output Example — Full Text Format

```json
{
  "videoId": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video)",
  "language": "en",
  "segmentCount": 87,
  "fullText": "We're no strangers to love You know the rules and so do I..."
}
```

#### 📋 Output Example — Timestamps Format

```json
{
  "videoId": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video)",
  "language": "en",
  "segmentCount": 87,
  "fullText": "[00:00] We're no strangers to love\n[00:04] You know the rules and so do I\n[00:08] A full commitment's what I'm thinking of..."
}
```

***

### 📋 Quick Start

#### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `videoUrls` | array | | List of YouTube video URLs or video IDs |
| `preferredLanguage` | string | `"en"` | Language code from dropdown (ISO 639-1) |
| `customLanguageCode` | string | | Override the dropdown with any language code (e.g. `sw`, `eu`) |
| `outputFormat` | string | `"segments"` | `"segments"`, `"text"`, or `"timestamps"` |
| `proxyConfiguration` | object | Residential | Apify proxy settings (residential required) |

#### Input Example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/mFQ2wRDNdww"
  ],
  "preferredLanguage": "en",
  "outputFormat": "segments",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### 🔗 Integrations

Connect this YouTube transcript scraper to your AI workflows and automation tools:

- 🔄 **N8N** — [Apify + N8N Integration Guide](https://docs.apify.com/platform/integrations/n8n)
- ⚡ **Make (Integromat)** — [Apify + Make Integration Guide](https://docs.apify.com/platform/integrations/make)
- 🤖 **MCP (AI Agents)** — [Apify MCP Server](https://docs.apify.com/platform/integrations/mcp)
- 🧠 **OpenAI / Claude / Gemini**: Feed transcripts directly into LLM pipelines via the [Apify API](https://docs.apify.com/api/v2)
- 📊 **Google Sheets / Airtable**: Export via dataset webhooks or Zapier

***

### 🎯 Use Cases

#### 🤖 AI & LLM Applications

- Build **RAG (Retrieval-Augmented Generation)** systems from YouTube video content
- Feed transcripts into **ChatGPT, Claude, or Gemini** for summarization, Q\&A, or translation
- Create **podcast and video search engines** indexed by transcript content
- Train **fine-tuned models** on domain-specific YouTube content

#### 📚 Content Research

- **Repurpose video content** into blog posts, newsletters, or social media threads
- Extract **quotes and key insights** from interviews, lectures, and talks
- Monitor **competitor content** and what topics they cover in depth
- Research **SEO keywords** from high-ranking YouTube videos in your niche

#### 🎓 Education & Accessibility

- Generate **subtitles and closed captions** for your own content
- Create **study notes** from educational videos, MOOCs, and lectures
- Make video content **accessible** for deaf or hard-of-hearing audiences
- Translate educational content into **multiple languages** automatically

#### 📊 Data Analysis

- Analyze **speaking patterns** and vocabulary across channels
- Track **keyword frequency** in video transcripts over time
- Build **content classification models** from transcript data
- Compare how different creators cover the same topic

#### 🔍 Journalism & Research

- Verify **quotes and statements** made in video interviews
- Archive **public speeches, hearings, and press conferences**
- Cross-reference claims across multiple video sources
- Extract **structured data** from video earnings calls or conference talks

***

### 💡 Pro Tips

#### 🎯 For AI Pipelines

Use `outputFormat: "segments"` to get timestamped chunks ideal for **vector embedding** and semantic search. Each segment maps cleanly to a text chunk with its position in the video.

#### 📝 For LLM Summarization

Use `outputFormat: "text"` to get the full transcript as a single string, ready to drop into a prompt with no parsing required.

#### 🎬 For Subtitle Editing

Use `outputFormat: "timestamps"` to get `[MM:SS]` prefixed lines, easy to import into subtitle editors like Aegisub or review in a spreadsheet.

#### 🌍 For Non-English Videos

Set `preferredLanguage` to your target language. If the video doesn't have a native track in that language, the scraper will automatically request YouTube's **auto-translation** which covers 100+ languages. If translation is rate-limited, it gracefully falls back to the native language track.

#### ⚡ For Bulk Processing

Pass multiple URLs in a single run. The scraper processes them sequentially with independent proxy sessions per video.

***

### ❓ FAQ

#### How do I scrape a YouTube transcript without an API key?

This scraper uses YouTube's internal InnerTube API with no Google Cloud setup, no YouTube Data API key, and no quota limits. Just paste your video URLs and run.

#### Can I extract auto-generated captions from YouTube?

Yes. The scraper fully supports YouTube's **auto-generated (ASR) captions**, which are available on most videos even without manually uploaded subtitles. The `isAutoGenerated` field in the output tells you which type was used.

#### Can I get YouTube transcripts in multiple languages?

Yes. Select the target language from the 40-language dropdown, or enter any ISO 639-1 code in the custom field. If the video has a native track in that language, it's returned directly. If not, YouTube's **auto-translate** is used automatically.

#### Why do I need a residential proxy?

YouTube's transcript API blocks requests from datacenter IP ranges. Residential proxies route requests through real home IP addresses, which YouTube treats as legitimate user traffic. The Apify Residential proxy option is pre-selected in the input form.

#### What YouTube URL formats are supported?

All standard formats: `youtube.com/watch?v=`, `youtu.be/`, `youtube.com/shorts/`, `youtube.com/live/`, and bare 11-character video IDs.

#### What happens if a video has no transcript?

The scraper pushes an error entry to the dataset with the `videoId`, `videoUrl`, and an `error` message. Processing continues with the next video in the list.

#### Is this YouTube transcript scraper free to use?

The actor itself is free. You pay only for Apify compute units (CUs) consumed during the run, plus residential proxy bandwidth. A single video transcript typically costs a fraction of a cent.

***

### 🤝 Support

Need help or have a feature request? Open an issue on the actor page.

**❤️ Love this scraper?** Leave a review on the Apify Store, it helps others discover it!

***

*Built for AI engineers, content creators, researchers, and data teams who need reliable YouTube transcript extraction at scale.*

# Actor input Schema

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

List of YouTube video URLs or video IDs to extract transcripts from.

Supported formats:

- `https://www.youtube.com/watch?v=VIDEO_ID`
- `https://youtu.be/VIDEO_ID`
- `https://www.youtube.com/shorts/VIDEO_ID`
- Plain 11-character video ID (e.g. `dQw4w9WgXcQ`)

## `preferredLanguage` (type: `string`):

Language of the transcript to retrieve (ISO 639-1). If unavailable, the actor falls back to the first available track.

## `customLanguageCode` (type: `string`):

If your language is not in the list above, enter any ISO 639-1 code here (e.g. `sw`, `eu`, `lb`). **This field overrides the dropdown when filled.**

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

Choose how the transcript is returned:

- **Segments** *(default)* — structured array `[{ start, duration, end, text }]` with times in seconds
- **Full text** — one continuous plain-text string
- **Full text with timestamps** — line-by-line `[MM:SS] text`

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

⚠️ **Residential proxy required.** YouTube blocks datacenter IPs on its InnerTube API.

Recommended: enable **Apify Residential** proxy. Datacenter proxies will not work.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "preferredLanguage": "en",
  "outputFormat": "segments",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

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

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

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

```

## MCP server setup

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

```

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/aRP2XMa1gcwDjGy47/builds/QzG53rjk4Wg6T5lBR/openapi.json
