# YouTube Transcript Scraper (`pomlabs/youtube-transcript-scraper`) Actor

Get the full transcript of any YouTube video, with timestamps, language and video details. Works with Shorts. Pay only for transcripts delivered: $0.01 per video.

- **URL**: https://apify.com/pomlabs/youtube-transcript-scraper.md
- **Developed by:** [Pom Labs](https://apify.com/pomlabs) (community)
- **Categories:** Videos, AI, Social media
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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

Get the full transcript of any YouTube video: plain text, timestamped segments, language, and basic video details, in one run. Paste one link or thousands.

**You pay only for transcripts delivered: $0.01 per video.** Videos without captions, private or deleted videos, and invalid links are listed in the results with the reason, and are never charged.

### What you get

- **Full transcript text**, ready for search, summaries, translation or LLM pipelines
- **Timestamped segments** (start, duration, text) for subtitles, chapters or clipping
- **Language control**: list your preferred languages; manual captions are chosen over auto-generated ones; if none of your languages exist, you still get the first available track instead of an empty result
- **Video details** at no extra cost: title, channel name and ID, view count, length, live flag, and the list of caption languages available
- **Clear status per video**: `ok`, `no_captions`, `unavailable`, `invalid_url` or `blocked`
- **Any link format**: watch URLs, `youtu.be` links, Shorts, embed and live links, or bare 11-character video IDs. Duplicates are removed automatically.

### How it works

The Actor asks YouTube for the caption track directly, without downloading the video or the watch page, through Apify residential proxies with a fresh IP for each video and automatic retries. This keeps it fast (about 1 second per video, 8 videos in parallel) and reliable.

In our own test on 23 November 2026 with 1,000 random videos in English, Portuguese and Spanish: 868 transcripts, 120 videos had no captions, 11 were unavailable, and 1 failed after retries. That is a 99.9% success rate on videos that have captions.

### Input

| Field | Type | Description |
|---|---|---|
| `urls` | array of strings (required) | YouTube video URLs or IDs |
| `languages` | array of strings | Preferred language codes, in order. Default `["en"]` |
| `includeTimestamps` | boolean | Add the `segments` array. Default `true` |
| `maxRetries` | integer | Retries per video with a new IP, 1 to 6. Default `3` |

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://youtu.be/dQw4w9WgXcQ",
    "https://www.youtube.com/shorts/2Ufd70DTBM8"
  ],
  "languages": ["en", "es"],
  "includeTimestamps": true
}
```

### Output

One item per video. A successful item (segments shortened here):

```json
{
  "input": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "status": "ok",
  "title": "Me at the zoo",
  "channelName": "jawed",
  "channelId": "UC4QobU6STFB0P71PMvOGN5A",
  "viewCount": 449183135,
  "lengthSeconds": 19,
  "isLive": false,
  "language": "en",
  "isAutoGenerated": false,
  "availableLanguages": ["de", "en"],
  "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 (baaaaaaaaaaahhh!!) and that's pretty much all there is to say",
  "charCount": 225,
  "segments": [
    { "start": 1.2, "duration": 2.16, "text": "All right, so here we are, in front of the elephants" },
    { "start": 5.318, "duration": 2.656, "text": "the cool thing about these guys is that they have really..." }
  ]
}
```

A video without captions (not charged):

```json
{
  "input": "https://www.youtube.com/watch?v=D-P5SPfo108",
  "videoId": "D-P5SPfo108",
  "status": "no_captions",
  "title": "Allah Tala ke madad",
  "channelName": "Stereo Diaries",
  "viewCount": 4151,
  "lengthSeconds": 32,
  "error": "This video has no captions"
}
```

Download the results as JSON, CSV, Excel or HTML from the run page, or read them through the Apify API.

### Pricing

Pay per event: **$0.01 for each transcript delivered** (the `transcript` event). There is no start fee and no charge for failed, private, caption-less or invalid videos. Platform usage is included in the price. You can set a maximum cost per run in the run options; the Actor stops cleanly when it is reached.

Example: 1,000 videos where 870 have captions cost $8.70.

### Use it from code, Make, Zapier, n8n or an AI agent

Call it like any Apify Actor, through the [Apify API](https://docs.apify.com/api/v2), the Python or JavaScript client, integrations such as Make, Zapier and n8n, or as a tool for AI agents through the [Apify MCP server](https://mcp.apify.com/).

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("pomlabs/youtube-transcript-scraper").call(run_input={"urls": ["https://youtu.be/dQw4w9WgXcQ"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["status"], item.get("title"), item.get("transcript", "")[:100])
```

### FAQ

**Does it transcribe videos that have no captions?** No. It returns the captions YouTube already has, manual or auto-generated. Videos with no caption track come back as `no_captions` and are free.

**Which languages?** Any language YouTube has captions for. Put your preferred codes in `languages`; if none match, the first available track is returned, and `availableLanguages` lists all of them.

**Can I scrape a whole channel or playlist?** Not yet: give it video links. Channel and playlist links are reported as `invalid_url`.

**What if YouTube blocks a request?** Each retry uses a new residential IP. A video that still fails is marked `blocked` and is not charged.

**Is it legal?** The Actor reads only public captions of public videos. Check that your use complies with YouTube's terms and the laws that apply to you.

### Support

Found a problem or need a feature (channels, playlists, translation, SRT export)? Open an issue on the Actor's Issues tab.

# Actor input Schema

## `urls` (type: `array`):

One or more YouTube videos. Accepts watch URLs, youtu.be links, Shorts, embed and live links, or the 11-character video ID. Duplicates are removed.

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

Language codes in order of preference (e.g. en, pt, es, de). Manual captions are preferred over auto-generated ones. If none of these exist, the first available caption track is returned, so you still get a transcript.

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

Adds a 'segments' array with start time, duration and text of each caption line.

## `maxRetries` (type: `integer`):

How many times to retry a video with a fresh residential IP if YouTube refuses the request (1-6).

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://youtu.be/dQw4w9WgXcQ"
  ],
  "languages": [
    "en"
  ],
  "includeTimestamps": true,
  "maxRetries": 3
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset with one item per video (overview view).

# 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 = {
    "urls": [
        "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("pomlabs/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 = { "urls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://youtu.be/dQw4w9WgXcQ",
    ] }

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

```

## MCP server setup

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