# YouTube Transcript API - 100% Free, Unlimited Transcripts (`om_kh/youtube-transcript-api`) Actor

Completely free - no charge per transcript, ever. Clean timestamped transcripts from any YouTube video: watch links, youtu.be, Shorts, embeds or bare IDs. Reads YouTube's own first-party player endpoint - no API key, no cookies. Full text, per-line segments, language, word count.

- **URL**: https://apify.com/om\_kh/youtube-transcript-api.md
- **Developed by:** [omar khandji](https://apify.com/om_kh) (community)
- **Categories:** Social media, Videos, AI
- **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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 API — Subtitles & Captions in Any Language

> Paste YouTube links, get clean timestamped transcripts. No API key, no cookies, no proxies, nothing that expires.

### 100% free

**This Actor is free.** There is no charge per transcript and no charge per run
from us — you pay only Apify's own platform usage for the run, exactly as you
would for any Actor you wrote yourself.

It is free because it costs us nothing to operate: it reads YouTube's own
first-party endpoint, so there is no upstream scraper to pay for. No API key, no
cookies, nothing that expires.

Need whole channels or playlists in bulk? [YouTube Channel & Playlist
Transcripts](https://apify.com/om_kh/youtube-channel-transcripts) does that for
$0.001 per transcript.


### Why this one

Most transcript actors scrape the watch page, which means cookies, consent walls, and a scraper that breaks every time YouTube ships a redesign.

This Actor calls **YouTube's own player endpoint** — the same first-party API the mobile app uses — and then downloads the caption file YouTube itself serves. Three consequences:

1. **It doesn't break.** No HTML parsing, no anti-bot to fight.
2. **It's complete.** You get every caption language the video publishes, and **human-written subtitles are always preferred over auto-generated ones** when both exist.
3. **It's cheap.** There is no upstream scraper to pay for, so the price stays low.

### What you pass

Any mix of these works, in one list:

| Form | Example |
|---|---|
| Watch URL | `https://www.youtube.com/watch?v=aircAruvnKk` |
| Short link | `https://youtu.be/dQw4w9WgXcQ` |
| Shorts | `https://www.youtube.com/shorts/tPEE9ZwTmy0` |
| Embed | `https://www.youtube.com/embed/aircAruvnKk` |
| Bare ID | `aircAruvnKk` |

Duplicates are removed before anything is fetched, so you are never billed twice for the same video.

### Output

One row per video:

```json
{
  "video_id": "aircAruvnKk",
  "video_url": "https://www.youtube.com/watch?v=aircAruvnKk",
  "title": "But what is a neural network?",
  "channel": "3Blue1Brown",
  "language": "en",
  "is_generated": false,
  "duration_seconds": 1105.64,
  "segment_count": 286,
  "word_count": 3357,
  "text": "Full transcript as one clean string ...",
  "segments": [
    { "start": 12.4, "duration": 3.1, "text": "Let me start with a question." }
  ]
}
````

Set **Include timestamped segments** to off if you only want `text` — handy when you are feeding an LLM and paying per token.

### Languages

Leave **Preferred language** empty for English (falling back to the video's default), or pass `fr`, `es`, `de`, `pt`, `ja`... If the exact code is missing, the closest regional variant is used (`pt` matches `pt-BR`).

### Good to know

- **Hard cost cap.** Set `maxTotalChargeUsd` and the run can never bill above it.
- **A video without captions is never billed.** It is reported in `source_errors` with code `NO_TRANSCRIPT` and costs you nothing.
- **Agent-ready.** `RUN_SUMMARY.json` gives an LLM agent the counts and total word volume without re-reading the dataset.

### Typical uses

- Feed video content into a RAG index or a summarizer
- Build searchable archives of a channel or a conference playlist
- Translate or repurpose long-form video into articles and newsletters
- Analyse what competitors actually say in their videos

### Related scrapers

Same data, other sources — all with the same free tier, the same clean schema and the same pay-only-for-what-you-get billing:

| Actor |
|---|
| [YouTube Channel & Playlist Transcripts - Bulk Subtitles](https://apify.com/om_kh/youtube-channel-transcripts) |
| [YouTube Search Scraper - Videos, Views & Channels](https://apify.com/om_kh/vigia-youtube-search-monitor) |
| [YouTube Channel Videos Scraper - Views & Velocity](https://apify.com/om_kh/vigia-youtube-video-watch) |
| [Company Careers & ATS Jobs API - Workday, Greenhouse](https://apify.com/om_kh/vigia-clean-jobs-delta) |
| [Google Search Results Scraper - SERP Positions](https://apify.com/om_kh/vigia-serp-rank-delta) |
| [Google Maps Business Scraper - Places & Contacts](https://apify.com/om_kh/vigia-local-business-monitor) |

# Actor input Schema

## `videos` (type: `array`):

Video URLs or IDs. Accepts watch links, youtu.be links, Shorts, embeds and bare 11-character IDs.

## `language` (type: `string`):

Two-letter language code (en, fr, es, de...). Human-written captions are always preferred over auto-generated ones. Leave empty for English, then the video's default.

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

Keep the per-line segments with start time and duration. Turn off for a plain-text transcript only.

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

YouTube blocks datacenter IPs, so this Actor routes through a proxy. Leave the default (Apify Proxy) unless you have your own.

## `maxTotalChargeUsd` (type: `number`):

Hard maximum amount that this run may charge. The run stops before exceeding it.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://youtu.be/dQw4w9WgXcQ"
  ],
  "language": "",
  "includeSegments": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxTotalChargeUsd": 1
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("om_kh/youtube-transcript-api").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 = {
    "videos": [
        "https://www.youtube.com/watch?v=aircAruvnKk",
        "https://youtu.be/dQw4w9WgXcQ",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("om_kh/youtube-transcript-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videos": [
    "https://www.youtube.com/watch?v=aircAruvnKk",
    "https://youtu.be/dQw4w9WgXcQ"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call om_kh/youtube-transcript-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=om_kh/youtube-transcript-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "YouTube Transcript API - 100% Free, Unlimited Transcripts",
        "description": "Completely free - no charge per transcript, ever. Clean timestamped transcripts from any YouTube video: watch links, youtu.be, Shorts, embeds or bare IDs. Reads YouTube's own first-party player endpoint - no API key, no cookies. Full text, per-line segments, language, word count.",
        "version": "0.1",
        "x-build-id": "3S5ecvUTLCpvuciwH"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/om_kh~youtube-transcript-api/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-om_kh-youtube-transcript-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/om_kh~youtube-transcript-api/runs": {
            "post": {
                "operationId": "runs-sync-om_kh-youtube-transcript-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/om_kh~youtube-transcript-api/run-sync": {
            "post": {
                "operationId": "run-sync-om_kh-youtube-transcript-api",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "maxTotalChargeUsd"
                ],
                "properties": {
                    "videos": {
                        "title": "YouTube videos",
                        "type": "array",
                        "description": "Video URLs or IDs. Accepts watch links, youtu.be links, Shorts, embeds and bare 11-character IDs.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "language": {
                        "title": "Preferred language",
                        "type": "string",
                        "description": "Two-letter language code (en, fr, es, de...). Human-written captions are always preferred over auto-generated ones. Leave empty for English, then the video's default.",
                        "default": ""
                    },
                    "includeSegments": {
                        "title": "Include timestamped segments",
                        "type": "boolean",
                        "description": "Keep the per-line segments with start time and duration. Turn off for a plain-text transcript only.",
                        "default": true
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "YouTube blocks datacenter IPs, so this Actor routes through a proxy. Leave the default (Apify Proxy) unless you have your own.",
                        "default": {
                            "useApifyProxy": true
                        }
                    },
                    "maxTotalChargeUsd": {
                        "title": "Maximum charge (USD)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Hard maximum amount that this run may charge. The run stops before exceeding it.",
                        "default": 1
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
