# YouTube Transcript Scraper | $2/1K | Text, SRT API (`beacondata/youtube-transcript-scraper`) Actor

Get YouTube video transcripts in bulk — clean text, timestamped segments, and SRT. No API key, no cookies. You only pay for delivered transcripts: videos with no captions, deleted or restricted videos are free.

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

## Pricing

$2.00 / 1,000 transcript delivereds

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

Download the transcript (subtitles / closed captions) of any YouTube video — in bulk, as clean text, timestamped segments, and SRT — **without a YouTube API key, without cookies, without a browser**.

**You only pay for transcripts that are actually delivered.** Videos with no captions, deleted videos, region-locked or restricted videos cost you nothing. The failure shows up in your dataset as a typed error so your pipeline can handle it, and the price of that failure is $0.

**$2 per 1,000 transcripts, and the first ~2,500 a month are effectively free:** Apify's free plan includes $5 of monthly credit, and Store Actor charges draw on it. Built for apps that hit YouTube's cloud-server block (`LOGIN_REQUIRED` / "Sign in to confirm you're not a bot"): the Actor rotates player clients and retries through residential IPs so your server doesn't have to.

### What you get for each video

| Field | Description |
|---|---|
| `text` | The full transcript as one clean string — ready for LLMs, embeddings, search indexing |
| `segments` | `[{ start, dur, text }]` — timestamped segments in seconds |
| `srt` | The same transcript as a ready-to-save `.srt` subtitle file |
| `title`, `channel` | Video metadata |
| `language` | The language of the returned track |
| `isAutoGenerated` | `true` when the track is YouTube's auto-generated one |
| `availableLanguages` | Every caption track the video offers, so you can re-run with a different `language` |

Videos that can't deliver a transcript return `{ videoId, url, error, errorType }` instead — `NO_CAPTIONS`, `NOT_FOUND`, `RESTRICTED`, `EMPTY_TRANSCRIPT` — and are **not charged**.

### Input

```json
{
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://youtu.be/dQw4w9WgXcQ",
        "https://www.youtube.com/shorts/abc123def45",
        "dQw4w9WgXcQ"
    ],
    "language": "en",
    "preferManual": true
}
```

- `videoUrls` — watch URLs, `youtu.be` links, Shorts, live, embed URLs, or bare 11-character video IDs. Duplicates are removed (and only counted once).
- `language` — preferred ISO code (`en`, `es`, `de`, `pt`, …). If the video doesn't have that language, the best available track is returned and `language` tells you which one you got.
- `preferManual` — human-made captions are usually higher quality than auto-generated ones; the actor prefers them by default and falls back to auto-generated.

### Why this one

- **Failures are free.** You pay per delivered transcript, not per attempt.
- **Resilient fetching.** Automatic retries with rotating sessions when YouTube throttles; typed errors when a video genuinely can't deliver.
- **All three formats in one run** — plain text for AI pipelines, timestamped segments for search/chapters, SRT for subtitle workflows.
- **No setup.** No YouTube Data API key, no OAuth, no cookies, no quota project.

### Use it from code

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

Works everywhere Apify does: REST API, scheduled runs, webhooks, the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) (so AI agents can call it as a tool), n8n, Make, Zapier, LangChain.

### Honest limitations

- Private, age-restricted, and members-only videos can't be read (`RESTRICTED` — free).
- A transcript can only exist if the video has captions on YouTube (`NO_CAPTIONS` — free).
- `language` selects among the tracks the video actually has; this actor does not machine-translate.

### Automate it with n8n

A ready-made workflow fetches a video's transcript, has GPT-4o-mini write an executive brief (TL;DR, timestamped key points, quotes), and emails it to you. In n8n: **Workflow → Import from URL**:

```
https://inmanjeffrey89-cell.github.io/data-tools/workflows/t4-youtube-ai-summary-gmail.json
```

No community nodes (plain HTTP Request) — works on n8n Cloud and self-hosted. [More ready-made workflows](https://inmanjeffrey89-cell.github.io/data-tools/n8n-workflows).

### Support

Found a bug or need a field added? Open an issue on the Issues tab — it's read daily and answered.

# Actor input Schema

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

The YouTube videos to transcribe. Accepts full watch URLs, youtu.be links, Shorts, live, and embed URLs, or bare 11-character video IDs — mix any of these. Duplicates are removed automatically and counted once. This is the only required field.

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

ISO code of the caption language you prefer, e.g. en, es, de, pt. If the video has that language it is returned; if not, the best available track is used and the output's 'language' field tells you which one you actually got. Default is en.

## `preferManual` (type: `boolean`):

When a video has both human-written and YouTube auto-generated captions, true returns the human one (usually more accurate). Set false only if you specifically want the auto-generated track. Default true.

## Actor input object example

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

# Actor output Schema

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

One item per video: videoId, title, channel, language, isAutoGenerated, availableLanguages, text, segments, srt. Failed videos carry error + errorType and are not charged.

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

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

```

## MCP server setup

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