# YouTube Transcript, Chapters & AI RAG Chunker API (`viktornovakuae/youtube-transcript-rag-chunker`) Actor

Extract clean YouTube transcripts, semantic timestamped RAG chunks, video metadata & outbound sponsor/affiliate links from YouTube videos & Shorts.

- **URL**: https://apify.com/viktornovakuae/youtube-transcript-rag-chunker.md
- **Developed by:** [Viktor Novak](https://apify.com/viktornovakuae) (community)
- **Categories:** AI, Developer tools, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.65 / 1,000 video-processeds

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/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, Timestamped Chapters & AI RAG Markdown Chunker API

Extract, enrich, and analyze **YouTube transcripts and subtitles for AI & RAG** in seconds with clean, structured JSON/CSV/Excel output—engineered for **B2B growth teams, data pipelines, n8n/Make automations, and AI MCP agents**.

***

### Why Choose This Actor?

- **Built Specifically for LLMs, RAG & Vector Databases:** Standard subtitle scrapers dump 1,000+ choppy 2-second fragments (`'um'`, `'so today'`). This Actor merges captions into clean **semantic time-window paragraphs** (default `60s`) with clickable deep-links (`https://youtu.be/ID?t=120s`).
- **10x Cheaper Than Legacy Transcript Scrapers:** Priced at just **`$0.65 / 1,000 videos`** (`$0.00065` per video!) vs legacy competitors charging `$5.00–$10.00 / 1,000`.
- **Ready-to-Use Markdown Document (`markdownRagDocument`):** Outputs a complete, clean Markdown document with H1 title, channel metadata, and timestamped H3 sections ready to paste into NotebookLM, Claude Projects, Pinecone, or Supabase pgvector.
- **Creator Sponsor & Affiliate Link Extractor:** Automatically extracts every external URL from the video description (`outboundLinks`), exposing creator sponsorships, affiliate offers, and lead magnets.
- **Speaking Pace Analytics:** Computes `wordCount` and `speakingWordsPerMinute` (WPM) alongside multi-language automatic fallback.

***

### High-ROI Use Cases

- **AI Agents & Knowledge Bases (RAG):** Index entire YouTube podcasts, lectures, and tutorials into vector stores with exact timestamp citations.
- **Content Repurposing Pipelines (n8n / Make):** Turn new YouTube uploads or Shorts into blog articles, LinkedIn threads, and newsletters automatically.
- **Influencer & Sponsor Intelligence:** Scan hundreds of niche creator videos to map which brands and affiliate links are sponsoring them.

***

### Quick Start: How to Use in 3 Clicks (No Coding Required)

1. **Click "Try for free"** to open the Actor in your Apify Console—sensible prefilled defaults are already loaded so you can test immediately.
2. **Enter your targets** in the **Target Sources & Search Inputs** section (domains, keywords, slugs, or URLs) and set your desired result limit.
3. **Click "Start"** and download your enriched dataset in **Excel (`.xlsx`), CSV, JSON, or JSONL**, or pipe results directly into Google Sheets, Slack, HubSpot, or n8n.

***

### Input Parameters

| Parameter | Type | Required | Description |
| :--- | :--- | :---: | :--- |
| `videoUrlsOrIds` | `array` | Yes | List of YouTube URLs (watch?v=, youtu.be/, /shorts/) or 11-character video IDs. *(Default: `["https://www.youtube.com/watch?v=dQw4w9WgXcQ"]`)* |
| `preferredLanguages` | `array` | Optional | Priority list of ISO language codes (falls back automatically to any available transcript if preferred is missing). *(Default: `["en", "ru", "es", "de", "fr"]`)* |
| `chunkDurationSeconds` | `integer` | Optional | Groups tiny 2-second subtitle fragments into clean, timestamped paragraphs of N seconds for LLM / vector DB ingestion. *(Default: `60`)* |
| `proxyConfiguration` | `object` | Optional | Optional Apify Proxy configuration to prevent YouTube IP throttling on large batches. *(Default: `{"useApifyProxy": true}`)* |

#### Input JSON Example

```json
{
  "videoUrlsOrIds": [
    "https://www.youtube.com/watch?v=aircAruvnKk"
  ],
  "preferredLanguages": [
    "en",
    "ru",
    "es"
  ],
  "chunkDurationSeconds": 60,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

***

### Output Dataset Schema & Sample Record

Every item pushed to the default dataset follows a strict, normalized schema ready for spreadsheets, SQL warehouses, or LLM tool-calling:

| Field | Type | Description |
| :--- | :--- | :--- |
| `videoId` | `string` | 11-character YouTube video ID. |
| `title` | `string` | Full video title. |
| `channelName` | `string` | Creator / channel name. |
| `viewCount` | `integer` | Total video views. |
| `durationSeconds` | `integer` | Video length in seconds. |
| `language` | `string` | Selected subtitle ISO language code. |
| `isAutoGenerated` | `boolean` | Whether captions are manual or YouTube ASR. |
| `wordCount` | `integer` | Total words in transcript. |
| `speakingWordsPerMinute` | `number` | Calculated presenter speaking speed (WPM). |
| `outboundLinks` | `array[string]` | External sponsor, affiliate, and social URLs extracted from the video description. |
| `fullTranscriptText` | `string` | Clean continuous plain-text transcript. |
| `markdownRagDocument` | `string` | Formatted Markdown document with clickable `[MM:SS]` deep-link headers. |
| `ragChunks` | `array[object]` | Structured array of chunks (`chunkIndex`, `startSeconds`, `timestampLabel`, `deepLinkUrl`, `text`). |

#### Sample Output JSON

```json
{
  "videoId": "aircAruvnKk",
  "videoUrl": "https://www.youtube.com/watch?v=aircAruvnKk",
  "title": "But what is a neural network? | Deep learning chapter 1",
  "channelName": "3Blue1Brown",
  "viewCount": 25494577,
  "durationSeconds": 1120,
  "language": "en",
  "isAutoGenerated": false,
  "wordCount": 3357,
  "speakingWordsPerMinute": 179.8,
  "chunkCount": 19,
  "outboundLinks": [
    "https://www.3blue1brown.com/topics/neural-networks",
    "https://github.com/3b1b/manim"
  ],
  "fullTranscriptText": "This is a 3. It's sloppily written and rendered at an extremely low resolution...",
  "ragChunks": [
    {
      "chunkIndex": 0,
      "startSeconds": 4.2,
      "timestampLabel": "00:04",
      "deepLinkUrl": "https://youtu.be/aircAruvnKk?t=4s",
      "text": "This is a 3. It's sloppily written and rendered at an extremely low resolution of 28x28 pixels..."
    }
  ]
}
```

***

### Transparent Pay-Per-Event Pricing

You only pay for clean records actually delivered to your dataset via Apify's **Pay-Per-Event (`video-processed`)** model—no monthly lock-in or wasted subscription fees:

| Volume Extracted | Estimated Cost (`$0.65 / 1,000` items) |
| :--- | :--- |
| **100 items** | **$0.07** |
| **1,000 items** | **$0.65** |
| **10,000 items** | **$6.50** |

> **Free-Plan Demo Mode:** Users on Apify's `$0` Free plan can run live tests (up to 15–25 records per run) to inspect full data quality and schema compatibility before upgrading to any paid Apify plan for unlimited volume.

***

### API, Python, n8n & AI Agent (MCP) Integrations

#### 1. Connect to Claude, Cursor, ChatGPT & AI Agents via Apify MCP

Add the official Apify MCP server (`https://mcp.apify.com`) to your AI client so your assistant can discover and call `viktornovakuae/youtube-transcript-rag-chunker` autonomously:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_API_TOKEN"
      }
    }
  }
}
```

#### 2. Run Synchronously via cURL (Single HTTP Request -> JSON Items)

```bash
curl -X POST "https://api.apify.com/v2/acts/viktornovakuae~youtube-transcript-rag-chunker/run-sync-get-dataset-items?token=YOUR_APIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"videoUrlsOrIds": ["https://www.youtube.com/watch?v=aircAruvnKk"], "preferredLanguages": ["en", "ru", "es"], "chunkDurationSeconds": 60, "proxyConfiguration": {"useApifyProxy": true}}'
```

#### 3. Run via Official Python SDK (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_API_TOKEN")
run = client.actor("viktornovakuae/youtube-transcript-rag-chunker").call(run_input={
  "videoUrlsOrIds": [
    "https://www.youtube.com/watch?v=aircAruvnKk"
  ],
  "preferredLanguages": [
    "en",
    "ru",
    "es"
  ],
  "chunkDurationSeconds": 60,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### 4. Automate in n8n / Make / Zapier

Install the verified **`@apify/n8n-nodes-apify`** node in n8n (or use an `HTTP Request` node), select **Run Actor and Get Dataset Items**, choose `viktornovakuae/youtube-transcript-rag-chunker`, and route enriched records straight into Google Sheets, Airtable, HubSpot, Telegram, or OpenAI/Gemini nodes.

***

### Frequently Asked Questions (FAQ)

#### How to scrape YouTube transcripts and subtitles for AI & RAG reliably without getting blocked?

This Actor handles connection headers, pagination, rate-limiting, structured JSON/API extraction, and Apify Proxy rotation automatically in the cloud—delivering clean structured rows without maintaining brittle local scripts.

#### How much does it cost to extract YouTube transcripts and subtitles for AI & RAG?

Pricing is strictly usage-based at **$0.65 per 1,000 results** (`video-processed`). Extracting 500 records costs roughly **$0.33**, making it significantly more cost-effective than enterprise SaaS subscriptions.

#### Is extracting public data legal and compliant?

Yes. This Actor exclusively accesses **publicly available web data** without logging into private user accounts, bypassing paywalls, or collecting sensitive private personal data. Always ensure your downstream use complies with applicable terms and regulations (such as GDPR/CCPA where relevant).

***

### Related Intelligence Tools in Our Suite

Combine this Actor with our other specialized B2B, E-Commerce, Ads & AI data tools on Apify:

| Actor | Best For |
| :--- | :--- |
| [**Multi-ATS Career Jobs & B2B Hiring Signals API**](https://apify.com/viktornovakuae/multi-ats-jobs-hiring-signals) | Greenhouse, Lever, Ashby, Workable & SmartRecruiters jobs + B2B sales triggers |
| [**B2B Website Contact Scraper + Instant MX Email Validator**](https://apify.com/viktornovakuae/b2b-contact-email-validator) | 2-in-1 domain crawler + live DNS MX/SPF & disposable email verification |
| [**Trustpilot + App Store + Google Play Reviews & Churn Monitor**](https://apify.com/viktornovakuae/unified-reviews-churn-monitor) | 3-platform customer review intelligence with automated Churn Risk alerts |
| [**Reddit Buyer-Intent, Pain-Point & Brand Mention Scraper**](https://apify.com/viktornovakuae/reddit-buyer-intent-radar) | 0–100 Buyer-Intent scoring (`alternative to`, `recommend a tool`) on Reddit |
| [**eBay Sold Listings Scraper & Real Market Price Valuator**](https://apify.com/viktornovakuae/ebay-sold-price-valuator) | IQR-filtered median sold price, fair-value band & flip margin calculator |
| [**Google Ads Transparency Spy & Winning Creative Longevity API**](https://apify.com/viktornovakuae/google-ads-transparency-spy) | Browserless Google Ads spy ranked by active longevity days (`90d+ winners`) |
| [**Meta (Facebook & Instagram) Ad Library Winner Hunter**](https://apify.com/viktornovakuae/meta-ads-library-winner-hunter) | FB & IG ad spy with Days Running, duplicate collation count & funnel domain |
| [**UAE Real Estate & Below-Market Deal Finder (Dubai & Abu Dhabi)**](https://apify.com/viktornovakuae/uae-real-estate-deal-analyzer) | AED/sqft cohort median comparison, Below-Market % gems, gross yield & broker contacts |
| [**Amazon Product, Monthly Sales Volume & Revenue Intelligence API**](https://apify.com/viktornovakuae/amazon-product-revenue-intelligence) | 10 Amazon marketplaces with Monthly Units Bought & Estimated Monthly Revenue |

# Actor input Schema

## `videoUrlsOrIds` (type: `array`):

List of YouTube URLs (watch?v=, youtu.be/, /shorts/) or 11-character video IDs.

## `preferredLanguages` (type: `array`):

Priority list of ISO language codes (falls back automatically to any available transcript if preferred is missing).

## `chunkDurationSeconds` (type: `integer`):

Groups tiny 2-second subtitle fragments into clean, timestamped paragraphs of N seconds for LLM / vector DB ingestion.

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

Optional Apify Proxy configuration to prevent YouTube IP throttling on large batches.

## Actor input object example

```json
{
  "videoUrlsOrIds": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "preferredLanguages": [
    "en",
    "ru",
    "es",
    "de",
    "fr"
  ],
  "chunkDurationSeconds": 60,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `videos` (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 = {
    "videoUrlsOrIds": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "preferredLanguages": [
        "en",
        "ru",
        "es",
        "de",
        "fr"
    ],
    "chunkDurationSeconds": 60,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("viktornovakuae/youtube-transcript-rag-chunker").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 = {
    "videoUrlsOrIds": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"],
    "preferredLanguages": [
        "en",
        "ru",
        "es",
        "de",
        "fr",
    ],
    "chunkDurationSeconds": 60,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("viktornovakuae/youtube-transcript-rag-chunker").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 '{
  "videoUrlsOrIds": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "preferredLanguages": [
    "en",
    "ru",
    "es",
    "de",
    "fr"
  ],
  "chunkDurationSeconds": 60,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call viktornovakuae/youtube-transcript-rag-chunker --silent --output-dataset

```

## MCP server setup

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

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/GWdZDk1KSIJyQ7XS4/builds/ioBCtdzgUcqU1uMqP/openapi.json
