# YouTube Transcript API & MCP Server (`lexxer/transcriptpack-youtube-transcripts`) Actor

Low-cost YouTube transcript API for MCP tools: videos, Shorts, playlists, and channels with no YouTube API key. $0.0009 per successful transcript; failures are free.

- **URL**: https://apify.com/lexxer/transcriptpack-youtube-transcripts.md
- **Developed by:** [Lexxer ​](https://apify.com/lexxer) (community)
- **Categories:** Videos, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 successful transcripts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

Created by **Lexxer**.

## YouTube Transcript API & MCP Server

TranscriptPack is a low-cost YouTube transcript API for Apify Console, REST clients, automations, and MCP-connected tools. It handles public videos, Shorts, playlists, and channels without requiring a YouTube API key.

Get useful text instead of hundreds of tiny caption fragments. Choose the formats you need and receive predictable results for research, search, subtitles, RAG, and software workflows.

### Why use TranscriptPack?

- **Pay only for successful transcripts** — unavailable, empty, and captionless videos are free.
- **Ready-to-use output** — normalized text, readable paragraphs, timestamps, and deterministic chunks with overlap.
- **Bulk sources** — process individual videos, Shorts, playlists, or complete channel pages.
- **Reliable caption access** — direct access is tried first, with residential fallback when YouTube blocks data-center traffic.
- **Multiple export formats** — plain text, Markdown, SRT, WebVTT, segments, paragraphs, and chunks.
- **Built for automation** — stable fields, clear error codes, content hashes, and an OpenAPI-documented endpoint.
- **Native MCP tool** — connect any Streamable HTTP MCP client and call `get_youtube_transcripts` directly.

### Pricing

**$0.0005 per successfully delivered transcript — $0.50 per 1,000.**

There is no start fee and failed transcripts are not charged. Apify platform usage is billed separately by Apify and may include compute, storage, transfer, and residential proxy traffic when fallback is needed.

### Quick start

Send a `POST` request to `/v1/transcripts` with a video URL:

```json
{
  "startUrls": [
    "https://www.youtube.com/watch?v=neabI31ofMc"
  ],
  "languages": ["en"],
  "formats": ["text", "chunks", "markdown"],
  "maxVideos": 1,
  "proxyMode": "residential-fallback"
}
```

Use the **Endpoints** tab to try the API directly or copy the generated request for your application.

### Connect with MCP

TranscriptPack exposes a native Streamable HTTP MCP server at:

```text
https://lexxer--transcriptpack-youtube-transcripts.apify.actor/mcp
```

Authenticate with your Apify API token as a Bearer token. MCP clients discover one focused tool: `get_youtube_transcripts`.

You can also find TranscriptPack through Apify's hosted MCP server and call `lexxer/transcriptpack-youtube-transcripts:get_youtube_transcripts`.

### What you receive

Each successful result can include:

- video ID, URL, title, author, and thumbnail;
- selected caption language and translation details;
- normalized transcript text;
- timestamped caption segments;
- readable timestamped paragraphs;
- deterministic chunks with configurable size and overlap;
- Markdown, SRT, and WebVTT exports;
- word, character, and snippet counts;
- a SHA-256 content hash for caching and change detection;
- proxy usage information.

Only the formats you request are returned, keeping responses compact.

### Process playlists and channels

Provide several source URLs in one request or use a playlist or channel page. TranscriptPack resolves the videos, removes duplicates, applies the global `maxVideos` limit, and returns one structured result per video.

```json
{
  "startUrls": [
    "https://www.youtube.com/playlist?list=PLBkiWvdL-IJa8NvXNuJpKiUEwQ5UHHw8t"
  ],
  "languages": ["en", "de"],
  "formats": ["text", "chunks"],
  "maxVideos": 25,
  "concurrency": 3
}
```

### Common uses

- Build a searchable YouTube knowledge base.
- Prepare videos for RAG and embedding pipelines.
- Summarize long videos, playlists, or channel archives.
- Export subtitles as SRT or WebVTT.
- Monitor transcript changes with content hashes.
- Feed research and content-analysis workflows.
- Collect multilingual captions using YouTube-provided translations.

### Smart access modes

- `residential-fallback` — recommended; tries direct access first and falls back only when needed.
- `direct` — lowest platform usage, but more likely to be blocked by YouTube.
- `residential` — uses residential access immediately for maximum consistency.

An optional two-letter country code can target residential traffic to a specific country.

### Supported content

- Public YouTube videos and Shorts
- Public playlists and channel pages
- Manual and auto-generated captions
- YouTube-provided caption translations
- Up to 500 resolved videos per request

TranscriptPack uses existing YouTube captions. It does not transcribe audio, access private videos, bypass account restrictions, or guarantee captions for unavailable, age-restricted, or captionless content.

### Responsible use

Use TranscriptPack only for content you may lawfully process. Caption accuracy varies, and users are responsible for their inputs and downstream use.

# Actor input Schema

## `startUrls` (type: `array`):

Public video, Shorts, playlist, or channel URLs. Raw 11-character video IDs are also accepted through the API.

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

Language codes in priority order, for example en, de, or en-US.

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

Optional YouTube translation language code. Translation only works when the chosen caption track supports it.

## `formats` (type: `array`):

Choose only what you need to keep dataset rows compact.

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

Add the title, channel, channel URL, and thumbnail when YouTube provides them.

## `maxVideos` (type: `integer`):

Safety limit across all supplied sources.

## `concurrency` (type: `integer`):

Keep this low to reduce YouTube blocking risk. The default is intentionally conservative.

## `chunkSizeCharacters` (type: `integer`):

Approximate maximum chunk length. This is deterministic character-based chunking, not model-specific token counting.

## `chunkOverlapCharacters` (type: `integer`):

Approximate context repeated between neighboring chunks. Must be smaller than chunk size.

## `preserveFormatting` (type: `boolean`):

Retain supported basic caption formatting where available.

## `proxyMode` (type: `string`):

Residential proxy use is enforced only for customer-paid Standby PPE. Fallback tries direct access first to reduce the customer's proxy bill.

## `proxyCountryCode` (type: `string`):

Optional two-letter country code such as US, DE, or AT. Leave empty for Apify's default residential pool.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=neabI31ofMc"
    }
  ],
  "languages": [
    "en"
  ],
  "formats": [
    "text",
    "chunks",
    "markdown"
  ],
  "includeMetadata": true,
  "maxVideos": 25,
  "concurrency": 3,
  "chunkSizeCharacters": 6000,
  "chunkOverlapCharacters": 300,
  "preserveFormatting": false,
  "proxyMode": "residential-fallback"
}
```

# Actor output Schema

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

One row per resolved video. Only succeeded transcript rows are billable events.

## `summary` (type: `string`):

Counts of sources, resolved videos, successes, failures, and billable events.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.youtube.com/watch?v=neabI31ofMc"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lexxer/transcriptpack-youtube-transcripts").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 = { "startUrls": [{ "url": "https://www.youtube.com/watch?v=neabI31ofMc" }] }

# Run the Actor and wait for it to finish
run = client.actor("lexxer/transcriptpack-youtube-transcripts").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 '{
  "startUrls": [
    {
      "url": "https://www.youtube.com/watch?v=neabI31ofMc"
    }
  ]
}' |
apify call lexxer/transcriptpack-youtube-transcripts --silent --output-dataset

```

## MCP server setup

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

```

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/g4kWYLgKjbOSH30qB/builds/i7zUWxOHlkUECI9A3/openapi.json
