# YouTube Transcript Fast (`timbered_oak/youtube-transcript-fast`) Actor

Fast HTTP-only YouTube transcript extraction: watch page + timedtext JSON3, no Playwright.

- **URL**: https://apify.com/timbered\_oak/youtube-transcript-fast.md
- **Developed by:** [Mark](https://apify.com/timbered_oak) (community)
- **Categories:** AI, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.80 / 1,000 transcript scrapeds

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 Fast

### What it does

HTTP-only YouTube transcript extraction — no Playwright/browser. For each
video: fetches the watch page, pulls `captions.playerCaptionsTracklistRenderer.captionTracks`
out of the inline `ytInitialPlayerResponse`, picks a track (manual caption in
the requested language, else auto-generated in that language, else any manual
track, else any track), fetches that track with `&fmt=json3`, and assembles
the full transcript text plus timestamped segments.

### Input

| Field | Type | Required | Description |
|---|---|---|---|
| `videoUrls` | string\[] | one of videoUrls/videoIds | Full watch/shorts/youtu.be URLs. |
| `videoIds` | string\[] | one of videoUrls/videoIds | Bare 11-char video IDs. |
| `language` | string | no (default `en`) | Preferred caption language code. |
| `includeTimestamps` | boolean | no (default `true`) | Include the per-segment `segments` array alongside the full `transcript` text. |

### Output example

One row per video in the default dataset:

```json
{
  "videoId": "dQw4w9WgXcQ",
  "title": "Rick Astley - Never Gonna Give You Up",
  "channel": "Rick Astley",
  "duration": 213,
  "language": "en",
  "isAutoCaption": false,
  "transcript": "We're no strangers to love ...",
  "segments": [ { "start": 0.5, "dur": 2.1, "text": "We're no strangers to love" } ]
}
```

A video with no caption tracks pushes:

```json
{ "videoId": "...", "title": "...", "transcript": null, "reason": "no-captions" }
```

No charge event fires for that row.

### Pricing

Pay-per-event. One `transcript-scraped` event fires per successfully pushed
transcript row, via `Actor.charge({ eventName: 'transcript-scraped' })`.
Configure in the Apify Console: **$0.0008 per `transcript-scraped` event**
(`docs/CANDIDATES.md` entry 2 — 12x under the 3.72-rated market leader's
$0.01/item). No-caption rows are never charged.

### Known gap — BLOCKED from this Mac, not worked around

The watch-page fetch and `ytInitialPlayerResponse` extraction work (200 OK,
tracks parsed correctly, verified against `dQw4w9WgXcQ` and others). The
second call — fetching the caption track itself
(`https://www.youtube.com/api/timedtext?...&fmt=json3`) — consistently comes
back **HTTP 200 with an empty body** (`content-length: 0`, `server:
video-timedtext`) from this network, reproduced with three different HTTP
clients (Node `fetch`/undici, Python `urllib`, `curl`) and with/without
`Referer`/`Origin`/`Accept-Language` headers, both immediately following the
watch-page fetch in the same process and standalone. No 4xx/429 is returned —
YouTube silently zeroes the body instead. Per the build brief, this is
reported plainly rather than routed around with a proxy: **`smoke.sh` did not
pass from this Mac.** The code is written to the spec and is
`npx tsc --noEmit` clean; whether it passes depends on running it from an
Apify platform IP range (the CANDIDATES.md entry already budgets a datacenter
proxy fallback if YouTube rate-limits/blocks the Apify range) or a residential
egress, neither of which was tested here.

### Limits

Free-plan compute only (`policy/RULES.md` rule 4). No proxy configured (rule
1 — target needs no residential proxy in the common case; see gap above for
the one endpoint that may need it). No personal data beyond public
channel/title/video metadata already documented in `docs/CANDIDATES.md`.

# Actor input Schema

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

Full YouTube watch/shorts/youtu.be URLs.

## `videoIds` (type: `array`):

Bare 11-character YouTube video IDs (alternative to videoUrls).

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

Preferred caption language code (e.g. en, es). Falls back to any available track.

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

Include the per-segment timestamped transcript array in each row, in addition to the full text.

## `proxyConfiguration` (type: `object`):

Apify Proxy config. YouTube blocks Apify's datacenter IP ranges with HTTP 429; the default datacenter pool still rotates IPs per video, which helps some.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "language": "en",
  "includeTimestamps": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": []
  }
}
```

# Actor output Schema

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

All scraped rows as JSON

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

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

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

```

## MCP server setup

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

```

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/lEhT7uvLA1KeEQ8UW/builds/zMTYwRIbyNI98Z8i0/openapi.json
