# YouTube Transcript Scraper: bulk, timestamps, SRT export (`steadydata/youtube-transcript-bulk`) Actor

Fetch transcripts and subtitles for up to 500 YouTube videos per run: plain text, timestamps, timestamped snippets and optional SRT export, with language selection. Built for AI agents and bulk pipelines, with an error record per video and no charge for videos that have no transcript.

- **URL**: https://apify.com/steadydata/youtube-transcript-bulk.md
- **Developed by:** [Steadydata Team](https://apify.com/steadydata) (community)
- **Categories:** Videos, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.50 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## YouTube Transcript Scraper (bulk, fast & reliable)

Fetch transcripts for up to **500 YouTube videos in one run**. Built for AI agents,
content pipelines and bulk analysis: strict output schema, timestamped snippets,
optional SRT export, language selection, and honest billing — **you only pay for
transcripts that are actually delivered**.

### Why this scraper

- **Only successful results are charged.** Videos without captions, deleted videos or
  temporary blocks show up as clear error records at no cost.
- **Built for bulk.** Paste up to 500 URLs or video IDs per run; every result carries
  the video ID so you can join it back to your own data.
- **Agent-ready output.** A stable, machine-readable schema (no HTML, no surprises)
  with explicit error codes — ideal as a tool behind an LLM or automation flow.
- **Language control.** Preference order (e.g. `["nl", "en"]`), and manual captions
  are preferred over auto-generated ones whenever both exist.
- **Lightweight route.** This actor uses a slim API path instead of loading the full
  video page, which keeps it fast and keeps the price low.

### Who this is for

Teams building AI tools on video content: RAG pipelines, summarisers, research
assistants. Content teams repurposing video into articles and newsletters. Anyone who
needs transcripts for hundreds of videos and cannot babysit a scraper.

If you need one transcript, once, a browser extension is cheaper. This actor earns its
place from roughly the tenth video onwards, and from the moment reliability matters.

### Who this is not for

**Read this before you buy.** The actor returns the captions YouTube has for a video,
manual or auto-generated, in the languages YouTube offers. It does not transcribe audio
itself, so a video without any caption track comes back as a free `NO_TRANSCRIPT` record,
and it does not translate: `languages` picks among the tracks that exist. It also does not
download the video or audio. For speech-to-text on caption-less videos you need a
transcription service, not a scraper.

### Input example

```json
{
    "videos": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
        "https://youtu.be/JGwWNGJdvx8",
        "kJQP7kiw5Fk"
    ],
    "languages": ["en"],
    "preferManualCaptions": true,
    "includeTimestampedSnippets": true,
    "includeSrt": false
}
```

Accepted video formats: full watch URLs, short links (`youtu.be`), shorts, embeds, or
bare 11-character video IDs.

### Output example

```json
{
    "videoId": "dQw4w9WgXcQ",
    "status": "ok",
    "title": "Rick Astley - Never Gonna Give You Up",
    "channel": "Rick Astley",
    "durationSeconds": 213,
    "language": "en",
    "languageName": "English",
    "isAutoGenerated": false,
    "availableLanguages": ["de", "en", "es", "fr", "ja", "pt"],
    "text": "We're no strangers to love ...",
    "snippets": [
        {"text": "We're no strangers to love", "start": 18.88, "duration": 3.96}
    ]
}
```

A failed video produces an error record instead (and is **not** charged):

```json
{
    "videoId": "9bZkp7q19f0",
    "status": "error",
    "errorCode": "NO_TRANSCRIPT",
    "error": "Video 9bZkp7q19f0 has no caption tracks"
}
```

Error codes: `INVALID_VIDEO_ID`, `VIDEO_UNAVAILABLE`, `NO_TRANSCRIPT`,
`LANGUAGE_NOT_FOUND`, `BLOCKED`. `INPUT_TRUNCATED` appears once when your input is longer than this actor accepts.

### Related actors from steadydata

- [youtube-video-details](https://apify.com/steadydata/youtube-video-details): the metadata for the same videos: views, tags, category
- [youtube-channel-videos](https://apify.com/steadydata/youtube-channel-videos): every video of a channel, to feed this actor a list
- [youtube-comments](https://apify.com/steadydata/youtube-comments): what viewers said, without author names

### Pricing

Pay per event: one `transcript-fetched` event per delivered transcript. No charge for
failed videos, no charge for videos without captions, no separate platform-usage
surcharge.

### FAQ

**Does it work with auto-generated captions?**
Yes. Set `preferManualCaptions` to `false` to take auto-generated tracks even when a
manual track exists; by default manual tracks win.

**Can I get subtitles as a file?**
Set `includeSrt` to `true` and every result carries a ready-to-use `srt` field.

**What about very long videos?**
Duration does not change the price: one delivered transcript is one event.

**Is personal data collected?**
No. The actor returns public caption text and video metadata only.

**What happens when YouTube changes something?**
Transcript sources break from time to time; that is the nature of this work. The
difference here is response: the actor is monitored daily and fixed fast, and while it
is broken you are not charged, because only delivered transcripts cost anything.

**What if a video has no captions at all?**
You get an explicit `NO_TRANSCRIPT` record for that video and pay nothing for it. Your
run continues with the rest of the list.

# Actor input Schema

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

YouTube video URLs (watch, shorts, youtu.be, embed) or bare 11-character video IDs. Max 500 per run.

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

Language codes in order of preference, e.g. \["en", "nl"]. Leave empty to take the original-language track.

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

When both exist for the chosen language, take the human-made track.

## `includeTimestampedSnippets` (type: `boolean`):

Adds a snippets array with start time and duration per line, next to the plain text field.

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

Adds an srt field with a ready-to-use subtitle file per video.

## Actor input object example

```json
{
  "videos": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "languages": [],
  "preferManualCaptions": true,
  "includeTimestampedSnippets": true,
  "includeSrt": false
}
```

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadydata/youtube-transcript-bulk").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"] }

# Run the Actor and wait for it to finish
run = client.actor("steadydata/youtube-transcript-bulk").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"
  ]
}' |
apify call steadydata/youtube-transcript-bulk --silent --output-dataset

```

## MCP server setup

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

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/fzC6SLjxwVIbLinKx/builds/fjXa7EZZ3fFU6O9X2/openapi.json
