# YouTube Transcript Scraper — $1/1K, LLM-ready (`conceivable_yclept/youtube-transcript-cheap`) Actor

Transcripts for YouTube videos, playlists and channels: clean text, timestamped segments, optional chunks, metadata. $1 per 1,000; no charge when there are no captions.

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

## Pricing

$1.00 / 1,000 transcript extracteds

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: LLM-ready transcripts for videos, playlists and channels

Extract existing YouTube captions (manual or auto-generated) as clean text, timestamped segments and optional RAG-ready chunks. Give it video links, playlists or channels, mixed in a single run, and get one dataset row per video with title, channel, views and duration included.

**1 result = 1 transcript. $1.00 per 1,000 transcripts. Videos without captions are not charged.**

### What you get

- Clean `text` of the whole video (HTML entities and whitespace normalized)
- `segments`: `[{start, duration, text}]` with timestamps in seconds (optional)
- `chunks`: text split into pieces of about N characters, each with a start time (optional, for embeddings and RAG)
- Metadata: title, channel, channelId, duration, viewCount, language, isAutoGenerated, isTranslated
- A run summary (ok / no_transcript / error counts) in the key-value store record `OUTPUT`

### Input

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://youtu.be/aircAruvnKk",
    "https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi",
    "https://www.youtube.com/@TED"
  ],
  "languages": ["en"],
  "includeSegments": true,
  "chunkSize": 1000,
  "maxVideosPerChannel": 20,
  "translateTo": "",
  "maxConcurrency": 5
}
```

Accepted URLs: watch, youtu.be, shorts, embed, live, bare 11-character video IDs, playlists, channels (`@handle`, `/channel/UC...`, `/c/...`, `/user/...`). Duplicates are removed.

| Field | Meaning |
|---|---|
| `languages` | Priority list of language codes. Manual captions are preferred over auto-generated ones in the same language. If none match, the first available caption track is used. |
| `translateTo` | Optional language code. Uses YouTube's own caption translation and marks the row `isTranslated: true`. Not every video allows it. |
| `chunkSize` | `0` = off. Otherwise adds `chunks` of about this many characters. |
| `maxVideosPerChannel` | Cap per channel or playlist URL (default 50). |
| `proxyCountry` | Country of the residential proxy used when YouTube blocks direct requests (default US). |

### Output (one row per video)

```json
{
  "videoId": "jNQXAC9IVRw",
  "url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
  "status": "ok",
  "title": "Me at the zoo",
  "channel": "jawed",
  "channelId": "UC4QobU6STFB0P71PMvOGN5A",
  "publishedAt": "2005-04-23",
  "duration": 19,
  "viewCount": 444458891,
  "language": "en",
  "isAutoGenerated": false,
  "isTranslated": false,
  "text": "All right, so here we are in front of the elephants...",
  "segments": [{"start": 1.2, "duration": 2.1, "text": "All right, so here we are"}],
  "chunks": [{"start": 1.2, "text": "All right, so here we are in front of the elephants..."}]
}
```

`status` is `ok`, `no_transcript` (captions are disabled or absent, not charged) or `error` (video unavailable or repeated failure, not charged; see `error`).

### Run it from the API

curl:

```bash
curl -X POST "https://api.apify.com/v2/acts/<USERNAME>~youtube-transcript-cheap/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://youtu.be/jNQXAC9IVRw"], "languages": ["en"]}'
```

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("<USERNAME>/youtube-transcript-cheap").call(
    run_input={"urls": ["https://youtu.be/jNQXAC9IVRw"], "chunkSize": 1000}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item["status"] == "ok":
        print(item["title"], len(item["text"]))
```

### n8n and Make

- n8n: use the Apify node (Run Actor, then Get Dataset Items), or an HTTP Request node with `POST https://api.apify.com/v2/acts/<USERNAME>~youtube-transcript-cheap/run-sync-get-dataset-items`, header `Authorization: Bearer <APIFY_TOKEN>` and the JSON input as the body.
- Make: use the Apify module "Run an Actor" and then "Get Dataset Items", or the HTTP "Make a request" module with the same URL and body.
- Each dataset row is one video, so you can feed `text` or `chunks` straight into an LLM or vector-store node.

### Limitations

- Only existing captions are extracted. There is no AI speech-to-text, so videos without captions return `no_transcript`.
- `publishedAt` is best-effort: it is filled when YouTube returns it cheaply and may be `null`.
- Private, deleted, age-restricted or region-locked videos return `error`.
- Translation depends on what YouTube allows for each video.
- This actor only reads public data and never logs in.

### FAQ

**Which languages work?** Any language that has captions on YouTube. Set `languages` to the ones you prefer, in order.

**Are auto-generated captions included?** Yes, and `isAutoGenerated` tells you which kind you got. A manual track is preferred when both exist in the same language.

**How am I charged?** One event per transcript actually extracted. `no_transcript` and `error` rows are free. Standard Apify platform usage is included in the price.

**Can I limit my spend?** Yes. Set a maximum cost per run in the run options; the actor stops when the limit is reached.

# Actor input Schema

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

Videos (watch, youtu.be, shorts, embed, live, or a bare 11-char ID), playlists, and channels (@handle, /channel/UC..., /c/, /user/). Can be mixed.

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

Language codes in priority order. If none is available, the video's first available transcript is used.

## `includeSegments` (type: `boolean`):

Add `segments` \[{start, duration, text}] to each result.

## `chunkSize` (type: `integer`):

If > 0, also output `chunks` of about this many characters with start timestamps (handy for RAG). 0 = off.

## `maxVideosPerChannel` (type: `integer`):

Cap on videos taken from each channel or playlist URL.

## `translateTo` (type: `string`):

Optional. Uses YouTube's translation. Marked in output as translated; may hit rate limits more often.

## `proxyCountry` (type: `string`):

Country code for the residential proxy fallback (used only when YouTube blocks the direct request).

## `maxConcurrency` (type: `integer`):

Parallel videos.

## Actor input object example

```json
{
  "urls": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "languages": [
    "en"
  ],
  "includeSegments": true,
  "chunkSize": 0,
  "maxVideosPerChannel": 50,
  "translateTo": "",
  "proxyCountry": "US",
  "maxConcurrency": 5
}
```

# Actor output Schema

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

No description

## `fullResults` (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 = {
    "urls": [
        "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    ],
    "languages": [
        "en"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("conceivable_yclept/youtube-transcript-cheap").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"],
    "languages": ["en"],
}

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

```

## MCP server setup

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

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/91me03hO6sg5c9xb0/builds/VmSfII45TJHebwtVO/openapi.json
