# YouTube Transcript Scraper — works on videos with no captions (`soboljem/youtube-transcript-with-whisper`) Actor

Gets the transcript of any video. When YouTube has no caption track, it transcribes the audio with Whisper instead of returning an error.

- **URL**: https://apify.com/soboljem/youtube-transcript-with-whisper.md
- **Developed by:** [Luboš Benetka](https://apify.com/soboljem) (community)
- **Categories:** AI, Videos, Social media
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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 — works on videos with no captions

Most transcript scrapers read the caption track that YouTube already published. When a video has
no captions, they return an error.

**This one transcribes the audio instead.**

How often does that happen? Measured across 172 videos on 2026-07-29 — and it depends entirely on
what you are processing:

| content | share with no caption track |
|---|---|
| English | 0–10 % |
| Polish, Turkish, Vietnamese, Thai | ~10 % |
| Romanian | 30 % |
| Czech | 50–75 % |
| **Hungarian** | **80 %** |
| Live concerts and DJ sets | 50 % |
| **TikTok, Twitch** | **100 % — these platforms publish no caption tracks at all** |

*(Vimeo is not in that table: it was not part of the sample, and some Vimeo videos do carry
uploader-provided subtitles — those are used when they can be fetched.)*

If your inputs are mainstream English videos, a plain caption reader will serve you fine and you
do not need this. If they are in a smaller language, are live recordings, or come from anywhere
other than YouTube, a caption reader returns nothing for a large share of them.

### What you get

```json
{
  "title": "…",
  "durationSeconds": 4022,
  "source": "manual_captions | auto_captions | whisper",
  "isAiGenerated": false,
  "language": "cs",
  "text": "the full transcript…",
  "wordCount": 8213,
  "segments": [{ "start": 0.2, "end": 3.1, "text": "…" }],
  "vtt": "WEBVTT…",
  "lowConfidence": false,
  "warning": null
}
```

### Three things it does that a caption reader cannot

**1. It uses the free path when there is one.** If the video already has captions, they are read —
instantly, and you are not charged for speech recognition you did not need. Whisper runs only
when there is nothing to read. Set `forceTranscription` if you want the audio transcribed anyway.

**2. It refuses to hand you a translation and call it a transcript.** YouTube machine-translates
its own machine transcript into ~150 languages and publishes them all as "captions". Ask for
Czech captions on an English video and most tools will happily give you a translation of an ASR
guess. This one detects those and transcribes the real audio instead.

**3. It tells you when it could not hear anything.** Speech-recognition models trained on
subtitle files invent subtitle furniture on silence and music — translator credits, "thanks for
watching", channel names. Those are stripped, and if little real speech remains the result is
flagged `lowConfidence` with a reason. **An honest "we could not hear speech in this" is more
useful than a fluent invention**, and you can filter on it.

### Also works on

TikTok · Twitch VODs · Vimeo · SoundCloud · direct links to audio or video files — about 1 800
sites in total.

TikTok and Twitch publish no caption tracks at all, so everything from them is transcribed. Vimeo
sometimes does carry uploader-provided subtitles, and those are used when they can be fetched.
A direct link to an `.mp3` or `.mp4` carries no duration metadata; the file is measured after
download rather than refused.

Playlists, channels and collection URLs are refused rather than expanded — one of those can be
thousands of videos, and you would be billed for all of them. Send one video per item.

### Input

| field | what it does |
|---|---|
| `videoUrls` | one URL per line. Bare YouTube IDs work. Playlists are refused — they can be thousands of videos and you would be billed for all of them. |
| `language` | two-letter code, e.g. `en`, `cs`, `hu`. Leave empty for whatever the video is in. |
| `forceTranscription` | transcribe the audio even when captions exist |
| `includeSubtitles` | return a ready-to-use WebVTT file |
| `includeCutList` | return the spans of dead air, for editors cutting long footage |

### Notes

Long recordings are cut into overlapping windows, transcribed, and reassembled onto the original
clock, so timings stay correct on a two-hour stream. If any window fails, the run reports an
error rather than returning a transcript with a silent gap in the middle — a partial transcript
reads perfectly and there is no way for you to tell.

# Actor input Schema

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

One URL per line. YouTube, TikTok, Twitch, Vimeo, or a direct link to an audio or video file. Bare YouTube IDs work too. Playlists are not accepted — a playlist can be thousands of videos, and you would be billed for all of them.

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

Two-letter code of the language you want, e.g. en, cs, hu. Leave empty to take whatever the video is in. Note: a machine translation of YouTube's auto-captions is never returned as a transcript — if the video is in English and you ask for Czech, the audio is transcribed rather than translated.

## `forceTranscription` (type: `boolean`):

By default, an existing caption track is used when there is one, because it is free and instant. Turn this on to run speech recognition even when captions exist — useful when you do not trust YouTube's auto-captions.

## `includeSubtitles` (type: `boolean`):

Return a ready-to-use .vtt subtitle file alongside the plain text.

## `includeCutList` (type: `boolean`):

Return the spans of dead air — where nobody is speaking — so an editor can cut them. Nothing else on the store returns this.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "forceTranscription": false,
  "includeSubtitles": true,
  "includeCutList": false
}
```

# Actor output Schema

## `transcripts` (type: `string`):

One row per video: the full text, timed segments, ready-made WebVTT subtitles, and whether the text came from existing captions or from speech recognition. Rows flagged lowConfidence are ones where little or no real speech was found — filter on it rather than trusting every row equally.

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

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

# Run the Actor and wait for it to finish
run = client.actor("soboljem/youtube-transcript-with-whisper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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"
  ]
}' |
apify call soboljem/youtube-transcript-with-whisper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=soboljem/youtube-transcript-with-whisper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/jlrtJ2YfbwRTb7LOB/builds/SucPg7CajF325GLO4/openapi.json
