# YouTube Transcript Scraper — Subtitles & Timestamps (`istmobot/youtube-transcript-scraper`) Actor

Get YouTube transcripts and subtitles from any video or Short, with timestamps, SRT, video metadata and translation to 100+ languages. No API key, no login. Built for AI, RAG, LLM agents and content repurposing. Export JSON, CSV, Excel.

- **URL**: https://apify.com/istmobot/youtube-transcript-scraper.md
- **Developed by:** [Istmobot](https://apify.com/istmobot) (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

Pay per event

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 — subtitles, timestamps, SRT & translation

Get the **transcript of any YouTube video or Short** as clean text, with **timestamped segments**, a ready-to-use **SRT subtitle file**, video metadata and optional **translation to 100+ languages**. No YouTube API key, no login, no browser. Built for **AI, RAG and LLM pipelines**, content repurposing, SEO, research and accessibility.

### What does YouTube Transcript Scraper do?

Paste YouTube links or video IDs and get one clean record per video:

- **Full transcript text** ready for ChatGPT, Claude, embeddings or summaries.
- **Timestamped segments**: start time, duration and text of every caption line.
- **SRT subtitles** you can upload to any video editor.
- **Translation**: get the transcript in Spanish, English, Portuguese, French, German, Japanese or any other language, with timestamps kept.
- **Video metadata**: title, channel, duration, views, keywords, description and thumbnail.
- **Every caption language** the video has, with manual vs auto-generated flags.
- Works with **watch URLs, youtu.be links, Shorts, live replays and embeds**.
- Export as **JSON, CSV, Excel, HTML** or use the Apify API.

### How to use it

1. Add one or more **YouTube video URLs or IDs**.
2. Optionally choose a **preferred language** (e.g. `en`) and a language to **translate to** (e.g. `es`).
3. Click **Start** and download your transcripts.

Language selection: exact match first (`es-419`), then same base language (`es` → `es-419`), and manual captions before auto-generated ones. With no preference you get the transcript in the language spoken in the video.

### How much does it cost?

Pay per result, no subscription:

| Event | Price |
|---|---|
| Actor start | $0.005 per run |
| `transcript` (one video transcript) | **$0.004**, or $4 per 1,000 transcripts |

Videos without captions, private or unavailable videos and blocked attempts are **never charged**. Proxy costs are included. The Apify free plan's $5 monthly credit covers about **1,200 transcripts**.

### Input

| Field | Default | Description |
|---|---|---|
| `videoUrls` | – | YouTube URLs or 11-character IDs (required) |
| `language` | video default | Preferred caption language code |
| `translateTo` | – | Translate the transcript to this language code |
| `includeSegments` | `true` | Timestamped caption lines |
| `includeSrt` | `false` | SRT subtitle string |
| `maxItems` | `1000` | Max transcripts per run |
| `proxyConfiguration` | Residential | YouTube shows a bot check to busy cloud IPs; the Actor retries on a new IP |

```json
{
  "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ", "https://youtu.be/jNQXAC9IVRw"],
  "language": "en",
  "translateTo": "es",
  "includeSrt": true
}
```

### Output

```json
{
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "title": "Me at the zoo",
  "channelName": "jawed",
  "channelId": "UC4QobU6STFB0P71PMvOGN5A",
  "durationSeconds": 19,
  "viewCount": 380000000,
  "language": "en",
  "originalLanguage": "en",
  "isAutoGenerated": false,
  "isTranslated": false,
  "availableLanguages": [{ "code": "en", "name": "English", "isAutoGenerated": false }],
  "wordCount": 39,
  "transcript": "All right, so here we are, in front of the elephants the cool thing about these guys is that they have really, really, really long trunks and that's cool",
  "segments": [{ "start": 1.2, "duration": 2.16, "text": "All right, so here we are, in front of the elephants" }],
  "scrapedAt": "2026-10-26T03:00:00.000Z"
}
```

Error items have `errorType`: `NO_TRANSCRIPT`, `UNAVAILABLE`, `AGE_RESTRICTED_OR_PRIVATE`, `BLOCKED`, `INVALID_URL` or `TRANSLATION_FAILED`. Error items are free.

### Use it with AI and automations

Call it from Python, Node.js, Make, Zapier, n8n or as an **MCP tool for AI agents** through Apify.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("istmobot/youtube-transcript-scraper").call(run_input={
    "videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "includeSegments": False,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item.get("transcript", item.get("error"))[:200])
```

### FAQ

**Does it work for videos without captions?** No. It reads the captions YouTube has, including auto-generated ones. Videos with no captions return a free `NO_TRANSCRIPT` item.

**Is it legal?** It reads publicly available captions. You are responsible for how you use the data; respect copyright and YouTube's terms.

**Need a channel or playlist?** Paste the video URLs; channel and playlist input is on the roadmap. Open an issue to request it.

# Actor input Schema

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

Videos to get transcripts for. Accepts watch URLs, youtu.be links, Shorts, live and embed URLs, or bare 11-character video IDs.

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

Language code of the transcript you want, e.g. en, es, pt, de, ja. Exact match first, then same base language (es → es-419). Manual captions are preferred over auto-generated ones. Empty = the video's default track.

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

Optional. Language code to auto-translate the transcript into using YouTube's own caption translation, e.g. en, es, fr. Leave empty to keep the original language.

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

Add a segments array with start time, duration and text of every caption line.

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

Add the transcript as a ready-to-use .srt subtitle string.

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

Maximum number of transcripts for the whole run.

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

YouTube shows a bot check to busy cloud IPs. The Actor retries each blocked video on a fresh proxy IP. RESIDENTIAL is the most reliable.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "includeSegments": true,
  "includeSrt": false,
  "maxItems": 1000,
  "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 = {
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("istmobot/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"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("istmobot/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"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call istmobot/youtube-transcript-scraper --silent --output-dataset

```

## MCP server setup

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