# YouTube Transcript Scraper (`ai-data-tools/youtube-transcripts`) Actor

Get transcripts and captions from YouTube videos, Shorts, whole playlists and channels. Pick languages, translate, and export as text, timestamped segments or SRT. Videos without captions are free.

- **URL**: https://apify.com/ai-data-tools/youtube-transcripts.md
- **Developed by:** [AI Data Tools](https://apify.com/ai-data-tools) (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 $3.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.

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

## 🎬 YouTube Transcript Scraper

Get the transcript of any YouTube video, Short or livestream replay, or of **a whole playlist or channel** in one run. Choose your languages, prefer human-made captions over auto-generated ones, and get the result as **full text**, **timestamped segments** or an **SRT subtitle file**. It's ready for LLMs, RAG pipelines, content research and subtitles.

🛡️ **Reliable and fair.** Runs on residential IPs and retries automatically after network errors. If YouTube refuses a request (rate limit or bot check), the video is marked `BLOCKED` and you aren't charged. We don't try to get around YouTube's limits.

💸 **You only pay for transcripts.** Videos without captions, deleted videos and failed lookups are listed with a status so you can see what was skipped, and they're free.

### ✨ What you can use it for

- 🤖 **AI and LLM workflows:** feed transcripts into summaries, RAG, chatbots or fine-tuning.
- 🔎 **Content and market research:** analyze what whole channels talk about.
- ✍️ **Repurposing:** turn videos into blog posts, newsletters or social posts.
- 🗂️ **Subtitles and accessibility:** export SRT files with correct timing.

### 📥 Input

| Field | What it does |
|---|---|
| YouTube URLs or video IDs | Videos, Shorts, playlists or channels. Add `/shorts` or `/streams` to a channel URL for those tabs. |
| Max videos per playlist or channel | How many videos to take from each playlist or channel (newest first for channels). |
| Preferred languages | e.g. `en`, `de`, `es`, in order. `en` also matches `en-US` and `en-GB`. |
| Prefer human-made captions | Use uploader captions before auto-generated ones. |
| Fall back to any language | If none of your languages exist, return whatever is available. |
| Output | Full text, timestamped segments, SRT, and optionally the description and tags. |

Example:

```json
{
    "urls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://www.youtube.com/@veritasium",
        "https://www.youtube.com/playlist?list=PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI"
    ],
    "maxVideosPerSource": 20,
    "languages": ["en"]
}
```

### 📤 Output

One result per video. Shortened example:

```json
{
    "videoId": "dQw4w9WgXcQ",
    "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "status": "OK",
    "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
    "channelName": "Rick Astley",
    "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
    "durationSeconds": 213,
    "viewCount": 1830494717,
    "language": { "code": "en", "name": "English", "isAutoGenerated": false },
    "availableLanguages": [
        { "code": "en", "name": "English", "isAutoGenerated": false },
        { "code": "en", "name": "English (auto-generated)", "isAutoGenerated": true },
        { "code": "de-DE", "name": "German (Germany)", "isAutoGenerated": false }
    ],
    "text": "[♪♪♪] ♪ We're no strangers to love ♪ ♪ You know the rules and so do I ♪ ...",
    "segments": [
        { "start": 18.64, "duration": 3.24, "text": "♪ We're no strangers to love ♪" },
        { "start": 22.64, "duration": 4.32, "text": "♪ You know the rules and so do I ♪" }
    ],
    "wordCount": 487,
    "scrapedAt": "2026-10-25T21:30:00.000Z"
}
```

Videos without a transcript come back like this (not charged):

```json
{ "videoId": "aaaaaaaaaaa", "status": "VIDEO_UNAVAILABLE", "error": "This video is unavailable" }
```

Possible statuses: `OK`, `NO_TRANSCRIPT`, `VIDEO_UNAVAILABLE`, `AGE_RESTRICTED`, `LOGIN_REQUIRED`, `BLOCKED` (YouTube refused the request; try again later), `FAILED` (network error).

### 💰 Pricing

**$0.003 per transcript** ($3 per 1,000). Listing playlists and channels is free, and so is every video that comes back without a transcript. Runs stop on their own at the spending limit you set.

### ❓ FAQ

**Does it work for videos without captions?** No. It returns the captions YouTube has, either uploaded by the creator or auto-generated. Videos with neither come back as `NO_TRANSCRIPT` and are free.

**Can I get transcripts of a whole channel?** Yes. Paste the channel URL (e.g. `https://www.youtube.com/@mkbhd`) and set how many videos to take. Use `/shorts` or `/streams` for those tabs.

**Can I call it from my code or an AI agent?** Yes, through the Apify API, the Apify MCP server, or integrations like Make, n8n and Zapier.

**Is it legal?** It reads publicly available captions. Transcripts can be copyrighted by the video's creator, so check that your use (e.g. research, analysis or quotes) complies with the laws and terms that apply to you.

🐞 Missing a feature, or found a video that doesn't work? Open an issue on the **Issues** tab and include the video URL.

# Actor input Schema

## `urls` (type: `array`):

Videos, Shorts, playlists or channels, e.g. https://www.youtube.com/@mkbhd (add /shorts or /streams for those tabs). Playlists and channels are expanded into their videos.

## `maxVideosPerSource` (type: `integer`):

How many videos to take from each playlist or channel. Channels are read newest first.

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

Language codes in order of preference, e.g. en, de, es. "en" also matches en-US and en-GB.

## `preferManualCaptions` (type: `boolean`):

Use captions written by the uploader before YouTube's auto-generated ones when both exist.

## `fallbackToAnyLanguage` (type: `boolean`):

If none of the preferred languages exist, return the video's captions in whatever language is available. Turn off to skip such videos.

## `includeText` (type: `boolean`):

The whole transcript as one string.

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

Each caption line with its start time and duration in seconds.

## `includeSrt` (type: `boolean`):

The transcript as an SRT subtitle file (string).

## `includeDescription` (type: `boolean`):

Also return the video's description and keywords.

## `maxConcurrency` (type: `integer`):

How many videos are processed in parallel.

## `maxRetries` (type: `integer`):

Retries when a request fails because of a network problem. Videos that YouTube refuses are not retried; they're marked BLOCKED and not charged.

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

Residential proxies are recommended; YouTube refuses most transcript requests from datacenter IPs.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxVideosPerSource": 50,
  "languages": [
    "en"
  ],
  "preferManualCaptions": true,
  "fallbackToAnyLanguage": true,
  "includeText": true,
  "includeSegments": true,
  "includeSrt": false,
  "includeDescription": false,
  "maxConcurrency": 10,
  "maxRetries": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

// Run the Actor and wait for it to finish
const run = await client.actor("ai-data-tools/youtube-transcripts").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 = { "urls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"] }

# Run the Actor and wait for it to finish
run = client.actor("ai-data-tools/youtube-transcripts").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 '{
  "urls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ]
}' |
apify call ai-data-tools/youtube-transcripts --silent --output-dataset

```

## MCP server setup

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

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/vOxYYRZYapVXLK8zO/builds/sdXu4N0daciaGLMWK/openapi.json
