# YouTube Video Transcript — Subtitles & Captions Extractor (`maged120/youtube-transcript`) Actor

Extract the full transcript/subtitles from any YouTube video. Returns timestamped text in your chosen language — ready for summarization, translation, or search indexing.

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

## Pricing

from $10.00 / 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?

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

### What does YouTube Video Transcript Extractor do?

**YouTube Video Transcript Extractor** downloads the full transcript (subtitles/captions) of any YouTube video and returns it as structured, timestamped text. Pass one or more YouTube video URLs or IDs and get back the complete spoken text — no manual downloading or YouTube Premium required.

This is the fastest way to extract video text for **LLM processing, summarization, search indexing, content repurposing, or research** at scale on the [Apify platform](https://apify.com).

### Why use YouTube Video Transcript Extractor?

- **Extract transcripts at scale** — batch hundreds of video URLs in one run
- **Timestamped output** — every line includes its start time and duration
- **Multi-language support** — retrieve transcripts in any language YouTube provides
- **No YouTube API quota** — bypass the YouTube Data API v3 daily limits
- **LLM-ready** — feed transcripts directly to GPT, Claude, or RAG pipelines
- **Content repurposing** — turn video content into blog posts, notes, or summaries

### How to use YouTube Video Transcript Extractor

1. Open the Actor and click **Try for free**
2. Add YouTube video URLs or IDs to the `videoUrls` input
3. Optionally specify a preferred language code (e.g., `en`, `es`, `fr`)
4. Click **Start** — transcripts appear in the Output tab within seconds
5. Download as JSON or CSV, or connect via REST API

### Input

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://www.youtube.com/watch?v=9bZkp7q19f0"
  ],
  "language": "en"
}
```

| Field | Type | Description | Default |
|---|---|---|---|
| `videoUrls` | array | YouTube video URLs or video IDs | required |
| `language` | string | Preferred transcript language code | `en` |

### Output

Each result contains the full transcript as an array of timestamped segments, plus a concatenated plain-text version.

```json
{
  "videoId": "dQw4w9WgXcQ",
  "videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "language": "en",
  "transcript": [
    { "text": "We're no strangers to love", "start": 18.4, "duration": 2.54 },
    { "text": "You know the rules and so do I", "start": 20.94, "duration": 2.58 }
  ],
  "fullText": "We're no strangers to love You know the rules and so do I..."
}
```

### Output fields

| Field | Type | Description |
|---|---|---|
| `videoId` | string | YouTube video ID |
| `videoUrl` | string | Original video URL |
| `language` | string | Language code of the returned transcript |
| `transcript` | array | Timestamped transcript segments |
| `transcript[].text` | string | Spoken text segment |
| `transcript[].start` | number | Start time in seconds |
| `transcript[].duration` | number | Segment duration in seconds |
| `fullText` | string | Complete transcript as plain text |

### Cost

Pay-per-result pricing:

| Volume | Estimated cost |
|---|---|
| 50 transcripts | ~$0.05–$0.25 |
| 500 transcripts | ~$0.50–$2.50 |
| 5,000 transcripts | ~$5–$25 |

Cost varies by video length.

### Tips

- Use the `fullText` field to feed directly into summarization or embedding pipelines
- If a video has auto-generated captions only, the transcript may contain punctuation errors — plan accordingly
- Combine with the **YouTube Search Scraper** to search for videos and then pull their transcripts in one pipeline
- For large batches, use the Apify API to trigger runs programmatically and poll for completion

### FAQ

**What if a video has no captions?**
The Actor returns an error for that video ID. Auto-generated captions are supported on most videos.

**Can I get transcripts in languages other than English?**
Yes — set the `language` field to any BCP-47 language code (e.g., `es`, `de`, `ar`).

**Does this require a YouTube account?**
No. Transcripts are accessed from YouTube's public caption API.

**Is this Actor maintained?**
Yes. Report bugs or feature requests in the Issues tab.

**Need help or have questions?**
Open an issue in the Issues tab or reach out on Discord: **maged03211**

# Actor input Schema

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

A full YouTube video URL (https://www.youtube.com/watch?v=...) or a video id.

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

Optional proxy settings for the Apify Console proxy editor. By default this Actor will request Apify Residential proxies.

## Actor input object example

```json
{
  "video_url": "https://www.youtube.com/watch?v=jjpjjcMeujM",
  "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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("maged120/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 = {}

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

```

## MCP server setup

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