# YouTube Transcript Scraper - Fast, Reliable, $2/1000 (`skillmerc/youtube-transcript-scraper-pro`) Actor

Bulk YouTube transcripts and subtitles (any language, auto or manual captions) at $2 per 1,000 - five times cheaper than the incumbent and it actually works. Uses mobile innertube API to bypass empty web timedtext responses.

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

## Pricing

from $2.00 / 1,000 results

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 - Fast, Reliable, $2/1000

Bulk-fetch transcripts and subtitles from YouTube videos, playlists, and channels. Supports any language, both manual captions and auto-generated (ASR). Priced at $2 per 1,000 results - five times cheaper than comparable tools.

### How it works

Uses YouTube's mobile innertube API (Android/iOS clients) to retrieve caption track lists. The classic web timedtext path silently returns empty responses; mobile clients still work. Falls back from Android to iOS client automatically, and from JSON3 caption format to XML.

### Inputs

| Field | Type | Default | Description |
|---|---|---|---|
| videoUrls | array | `["https://www.youtube.com/watch?v=dQw4w9WgXcQ"]` | Video URLs or IDs. Accepts playlist/channel URLs when expandPlaylists is true |
| language | string | `"en"` | Preferred caption language code (en, es, de, ko, etc.) |
| preferManual | boolean | `true` | Prefer human-written captions over auto-generated (ASR) |
| includeTimestamps | boolean | `true` | Include per-segment start time and duration |
| plainText | boolean | `true` | Return the whole transcript as one cleaned string |
| expandPlaylists | boolean | `false` | Expand playlist or channel URLs into individual videos |
| maxItems | integer | `100` | Maximum number of videos to process |

### Output fields

| Field | Type | Description |
|---|---|---|
| video\_id | string | YouTube video ID |
| video\_url | string | Full YouTube URL |
| title | string | Video title |
| channel | string | Channel name |
| channel\_id | string | Channel ID |
| duration\_seconds | number | Video duration in seconds |
| view\_count | number | View count |
| published\_at | string | Publish date (null if unavailable) |
| language | string | Language code of the returned transcript |
| is\_auto\_generated | boolean | True if the transcript is ASR-generated |
| available\_languages | array | All caption language codes available for this video |
| transcript\_text | string | Full transcript as a single string (null if plainText=false) |
| segments | array | List of `{start, duration, text}` objects (null if includeTimestamps=false) |
| word\_count | number | Word count of the transcript |
| error | string | Error message if the video failed, otherwise null |

### Example output item

```json
{
  "video_id": "dQw4w9WgXcQ",
  "video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "channel": "Rick Astley",
  "channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
  "duration_seconds": 213,
  "view_count": 1815620592,
  "published_at": null,
  "language": "en",
  "is_auto_generated": false,
  "available_languages": ["en", "en (auto)", "de-DE"],
  "transcript_text": "[music] We're no strangers to love You know the rules and so do I ...",
  "segments": [
    { "start": 0.0, "duration": 2.4, "text": "[music]" },
    { "start": 18.88, "duration": 3.28, "text": "We're no strangers to love" }
  ],
  "word_count": 487,
  "error": null
}
```

### Pricing

$2.00 per 1,000 results (pay-per-result). You are only charged for items that are successfully pushed to the dataset.

### Limitations

- `published_at` is not returned by the mobile API and will be null.
- Videos with no captions (no auto-generated, no manual) return an item with `error: "no captions available for this video"`.
- Private, deleted, age-restricted, and live-stream videos return an item with a descriptive `error` field instead of failing the whole run.
- Concurrency is capped at 5 requests with small jittered delays to avoid rate limiting.
- Playlist/channel expansion uses the same mobile API; very large playlists paginate automatically up to `maxItems`.

# Actor input Schema

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

YouTube video URLs or IDs. Also accepts playlist and channel URLs when expandPlaylists is true.

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

Preferred caption language code, e.g. en, es, de. Falls back to auto-generated then to the first available.

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

Prefer human-written captions over auto-generated (ASR)

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

Include per-segment start and duration in output

## `plainText` (type: `boolean`):

Also return the whole transcript as one cleaned string

## `expandPlaylists` (type: `boolean`):

Expand playlist/channel URLs into their individual videos

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

Maximum number of videos to process

## Actor input object example

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

# 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"
    ],
    "language": "en",
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("skillmerc/youtube-transcript-scraper-pro").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"],
    "language": "en",
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("skillmerc/youtube-transcript-scraper-pro").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"
  ],
  "language": "en",
  "maxItems": 100
}' |
apify call skillmerc/youtube-transcript-scraper-pro --silent --output-dataset

```

## MCP server setup

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

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/5HpQ7CK3huXPLHLkc/builds/Q3dCbFMLy5cFNI1ZK/openapi.json
