# YouTube Transcripts & Captions Scraper (`devprathap/youtube-transcripts`) Actor

Get transcripts and captions from YouTube videos in their original language or the one you choose. Accepts lists, returns timestamped segments and full text, and charges only for transcripts returned.

- **URL**: https://apify.com/devprathap/youtube-transcripts.md
- **Developed by:** [PRATHAP K](https://apify.com/devprathap) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.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

### What does YouTube Transcript Scraper do?

**YouTube Transcript Scraper** gets the transcript, subtitles and captions of any public YouTube video, **in the
video's original language by default** or in the languages you choose. Paste a list of video links and get, for
each one:

- the **full transcript text**, ready for ChatGPT, Claude, summaries and RAG pipelines
- **timestamped segments** (start, duration, text)
- optional **SRT and VTT subtitle files**
- video details: title, channel, duration, **view count, description and keywords**

You are **charged only for transcripts actually returned.** Videos without captions, private or removed videos and
failed fetches are listed with the reason and cost nothing.

Use it from the Apify Console, the Apify API, on a schedule, from Make, n8n or Zapier, or let an AI agent call it
through the Apify MCP server.

### What can you use YouTube transcripts for?

- **AI and RAG:** feed lectures, podcasts and tutorials into a vector database or an LLM.
- **Summaries and notes:** turn long videos into articles, study notes or newsletter content.
- **SEO and content repurposing:** make blog posts, show notes and social posts from your own videos.
- **Research and analysis:** search what was said across hundreds of videos, track topics and brand mentions.
- **Subtitles:** download SRT or VTT files to translate, edit or re-upload.
- **Accessibility:** provide text versions of video content.

### Why this YouTube transcript scraper?

- **The right language.** Many transcript tools return whichever caption track comes first, so an English TED talk
  comes back in Arabic. This one returns the language the video was made in, or your languages in your order.
- **Honest results.** Every row has a `status`. If your language does not exist, the row says so instead of quietly
  returning a different one.
- **Built for lists.** Hundreds of links at once: watch, youtu.be, Shorts, live and embed links. Duplicates are
  fetched once.
- **Reliable.** Residential proxy by default and automatic retries, because YouTube blocks most cloud IPs.
- **Safe by default.** A default limit of 100 videos per run protects you from an accidentally huge bill.

### How to scrape YouTube transcripts

1. Paste video links or IDs into **Videos**.
2. Optionally list **Preferred languages** such as `en`, `es` or `hi`.
3. Optionally tick **Subtitle files** to also get SRT or VTT.
4. Click **Start**. Results appear in the **Output** tab; download them as JSON, CSV, Excel or HTML.

### Input

| Field | What it does |
| --- | --- |
| `videos` | YouTube URLs or 11-character video IDs. Required. |
| `languages` | Languages to try in order. Empty means each video's original language. |
| `fallbackToOriginal` | If none of your languages exist, return the original language (default) or nothing. |
| `includeAutoGenerated` | Allow YouTube's automatic captions when no human-made ones exist (default on). |
| `subtitleFormats` | Also return `srt` and/or `vtt` subtitle files. |
| `maxItems` | Stop after this many videos (default 100). |
| `proxyConfiguration` | Residential proxy by default. YouTube blocks most datacenter and cloud IPs. |

```json
{
  "videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],
  "languages": ["en"],
  "subtitleFormats": ["srt"]
}
```

### Output

```json
{
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "title": "Me at the zoo",
  "channel": "jawed",
  "channelId": "UC4QobU6STFB0P71PMvOGN5A",
  "durationSeconds": 19,
  "viewCount": 436657747,
  "description": "(the video's description)",
  "keywords": ["me at the zoo", "jawed karim", "first youtube video"],
  "status": "ok",
  "language": "en",
  "languageName": "English",
  "isAutoGenerated": false,
  "availableLanguages": [
    { "code": "en", "name": "English", "isAutoGenerated": false },
    { "code": "de", "name": "German", "isAutoGenerated": false }
  ],
  "segments": [{ "start": 1.2, "duration": 2.16, "text": "All right, so here we are, in front of the elephants" }],
  "text": "All right, so here we are, in front of the elephants ...",
  "srt": "1\n00:00:01,200 --> 00:00:03,360\nAll right, so here we are, in front of the elephants\n..."
}
```

`requestedLanguageFound` appears when you set **Preferred languages**. `srt` and `vtt` appear when you ask for them.

| `status` | Meaning | Charged |
| --- | --- | --- |
| `ok` | Transcript returned | Yes |
| `no_captions` | The video has no captions at all | No |
| `requested_language_unavailable` | None of your languages exist and fallback is off | No |
| `unavailable` | Private, removed or age-restricted video | No |
| `error` | Could not fetch after several attempts; `error` says why | No |

### How much does it cost to scrape YouTube transcripts?

You pay per transcript returned; the **Pricing** tab shows the current price per 1,000 transcripts. Videos without a
transcript are free, and Apify's free plan credit covers your first transcripts.

### Use it with the API, Python or JavaScript

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("devprathap/youtube-transcripts").call(run_input={
    "videos": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["status"], item.get("text", "")[:80])
```

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('devprathap/youtube-transcripts').call({
    videos: ['https://www.youtube.com/watch?v=jNQXAC9IVRw'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].text);
```

AI agents (Claude, Cursor, ChatGPT with MCP) can call it through the [Apify MCP server](https://mcp.apify.com).

### Tips

- Leave **Preferred languages** empty to get what the speaker actually said.
- Turn off **Include auto-generated captions** if you need human-made captions only.
- Keep the residential proxy. Datacenter IPs get YouTube's "confirm you're not a bot" wall.

### FAQ

**Does it download or transcribe audio?** No. It reads the captions YouTube already publishes, which is fast and
cheap. Videos without any captions return `no_captions`.

**Can I get transcripts in another language?** Yes: list the language codes in **Preferred languages**. If the video
has those captions, you get them; the row tells you whether your language was found.

**Can I get SRT subtitles?** Yes: tick **Subtitle files** and choose SRT and/or VTT.

**Is it legal to scrape YouTube transcripts?** It reads publicly available captions of public videos without logging
in. You are responsible for how you use the data, including copyright and YouTube's terms, and for any personal data
you process.

**Something broke?** Open an issue in the **Issues** tab with the run ID. Issues are answered within a day.

# Actor input Schema

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

YouTube video URLs or 11-character video IDs. Accepts watch, youtu.be, Shorts, live and embed links. Duplicates are fetched once.

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

Caption languages to try in order, as codes such as en, es or hi. A human-made track beats an auto-generated one. Leave empty to get each video's original language.

## `fallbackToOriginal` (type: `boolean`):

When none of the preferred languages exist, return the original-language transcript. Turn off to return nothing instead. Each result says whether your language was found.

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

Use YouTube's automatic captions when no human-made captions exist. Turn off to accept human-made captions only.

## `subtitleFormats` (type: `array`):

Also return ready-to-save subtitle files for each transcript: SRT (SubRip) and/or VTT (WebVTT). The timestamped segments and full text are always included.

## `maxItems` (type: `integer`):

Stop after this many videos. Protects you from an accidentally large run. You are charged only for transcripts actually returned.

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

YouTube blocks most cloud IPs, so residential proxy is the reliable default.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://youtu.be/dQw4w9WgXcQ"
  ],
  "languages": [],
  "fallbackToOriginal": true,
  "includeAutoGenerated": true,
  "subtitleFormats": [],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `transcripts` (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=jNQXAC9IVRw",
        "https://youtu.be/dQw4w9WgXcQ"
    ]
};

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

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

```

## MCP server setup

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