# YouTube Transcript Scraper & Subtitles API (`automationnation/youtube-transcript-scraper`) Actor

Get the transcript of any YouTube video: full text and timestamped segments in any caption language or translated, plus title, channel, views and duration. Paste video, Shorts, channel or playlist URLs. Built for AI, RAG and research. $1.50 per 1,000 transcripts.

- **URL**: https://apify.com/automationnation/youtube-transcript-scraper.md
- **Developed by:** [Nathan Carter](https://apify.com/automationnation) (community)
- **Categories:** Videos, AI, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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 & Subtitles API

**YouTube Transcript Scraper is an Apify Actor that returns the transcript of any YouTube video: the full text, timestamped segments and the video's details, in any caption language or translated.** Paste video, Shorts, channel or playlist URLs and get one clean JSON row per video, ready for an LLM, a RAG index or analysis.

#### Quick facts

- **What you get, one row per video:**
  - the transcript as plain text, plus timestamped segments (start, duration, text)
  - language, whether it's auto-generated, and every caption language the video has
  - title, channel, views, duration, description, tags and thumbnail
- **Any language:** manual captions first, then auto-generated ones. **Translate to** asks for YouTube's machine translation, which YouTube rate-limits; when it refuses, you get the original language with a note.
- **Videos, Shorts, channels and playlists:** a channel or playlist URL adds its latest 15 videos.
- **Reliable:** it reads captions through YouTube's app endpoint, and retries on residential IPs when YouTube asks a server to sign in.
- **Price:** $1.50 per 1,000 transcripts (less on paid Apify plans). Videos without captions, private or removed videos are free. Apify's free $5 monthly credit covers about 3,300 transcripts.
- **AI agents:** connect `https://mcp.apify.com?tools=automationnation/youtube-transcript-scraper` (setup below).

### What can you do with YouTube transcripts?

- **AI and RAG:** index talks, courses and podcasts so an LLM can answer questions with sources and timestamps.
- **Content repurposing:** turn videos into blog posts, newsletters, show notes and social threads.
- **Research and analysis:** study what creators, competitors or experts say, across hundreds of videos.
- **SEO:** find the topics and phrases videos cover; pair with our [Google Videos Scraper](https://apify.com/automationnation/google-videos-scraper) to find the videos first.
- **Accessibility:** get captions in every language the creator uploaded.

### How to use it

1. Click **Try for free**.
2. Paste YouTube links into **Videos**: videos, Shorts, a channel (`https://www.youtube.com/@mkbhd`) or a playlist.
3. Choose the **Transcript language** (default English) and whether you want timestamped segments.
4. Click **Start**. Most videos take a second or two. Download JSON, CSV or Excel, or use the API.

#### Input example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=UF8uR6Z6KLc",
    "https://youtu.be/aircAruvnKk",
    "https://www.youtube.com/@lexfridman"
  ],
  "language": "en",
  "includeTimestamps": true,
  "maxVideosPerChannel": 5
}
```

#### Output example

```json
{
  "videoId": "UF8uR6Z6KLc",
  "url": "https://www.youtube.com/watch?v=UF8uR6Z6KLc",
  "title": "Steve Jobs' 2005 Stanford Commencement Address",
  "channel": "Stanford",
  "channelId": "UC-EnprmCZ3OXyAoG7vjVNCA",
  "viewCount": 49185798,
  "durationSeconds": 904,
  "duration": "15:04",
  "status": "ok",
  "transcriptLanguage": "en",
  "transcriptLanguageName": "English - English",
  "isAutoGenerated": false,
  "isTranslated": false,
  "transcript": "This program is brought to you by Stanford University. Please visit us at stanford.edu. Thank you. I am honored to be with you today…",
  "wordCount": 2295,
  "segments": [
    { "start": 6.05, "duration": 1.0, "text": "This program is brought to you by Stanford University." },
    { "start": 21.05, "duration": 1.03, "text": "Thank you." }
  ],
  "availableLanguages": [
    { "languageCode": "en", "languageName": "English (auto-generated)", "isAutoGenerated": true },
    { "languageCode": "en", "languageName": "English - English", "isAutoGenerated": false },
    { "languageCode": "es", "languageName": "Spanish - Spanish", "isAutoGenerated": false }
  ],
  "thumbnail": "https://i.ytimg.com/vi/UF8uR6Z6KLc/hqdefault.jpg",
  "scrapedAt": "2026-10-05T11:00:00.000Z"
}
```

#### Output fields

| Field | Description |
|---|---|
| `videoId`, `url`, `title` | The video |
| `channel`, `channelId`, `channelUrl` | Who published it |
| `viewCount`, `durationSeconds`, `duration`, `isLive` | Views and length |
| `status` | `ok`, `no_transcript`, `unavailable` or `failed`; only `ok` rows are charged |
| `transcript`, `wordCount` | Full transcript as plain text |
| `segments` | Caption lines with `start` and `duration` in seconds (switch off with **Timestamped segments**) |
| `transcriptLanguage`, `transcriptLanguageName`, `isAutoGenerated` | Which captions were used |
| `isTranslated`, `translatedFrom`, `translationNote` | Set when YouTube translated the transcript, or why it didn't |
| `availableLanguages` | Every caption track on the video |
| `description`, `keywords`, `thumbnail` | Video details |
| `error` | Why there's no transcript, when `status` isn't `ok` |

### How much does it cost?

| Transcripts | Free & Bronze plans | Silver | Gold and above |
|---|---|---|---|
| 1,000 | $1.50 | $1.35 | $1.20 |
| 10,000 | $15 | $13.50 | $12 |

Only transcripts returned are charged. Set a **maximum cost per run** in the run options; the Actor stops at your limit and keeps everything saved up to then.

### Use it with AI agents (MCP)

**Hosted:** add `https://mcp.apify.com?tools=automationnation/youtube-transcript-scraper` to Claude, ChatGPT, Cursor or another MCP client and sign in with Apify.

