# YouTube Transcript Scraper - Subtitles, Chapters & AI/RAG API (`church_of_loujess/youtube-transcript-rag-scraper`) Actor

Fast YouTube Transcript Scraper & Subtitle Extractor API. Extract full text, timestamps, video chapters, metadata & semantic RAG chunks. 3-tier self-healing failover. No login needed; works with Apify MCP, LangChain, n8n & Make.

- **URL**: https://apify.com/church_of_loujess/youtube-transcript-rag-scraper.md
- **Developed by:** [H H](https://apify.com/church_of_loujess) (community)
- **Categories:** AI, MCP servers, Social media
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 extracted youtube video transcript & ai/rag chunks

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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, Metadata & AI RAG Chunker (99.9% Success Rate)

Ultra-fast, zero-browser **3-Engine YouTube Transcript & Metadata Extractor** engineered for **AI Agents (MCP), RAG Pipelines, LangChain, n8n, Make.com, and Clay**.

#### Why Switch to This Actor?

1. **3-Tier Self-Healing Extraction (99.9% Reliability):** Automatically cascades across three independent extraction engines (`youtube-transcript-api` $\rightarrow$ Direct Android InnerTube JSON3 $\rightarrow$ `yt-dlp` sub-track fallback) so your automations never fail on consent walls or rate limits.
2. **100% Drop-In Backwards Compatible + Batch Mode:** Supports both single `videoUrl` (for drop-in replacement in existing workflows) **and** `videoUrls` array to process hundreds of videos in a single container run.
3. **Rolling-Caption Deduplication:** Strips overlapping/repeated auto-caption lines so your LLM tokens aren't wasted on duplicate words.
4. **Built-in Semantic RAG Chunker:** Automatically groups segments into token-bounded `ragChunks` with exact `startTime`, `endTime`, and clickable `deepLinkUrl` (`https://youtu.be/{id}?t=120s`) for instant citation in vector databases.
5. **Zero-Charge Guardrail:** You are **never** billed for a video that has no captions or fails validation.

***

#### Input Parameters

| Field | Type | Description |
| :--- | :--- | :--- |
| `videoUrl` | `string` | Single YouTube URL, Short, or 11-char Video ID (drop-in compatible). |
| `videoUrls` | `array` | Optional list of multiple YouTube URLs to process in parallel in one run. |
| `targetLanguage` | `string` | ISO 639-1 code (`en`, `es`, `fr`, `de`, etc.). Auto-translates if needed. |
| `chunkSizeWords` | `integer` | Word count per semantic RAG chunk (default: `200`). |
| `includeMetadata`| `boolean` | Include title, channel, views, publish date, description, and chapters. |

***

### Explore the Full Zero-Proxy AI/RAG & B2B Lead Suite (@church_of_loujess)

All 7 Actors run on **256 MB RAM** with **zero external proxies** and support **1-click MCP integration** for Claude Desktop, Cursor, and n8n:

| Actor | Best For |
| :--- | :--- |
| **[YouTube Transcript, Chapters & AI/RAG Scraper](https://apify.com/church_of_loujess/youtube-transcript-rag-scraper)** | Android InnerTube captions, chapters, iSummaryMarkdown &
agChunks |
| **[YouTube Channel Email, Socials & B2B Leads Scraper](https://apify.com/church_of_loujess/youtube-channel-email-leads-scraper)** | Creator/business emails, socials & external bio-link domain crawling |
| **[Google Trends Fast Scraper (No 429)](https://apify.com/church_of_loujess/google-trends-fast-scraper)** | Interest over time, regional breakdown, rising queries & trending searches |
| **[Google News Scraper Fast (Real Decoded URLs + Markdown)](https://apify.com/church_of_loujess/google-news-scraper-fast)** | Decodes CBMi.../AU_yqL URLs via Fbv4je RPC + full article Markdown |
| **[Website Email, Phone, Socials & Tech Stack Finder](https://apify.com/church_of_loujess/website-email-phone-finder)** | De-obfuscated emails, live DNS/MX mail provider check & 50+ tech signals |
| **[Fast Website Content & AI/RAG Markdown Crawler](https://apify.com/church_of_loujess/fast-website-content-crawler)** | Parallel sitemap.xml + BFS Markdown crawler & token-bounded
agChunks |
| **[Yahoo Finance Stock Quotes, Financials, OHLCV & AI News API](https://apify.com/church_of_loujess/yahoo-finance-scraper)** | Real-time quotes, OHLCV bars, full Income/Balance/CashFlow & AI tear-sheets |

- **Open-Source MCP Config, LangChain Loader & n8n Templates:** <https://github.com/Churchofloujess/apify-zero-proxy-mcp-suite>

# Actor input Schema

## `videoUrl` (type: `string`):

A single YouTube video URL, Short URL, or 11-character Video ID (100% compatible with existing workflows).

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

Pass multiple YouTube video URLs or IDs in a single run for high-speed parallel extraction.

## `targetLanguage` (type: `string`):

Preferred transcript language code (e.g., 'en', 'es', 'fr', 'de', 'pt'). Automatically translates if native track is in another language.

## `chunkSizeWords` (type: `integer`):

Number of words per semantic RAG chunk (with exact timestamp deep-links). Set to 150-300 for optimal vector database embedding.

## `includeMetadata` (type: `boolean`):

Extract video title, channel info, views, publish date, description, and timestamped chapters.

## Actor input object example

```json
{
  "videoUrl": "https://www.youtube.com/watch?v=2DXQqwKSwJE",
  "videoUrls": [],
  "targetLanguage": "en",
  "chunkSizeWords": 200,
  "includeMetadata": true
}
```

# Actor output Schema

## `results` (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 = {
    "videoUrl": "https://www.youtube.com/watch?v=2DXQqwKSwJE",
    "targetLanguage": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("church_of_loujess/youtube-transcript-rag-scraper").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 = {
    "videoUrl": "https://www.youtube.com/watch?v=2DXQqwKSwJE",
    "targetLanguage": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("church_of_loujess/youtube-transcript-rag-scraper").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 '{
  "videoUrl": "https://www.youtube.com/watch?v=2DXQqwKSwJE",
  "targetLanguage": "en"
}' |
apify call church_of_loujess/youtube-transcript-rag-scraper --silent --output-dataset

```

## MCP server setup

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

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/cXOeqtSlg1kghxoNq/builds/9bU6zXb1tHPR6wQgb/openapi.json
