# YouTube Transcript Scraper - Captions, Timestamps & SRT (`randy-tools/youtube-transcript-scraper`) Actor

Get the transcript of any YouTube video, short or live replay: full text, timestamped segments and SRT, in your preferred language, with manual or auto-generated captions. Includes title, channel, views and duration. Bulk input, fast HTTP-only, pay per transcript.

- **URL**: https://apify.com/randy-tools/youtube-transcript-scraper.md
- **Developed by:** [AICORP Tools](https://apify.com/randy-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

$4.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 — Captions, Timestamps & SRT

Get the **transcript of any YouTube video**, Short or live replay. You get the full text, **timestamped segments** and ready-to-use **SRT subtitles**, in your preferred language, from creator-made or auto-generated captions. Each record also carries the video's title, channel, duration, views and description.

Built for **reliability at scale**: a plain-HTTP pipeline (no browser) starts on fast datacenter IPs. Any video YouTube bot-checks is retried automatically on residential IPs, so bulk runs return every available transcript. In our 200-video test runs, **no video was left blocked**.

### What you can do with it

- **AI and RAG pipelines:** feed video knowledge into LLMs, chatbots and search indexes
- **Content repurposing:** turn videos into blog posts, newsletters, show notes and social threads
- **Research and monitoring:** analyse what channels, competitors or experts say, at scale
- **Subtitles:** export SRT files for editing, translation or accessibility
- **Datasets:** build text corpora from lectures, podcasts and interviews

### Features

- 🔗 **Any YouTube link:** watch, youtu.be, Shorts, embed and live URLs, or bare video ids; bulk lists welcome
- 🌍 **Language preference:** e.g. `["en", "es"]`; falls back to the video's first available transcript
- ✍️ **Human-made captions first:** uses creator-uploaded captions over auto-generated ones when both exist (configurable)
- ⏱️ **Timestamped segments:** start time, duration and text per caption line
- 🎬 **SRT output** ready to download or edit
- 📊 **Video details:** title, channel, channel id, duration, views, keywords, description and thumbnail
- 🧾 **Clear reasons** for videos without transcripts (no captions, private, region-locked). These records are free.
- ⚡ **Fast:** parallel processing and no browser

### Input example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "https://youtu.be/kqtD5dpn9C8",
    "https://www.youtube.com/shorts/l5MlhRSpfSI"
  ],
  "languages": ["en"],
  "includeTimestamps": true,
  "includeSrt": true
}
```

### Output example

```json
{
  "videoId": "dQw4w9WgXcQ",
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channelName": "Rick Astley",
  "channelId": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "durationSeconds": 213,
  "viewCount": 1820840452,
  "keywords": [
    "rick astley",
    "Never Gonna Give You Up",
    "nggyu"
  ],
  "description": "The official video for “Never Gonna Give You Up” by Rick Astley. \n\nNever: The Au...",
  "isLive": false,
  "thumbnail": "https://i.ytimg.com/vi_webp/dQw4w9WgXcQ/sddefault.webp",
  "availableLanguages": [
    {
      "languageCode": "en",
      "name": "English",
      "isAutoGenerated": false
    },
    {
      "languageCode": "en",
      "name": "English (auto-generated)",
      "isAutoGenerated": true
    },
    {
      "languageCode": "de-DE",
      "name": "German (Germany)",
      "isAutoGenerated": false
    }
  ],
  "hasTranscript": true,
  "language": "en",
  "languageName": "English",
  "isAutoGenerated": false,
  "transcript": "[♪♪♪] ♪ We're no strangers to love ♪ ♪ You know the rules and so do I ♪ ♪ A full commitment's what I'm thinking of ♪ ♪ You wouldn't get this from any other guy ...",
  "segments": [
    {
      "start": 1.36,
      "duration": 1.68,
      "text": "[♪♪♪]"
    },
    {
      "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 ♪"
    }
  ],
  "srt": "1\n00:00:01,360 --> 00:00:03,040\n[♪♪♪]\n\n2\n00:00:18,640 --> 00:00:21,880\n♪ We're no strangers to love ♪\n",
  "scrapedAt": "2026-09-28T03:05:00+00:00"
}
```

(`transcript`, `segments` and `srt` are shortened here; you get the full transcript.)

Export results as JSON, CSV, Excel or HTML, or pull them via the Apify API, webhooks, Make, Zapier, n8n or MCP.

### Pricing

Pay only for results: a fee **per transcript** delivered. Videos without a transcript cost nothing. Proxy costs, including the residential fallback, are included.

### FAQ

**Does every video have a transcript?** No. Some videos have captions disabled, and many music-only Shorts have none. Those videos are returned with `hasTranscript: false` and a reason, free of charge.

**Which language do I get?** The first of your `languages` that the video offers. Otherwise the Actor returns the video's first available transcript and marks its `language`. `availableLanguages` lists every caption track the video has.

**Is this legal?** The Actor reads publicly available captions of public videos, without logins. You are responsible for using transcripts in line with copyright, applicable laws and YouTube's terms.

**Something broke?** Open an issue on the Issues tab. We monitor the Actor daily and usually respond within 24 hours.

# Actor input Schema

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

YouTube video URLs or ids: watch, youtu.be, shorts, embed and live links all work.

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

Language codes in order of preference, e.g. \["en", "es"]. If none match, the video's first available transcript is returned.

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

Within a language, use creator-uploaded captions over auto-generated ones when both exist.

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

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

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

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

## `includeVideoDetails` (type: `boolean`):

Title, channel, duration, views, keywords, description and thumbnail.

## `outputVideosWithoutTranscript` (type: `boolean`):

Add a free record with the reason for videos that have no captions or are unavailable.

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

Videos processed in parallel.

## `residentialFallback` (type: `boolean`):

If YouTube bot-checks a datacenter IP, retry that video through residential proxy. Keeps runs reliable at scale; proxy cost is included in the price.

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

Apify Proxy, exiting from the US unless you pick another country (videos can be region-locked). Datacenter proxy (the default) is fast and cheap; with 'Residential fallback' on, blocked videos are retried on residential IPs automatically.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "preferManualCaptions": true,
  "includeTimestamps": true,
  "includeSrt": false,
  "includeVideoDetails": true,
  "outputVideosWithoutTranscript": true,
  "maxConcurrency": 8,
  "residentialFallback": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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