**Local (Claude Desktop or Cursor config):**

```json
{
  "mcpServers": {
    "youtube-transcripts": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server", "--tools", "automationnation/youtube-transcript-scraper"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}
```

Then ask, for example: "Summarise the last 5 videos on @lexfridman with the key quotes and timestamps."

### Integrations and API

```bash
curl -X POST "https://api.apify.com/v2/acts/automationnation~youtube-transcript-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videos":["https://www.youtube.com/watch?v=UF8uR6Z6KLc"],"includeTimestamps":false}'
```

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("automationnation/youtube-transcript-scraper").call(run_input={"videos": ["UF8uR6Z6KLc"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["wordCount"])
```

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automationnation/youtube-transcript-scraper').call({ videos: ['UF8uR6Z6KLc'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].transcript);
```

LangChain and LlamaIndex users can load the dataset straight into documents with Apify's integrations. Schedules, webhooks, Google Sheets, Slack, n8n, Make and Zapier work through Apify.

### FAQ

**Does it work for videos without manual subtitles?**
Yes. It uses YouTube's auto-generated captions when there are no manual ones (switch this off with **Allow auto-generated captions**).

**Can I get a transcript in another language?**
Set **Transcript language** to pick among the video's caption tracks. If the video doesn't have that language, the Actor asks YouTube for a machine translation; YouTube rate-limits these, so when it refuses you get the original language and a `translationNote`.

**What about videos with no captions at all?**
They come back with `status: no_transcript` and aren't charged. The Actor doesn't transcribe audio.

**Can I get every video of a channel?**
A channel or playlist URL adds its latest 15 videos. For more, paste the video URLs, for example from our [Google Videos Scraper](https://apify.com/automationnation/google-videos-scraper).

**Is it legal?**
Transcripts are public captions that YouTube shows to everyone. They can be copyrighted by the creator, so use them for analysis, research and accessibility, and respect creators' rights and YouTube's terms.

### More from AutomationNation

- **[Google Videos Scraper](https://apify.com/automationnation/google-videos-scraper)**: find videos on any topic across YouTube, TikTok and more.
- **[Google News Scraper](https://apify.com/automationnation/google-news-scraper)**: headlines, sources and article URLs.
- **[AI Visibility Tracker](https://apify.com/automationnation/ai-visibility-tracker)**: whether AI answers mention and cite your brand.
- **[Google Trends Scraper](https://apify.com/automationnation/google-trends-scraper)**: interest over time and trending searches.

Questions or a missing field? Open an issue on the **Issues** tab; fixes usually ship within a day.

# Changelog

This Actor's version history is a separate document: https://apify.com/automationnation/youtube-transcript-scraper/changelog.md

# Actor input Schema

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

YouTube video URLs or IDs, one per line. Shorts, youtu.be links, channel URLs (@handle or /channel/UC…) and playlist URLs work too; channels and playlists add their latest videos.

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

Preferred caption language code, e.g. en, es, de, fr, ja. Manual captions are used first, then auto-generated ones. If the video has neither, the Actor asks YouTube for a translation (best effort) and otherwise returns the original language.

## `translateTo` (type: `string`):

Optional: ask YouTube to machine-translate the transcript into this language code (e.g. en or es). YouTube rate-limits translation; when it refuses, the original language is returned with a note.

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

Add a segments list with start time, duration and text for each caption line.

## `includeAutoGenerated` (type: `boolean`):

Use YouTube's automatic captions when the video has no manual ones.

## `maxVideosPerChannel` (type: `integer`):

How many of the latest videos to take from each channel or playlist URL (up to 15).

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=UF8uR6Z6KLc"
  ],
  "language": "en",
  "includeTimestamps": true,
  "includeAutoGenerated": true,
  "maxVideosPerChannel": 15
}
```

# Actor output Schema

## `transcripts` (type: `string`):

One row per video with the transcript and video details.

## `allData` (type: `string`):

No description

## `summary` (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 = {
    "videos": [
        "https://www.youtube.com/watch?v=UF8uR6Z6KLc"
    ],
    "language": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("automationnation/youtube-transcript-scraper").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=UF8uR6Z6KLc"],
    "language": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("automationnation/youtube-transcript-scraper").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 '{
  "videos": [
    "https://www.youtube.com/watch?v=UF8uR6Z6KLc"
  ],
  "language": "en"
}' |
apify call automationnation/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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

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/4diCiQqj2Dm87rc45/builds/vsvWaLLK1Oh4zks3o/openapi.json
