# YouTube Transcript & Subtitle Extractor (Batch, Multi-language) (`gochujang/youtube-transcript-extractor`) Actor

Extract full transcripts and subtitles from YouTube videos. Supports batch URLs, auto-generated captions, 50+ languages, and timestamped output. Perfect for LLM ingestion, RAG pipelines, and content analysis. $0.01/video.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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 & Subtitle Extractor

> Extract **full transcripts and subtitles** from YouTube videos — batch up to 100 URLs, auto-generated captions, 50+ languages, timestamped output. Perfect for **LLM ingestion, RAG pipelines, and content analysis**. **$0.01/video.**

### ⚡ Run in 30 seconds

Paste any YouTube URL and click **Start**:

```
https://www.youtube.com/watch?v=dQw4w9WgXcQ
https://youtu.be/jNQXAC9IVRw
dQw4w9WgXcQ
```

Outputs a clean transcript ready to paste into ChatGPT, Claude, or your RAG vector store.

***

### Use cases

- **LLM context**: Feed YouTube lectures, tutorials, or talks directly into Claude/GPT
- **RAG pipelines**: Chunk and embed YouTube content for semantic search
- **Content repurposing**: Turn video scripts into blog posts or summaries
- **Research**: Batch-extract transcripts from playlists or conference talks
- **Subtitles**: Download subtitles in any available language

***

### Output formats

| Format | Description |
|--------|-------------|
| `full_text` | Single string — ideal for LLM prompts |
| `timestamped` | `[0:12] text per line` — ideal for navigation |
| `segments` | Array of `{start, duration, text}` — ideal for chunking |

***

### Output fields

```json
{
  "video_id": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "language": "en",
  "available_languages": ["en", "de", "ja", "pt-BR"],
  "segment_count": 61,
  "word_count": 312,
  "char_count": 1847,
  "duration_secs": 212,
  "transcript": "We're no strangers to love...",
  "fetched_at": "2026-08-07T09:47:46Z"
}
```

***

### Input options

| Field | Default | Description |
|-------|---------|-------------|
| `videoUrls` | — | YouTube URLs or video IDs (up to 100) |
| `languages` | `["en"]` | Preferred languages (fallback order) |
| `outputFormat` | `full_text` | `full_text`, `timestamped`, or `segments` |
| `useApifyProxy` | `false` | Enable if YouTube blocks requests (residential proxy) |

***

### Pricing

- **$0.001** flat per run start
- **$0.01** per successfully transcribed video

Example: 10 videos = **$0.101**

***

### Notes

- Works with auto-generated captions and manual subtitles
- Batch concurrency is limited to 5 concurrent requests to avoid rate limiting
- If you receive `IpBlocked` errors, enable `useApifyProxy` in the input
- Does not support age-restricted or private videos

# Actor input Schema

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

List of YouTube URLs or video IDs. Supports full URLs (youtube.com/watch?v=..., youtu.be/...) and bare video IDs.

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

Language codes in order of preference (e.g. \['en', 'en-US']). Falls back to next if not found.

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

full\_text: single string. timestamped: \[0:12] text per line. segments: array of {start, duration, text} objects.

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

Only applies to full\_text format — prepend \[M:SS] to each line.

## `useApifyProxy` (type: `boolean`):

Enable if YouTube blocks requests from Apify's cloud IP. Residential proxy adds ~$0.01-0.05 per run in proxy cost.

## `proxyUrl` (type: `string`):

HTTP/HTTPS proxy URL (e.g. http://user:pass@host:port). Leave empty to use Apify proxy or no proxy.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "outputFormat": "full_text",
  "includeTimestamps": false,
  "useApifyProxy": false
}
```

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/youtube-transcript-extractor").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"] }

# Run the Actor and wait for it to finish
run = client.actor("gochujang/youtube-transcript-extractor").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"
  ]
}' |
apify call gochujang/youtube-transcript-extractor --silent --output-dataset

```

## MCP server setup

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

```

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/9sJr9yRbE6WP6CtWC/builds/jCztzAaGWemnDm3fm/openapi.json
