# YouTube Transcript Scraper - Pay Only for Success (`dbolat88/youtube-transcript-pay-per-success`) Actor

Get transcripts of YouTube videos as plain text, timed segments or SRT. You pay only for videos whose transcript was delivered: videos without captions, deleted or private videos cost nothing.

- **URL**: https://apify.com/dbolat88/youtube-transcript-pay-per-success.md
- **Developed by:** [Damir Bolat](https://apify.com/dbolat88) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.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 - Pay Only for Success

Extract YouTube transcripts in bulk: paste video links and get the transcript of each one as plain text, with timestamps, or as an SRT subtitle file. Works as a no-code tool and as a YouTube transcript API.

**You pay only for transcripts that were actually delivered.** A video without captions, a deleted or restricted video, a broken link - each comes back as a row with the reason and costs nothing.

### What can this YouTube transcript extractor do?

- **Bulk transcripts.** Pass one link or thousands; a run of 300 videos takes about four minutes.
- **Any link format.** Regular links, `youtu.be`, Shorts, embed and live links, or bare video IDs.
- **Original language by default.** If you do not name a language, you get the language spoken in the video, not the first one in YouTube's alphabetical list.
- **Language choice.** Name the language codes you want in order of preference.
- **Human or auto-generated captions.** Human-made captions are preferred; every row tells you which kind you received.
- **Three formats.** Plain text for AI and search, timed segments for apps, SRT for video editors.
- **Video details included.** Title, channel, length and the list of all available caption languages.
- **No setup.** No YouTube API key, no proxies to buy, no code to host.

### Why not a free transcript library?

Free libraries work well on your own computer. Run from a cloud server, they are often refused by YouTube with an "IP blocked" or "sign in to confirm you're not a bot" error. In our own test, every request sent to YouTube straight from a data center was refused.

This Actor sends each request through a residential address and, if YouTube refuses, tries again from a different one - up to three times. In two test runs of 300 recent videos each (October 2026), 599 of 600 requests got an answer.

And when a transcript still cannot be delivered, you are not charged for it.

### How much does it cost to scrape YouTube transcripts?

| Result | What you get | Charged |
|---|---|---|
| `ok` | Transcript, video title, channel, length, language | **$0.004** |
| `no_captions` | The video has no captions at all | Free |
| `language_unavailable` | No captions in the languages you asked for; the available ones are listed | Free |
| `unavailable` | The video cannot be played: deleted, restricted or not started yet; the reason is included | Free |
| `blocked` | YouTube refused the request after three attempts from different addresses | Free |
| `invalid_url` | The link is not a YouTube video | Free |

That is **$4 per 1,000 delivered transcripts**. There is no start fee and no charge for platform usage or proxies.

On Apify's free plan the monthly $5 credit covers about 1,250 transcripts.

### How to get a YouTube transcript

1. Open the Actor and paste your video links into **YouTube videos**.
2. Optionally name the languages you prefer and choose the output format.
3. Click **Start**.
4. Download the result as JSON, CSV or Excel, or fetch it through the API.

### Input

| Field | What it does |
|---|---|
| **YouTube videos** | Video URLs or 11-character video IDs. Duplicates are processed once. |
| **Preferred languages** | Language codes in order of preference, for example `en`, `es`, `de`. The first available one is returned, and a track written by a human is preferred over an auto-generated one. Leave empty to get the original language of the video. |
| **Use auto-generated captions** | On by default. Switch off to accept only captions uploaded by the video owner. |
| **Output format** | Plain text is always included. Add timed segments (default) or an SRT file. |

```json
{
    "videoUrls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
        "https://youtu.be/aircAruvnKk"
    ],
    "languages": ["en"],
    "includeAutoGenerated": true,
    "outputFormat": "segments"
}
```

### Output

One row per video, in the order they finish.

```json
{
    "videoId": "jNQXAC9IVRw",
    "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "status": "ok",
    "reason": null,
    "title": "Me at the zoo",
    "channel": "jawed",
    "channelId": "UC4QobU6STFB0P71PMvOGN5A",
    "lengthSeconds": 19,
    "language": "en",
    "languageName": "English",
    "isAutoGenerated": false,
    "availableLanguages": [
        { "code": "en", "name": "English", "isAutoGenerated": false },
        { "code": "de", "name": "German", "isAutoGenerated": false }
    ],
    "text": "All right, so here we are, in front of the elephants ...",
    "segments": [
        { "start": 1.2, "duration": 2.16, "text": "All right, so here we are, in front of the elephants" }
    ]
}
```

With **Plain text only** the `segments` field is left out. With **SRT** it is replaced by an `srt` field holding the subtitle file as a string.

When a transcript could not be delivered, `status` says why, `reason` carries the explanation YouTube gave, and `text` is `null`.

### Use it as a YouTube transcript API

One request starts the Actor, waits for it to finish and returns the rows:

```bash
curl -X POST "https://api.apify.com/v2/acts/dbolat88~youtube-transcript-pay-per-success/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoUrls": ["https://www.youtube.com/watch?v=jNQXAC9IVRw"], "outputFormat": "text"}'
```

The **API** button at the top of this page gives ready-made snippets for Python, JavaScript and other clients.

### Use it in n8n, Make, Zapier and AI agents

- **n8n, Make, Zapier.** Add the Apify app or node, choose to run an Actor and pick this one. A typical workflow: new video in a channel, transcript from this Actor, summary from your AI model.
- **AI agents.** The Actor is available to agents through the Apify MCP server, and agents can pay for a run without an Apify account.
- **LangChain and RAG.** Use the plain text output as documents; `title`, `channel` and `url` are ready to use as metadata.

### Frequently asked questions

**Can I get a transcript of a video without captions?**
No. The Actor returns the captions YouTube has, human-made or auto-generated. It does not transcribe audio. A video with no captions comes back as `no_captions` and is free.

**Does the transcript include timestamps?**
Yes. The default format returns segments with `start` and `duration` in seconds. Choose SRT to get a ready subtitle file.

**Which languages are supported?**
Every language YouTube has a caption track in for that video. `availableLanguages` lists them in each row. The Actor does not translate captions itself.

**What about auto-generated captions?**
They are returned when no human-made track exists in the language you need. In many languages they come without punctuation. `isAutoGenerated` tells you which kind you received.

**Can it scrape a whole channel or playlist?**
Not yet. Pass the links of the videos themselves.

**Is there a limit on the number of videos?**
No fixed limit. If you set a maximum charge for the run, the Actor stops when it is reached and reports how many videos were left unprocessed.

**What happens when YouTube changes something?**
Some videos may come back as `blocked` until the Actor is updated. Those rows are free.

### Responsible use

The Actor reads captions that YouTube shows to any visitor without signing in. You are responsible for how you use the transcripts, including copyright and the terms of the services involved.

This Actor is an independent tool. It is not affiliated with, endorsed by or sponsored by YouTube or Google.

Found a problem? Open an issue on the **Issues** tab of this page.

# Actor input Schema

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

Video URLs or 11-character video IDs. Regular, short (youtu.be), Shorts, embed and live links are accepted. Duplicates are processed once.

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

Language codes in order of preference, for example en, es, de. The first available one is returned; a manually created track is preferred over an auto-generated one. Leave empty to get the original language of the video.

## `includeAutoGenerated` (type: `boolean`):

When switched off, only captions uploaded by the video owner are returned. Videos that have only auto-generated captions are then reported as language_unavailable and are not charged.

## `outputFormat` (type: `string`):

The plain text is always included. Choose whether timed segments or an SRT file should be added to it.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "languages": [],
  "includeAutoGenerated": true,
  "outputFormat": "segments"
}
```

# Actor output Schema

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

Dataset rows with videoId, status, title, channel, language, text and, depending on the chosen format, segments or srt.

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

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

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

```

## MCP server setup

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

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/stw9ecBAwwCdPjk6G/builds/YnBifVMGScCV9FuM0/openapi.json
