# YouTube Transcript & Video Scraper | 2Space (`2space/youtube-transcript-metadata-mcp`) Actor

Fast YouTube transcript and video metadata scraper—5x cheaper than browser scrapers. Scrapes full transcripts, timestamps, channel RSS feeds, views, tags, and token counts in pure HTTP.

- **URL**: https://apify.com/2space/youtube-transcript-metadata-mcp.md
- **Developed by:** [2Space Group](https://apify.com/2space) (community)
- **Categories:** AI, Videos, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 video transcripts extracted

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/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 MCP Scraper (`reminiscent_medaka/youtube-transcript-metadata-mcp`)

> **2Space Group** — Fast, pure-HTTP data extraction tools built for AI agents, RAG pipelines, and Model Context Protocol (MCP) workflows.

Looking for a reliable **YouTube transcript scraper**, **YouTube captions extractor**, or **YouTube video metadata API** that does not burn your budget on headless browsers? **`youtube-transcript-metadata-mcp`** extracts clean, LLM-ready transcripts (with optional `[MM:SS]` timestamps), word counts, token estimates, and complete video metadata at **$0.002 per video** — roughly **5x lower cost** than browser-heavy alternatives like `streamers/youtube-scraper` or `pintostudio/youtube-transcript-scraper`.

***

### Why Use `youtube-transcript-metadata-mcp`?

- **Pure HTTP + Cheerio Engine:** Zero headless Chrome, zero Playwright overhead, zero external LLM API keys required. Runs in milliseconds per video.
- **LLM & RAG Ready:** Automatically decodes HTML/XML entities, normalizes whitespace, counts words, and computes `tokenEstimate` so your downstream agents never overflow context windows.
- **Channel RSS Discovery:** Pass `channelIds` (`UC...`) to automatically pull the latest uploads from official YouTube Atom RSS feeds (`videos.xml`) and extract their transcripts in one run.
- **Smart Language Fallback:** Prioritizes manual captions in your `preferredLanguage` over auto-generated ASR tracks, with automatic fallback to English or the first available track.
- **No Data, No Charge Guarantee:** You are only billed (`video-transcript-extracted` = `$0.002`) *after* a validated video record is pushed to the dataset. Unavailable or private videos are never charged.
- **Built-in Spend Guardrails:** Enforces hard `maxItems` and `maxCostUsd` pre-charge caps and writes a full `RUN_DIAGNOSTICS` audit report to the Key-Value Store on every run.

***

### Input Parameters

Running with an empty `{}` input works out of the box using sensible defaults.

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `videoUrlsOrIds` | `string[]` | `["https://www.youtube.com/watch?v=dQw4w9WgXcQ", "https://www.youtube.com/watch?v=jNQXAC9IVRw"]` | YouTube watch URLs, `youtu.be` links, Shorts, Live, Embed URLs, or 11-character video IDs. |
| `channelIds` | `string[]` | `[]` | Optional YouTube channel IDs (`UC...`) to ingest latest videos via RSS feed. |
| `preferredLanguage` | `string` | `"en"` | Preferred caption language code (e.g. `en`, `es`, `de`, `fr`, `ja`). |
| `includeTimestamps` | `boolean` | `false` | Prefix each caption segment with `[MM:SS]` / `[HH:MM:SS]` on separate lines. |
| `requireTranscript` | `boolean` | `false` | If `true`, skips videos without captions without charging. If `false`, still returns full metadata (`hasTranscript: false`). |
| `maxItems` | `integer` | `15` | Hard cap on validated videos pushed and billed. |
| `maxCostUsd` | `number` | `2.0` | Maximum USD budget cap (`$0.002` per video). |
| `proxyConfiguration` | `object` | `{ "useApifyProxy": false }` | Optional proxy settings for high-volume workloads. |

***

### Output Example (Flat JSON)

Every item pushed to the dataset uses a flat, schema-validated structure with scalar root fields:

```json
{
    "videoId": "jNQXAC9IVRw",
    "videoUrl": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "title": "Me at the zoo",
    "channelName": "jawed",
    "channelId": "UC4QobU6STFB0P71PMvOGN5A",
    "publishDate": "2005-04-23T20:31:52-07:00",
    "lengthSeconds": 19,
    "viewCount": 449811962,
    "language": "en",
    "hasTranscript": true,
    "transcriptText": "All right, so here we are, in front of the elephants, the cool thing about these guys is that they have really, really, really long, um, trunks, and that's, that's cool. And that's pretty much all there is to say.",
    "transcriptSegmentsCount": 7,
    "wordCount": 39,
    "tokenEstimate": 52,
    "description": "00:00 Intro\n00:05 The elephants...",
    "keywords": [
        "me at the zoo",
        "jawed karim",
        "first youtube video"
    ],
    "extractedAt": "2026-11-30T07:50:00.000Z"
}
```

***

### 1-Step MCP & Automation Setup (ChatGPT, Claude, Cursor, Antigravity, n8n, Make, Zapier)

Connect **`reminiscent_medaka/youtube-transcript-metadata-mcp`** directly to your AI client or workflow automation tool:

#### Apify MCP Server URL (ChatGPT, Claude Desktop, Cursor, Antigravity)

Add this hosted MCP endpoint to your client configuration (`mcpServers`):

```json
{
    "mcpServers": {
        "youtube-transcript-metadata-mcp": {
            "url": "https://mcp.apify.com/?actors=reminiscent_medaka/youtube-transcript-metadata-mcp",
            "headers": {
                "Authorization": "Bearer YOUR_APIFY_API_TOKEN"
            }
        }
    }
}
```

#### n8n, Make, & Zapier

- **n8n:** Import the ready-to-run workflow template from `n8n/youtube-transcript-ai-pipeline.json` in this repository, or call the Apify node / HTTP Request node against `https://api.apify.com/v2/acts/reminiscent_medaka~youtube-transcript-metadata-mcp/run-sync-get-dataset-items`.
- **Make / Zapier:** Use the **Apify -> Run an Actor** module targeting `reminiscent_medaka/youtube-transcript-metadata-mcp` and map `transcriptText`, `title`, and `tokenEstimate` straight into Notion, Slack, Pinecone, or OpenAI.

***

### Pricing & Cost Transparency

- **Pay-Per-Event (`video-transcript-extracted`):** **$0.002 per video** (`$2.00` per 1,000 videos).
- **No Data, No Charge:** Failed, private, or unplayable videos are never billed.
- **Diagnostics Included:** Inspect `RUN_DIAGNOSTICS` in the default Key-Value Store after any run to see exact counts, stop reasons, and per-video failures.

***

### Issues & Feedback

Encountered a video format edge case, caption language quirk, or feature request? Please open an issue on the Actor's **Issues** tab in Apify Console with the failing `videoId` and your `RUN_DIAGNOSTICS` summary so we can ship a fix fast.

***

### More Tools by 2Space Group

| Actor | Use Case | Pricing Model |
| --- | --- | --- |
| [`reminiscent_medaka/youtube-transcript-metadata-mcp`](https://apify.com/reminiscent_medaka/youtube-transcript-metadata-mcp) | YouTube transcripts, captions, token counts & metadata | `$0.002` / video |
| `reminiscent_medaka/reddit-thread-comments-mcp` | Reddit threads, comment trees & sentiment-ready JSON | Pay-per-event |
| `reminiscent_medaka/hackernews-stories-comments-mcp` | Hacker News stories, Ask/Show HN & nested comments | Pay-per-event |
| `reminiscent_medaka/arxiv-paper-metadata-mcp` | arXiv abstracts, authors, PDFs & citation metadata | Pay-per-event |

# Actor input Schema

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

List of YouTube video URLs (watch, youtu.be, shorts, live, embed) or 11-character video IDs to extract transcripts and metadata from.

## `channelIds` (type: `array`):

Optional list of YouTube channel IDs (e.g. UC_x5XG1OV2P6uZZ5FSM9Ttw). Fetches the latest videos from each channel's public RSS feed and extracts their transcripts and metadata.

## `preferredLanguage` (type: `string`):

BCP-47 / ISO language code to prioritize when selecting captions (e.g. 'en', 'es', 'de', 'fr'). Prefers manual captions over auto-generated ASR, and falls back to English or the first available track if unavailable.

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

When enabled, prefixes each transcript segment with its \[MM:SS] or \[HH:MM:SS] timestamp on a new line. When disabled, outputs clean continuous text ideal for LLM/RAG ingestion.

## `requireTranscript` (type: `boolean`):

When enabled, videos without captions/transcripts are skipped and NOT charged. When disabled (default), videos without captions still return full metadata with hasTranscript: false.

## `maxItems` (type: `integer`):

Hard cap on the maximum number of validated video records pushed to the dataset and charged.

## `maxCostUsd` (type: `number`):

Pre-charge budget guardrail in USD ($0.002 per extracted video). Execution stops cleanly before exceeding this cap.

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

Optional Apify Proxy or custom proxy configuration. Pure HTTP works without proxy by default; enable Apify Proxy only for very high volume runs.

## Actor input object example

```json
{
  "videoUrlsOrIds": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "jNQXAC9IVRw"
  ],
  "channelIds": [
    "UC_x5XG1OV2P6uZZ5FSM9Ttw"
  ],
  "preferredLanguage": "en",
  "includeTimestamps": false,
  "requireTranscript": false,
  "maxItems": 15,
  "maxCostUsd": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset items containing flat video metadata, transcript text, word counts, and token estimates.

## `diagnostics` (type: `string`):

Execution summary, charge ledger, and failure diagnostics stored in Key-Value Store.

# 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",
        "https://www.youtube.com/watch?v=jNQXAC9IVRw"
    ],
    "channelIds": [],
    "preferredLanguage": "en",
    "includeTimestamps": false,
    "requireTranscript": false,
    "maxItems": 15,
    "maxCostUsd": 2,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("2space/youtube-transcript-metadata-mcp").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",
        "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    ],
    "channelIds": [],
    "preferredLanguage": "en",
    "includeTimestamps": False,
    "requireTranscript": False,
    "maxItems": 15,
    "maxCostUsd": 2,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("2space/youtube-transcript-metadata-mcp").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",
    "https://www.youtube.com/watch?v=jNQXAC9IVRw"
  ],
  "channelIds": [],
  "preferredLanguage": "en",
  "includeTimestamps": false,
  "requireTranscript": false,
  "maxItems": 15,
  "maxCostUsd": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call 2space/youtube-transcript-metadata-mcp --silent --output-dataset

```

## MCP server setup

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

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/e6Bvh3ZajvujeBOH7/builds/dztEv3wWJ2RgNI53k/openapi.json
