YouTube Transcript API on Apify

Public captions and timestamps.
API, Python, RAG, or MCP.

Extract available public YouTube caption tracks as transcript text plus optional timestamped segments. Run in Apify Console, call the Actor API, export the Dataset, or connect it as an MCP tool for AI agents.

Public captions, not audio transcriptionTimestamp segments when availablePay per event on Apify
What it does

Use a hosted transcript workflow instead of maintaining your own scraper.

The Actor accepts public YouTube watch URLs, Shorts URLs, live/embed links, youtu.be links, or 11-character video IDs. For videos with accessible captions it can return full transcript text, timestamped caption segments, language information, caption-track details, video metadata, and the source URL.

Research

Collect transcript text for summarization, analysis, semantic search, and content indexing.

Timestamp-aware RAG

Preserve source timing so answers can point back to the relevant moment in a video.

Automation

Use Apify API, schedules, webhooks, Make/n8n, or your own orchestration.

Dataset export

Consume the resulting default Dataset through API or export it through Apify.

API example

Start a transcript run with curl.

curl -X POST \
  "https://api.apify.com/v2/acts/signal_lab~youtube-transcript-scraper/runs" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": ["dQw4w9WgXcQ"],
    "preferredLanguages": ["en"],
    "preferManual": true,
    "includeSegments": true,
    "maxVideos": 10
  }'

The response contains Actor run metadata. Read the run's default Dataset after completion to retrieve transcript rows.

Python

YouTube Transcript API with Python.

import os
import requests

actor = "signal_lab~youtube-transcript-scraper"
url = f"https://api.apify.com/v2/acts/{actor}/runs"

response = requests.post(
    url,
    headers={
        "Authorization": f"Bearer {os.environ['APIFY_TOKEN']}",
        "Content-Type": "application/json",
    },
    json={
        "urls": ["dQw4w9WgXcQ"],
        "preferredLanguages": ["en"],
        "preferManual": True,
        "includeSegments": True,
        "maxVideos": 10,
    },
    timeout=30,
)
response.raise_for_status()
print(response.json())
LangChain / RAG

Use the Dataset as your ingestion layer.

  1. Run the Actor for one or more public videos.
  2. Fetch Dataset rows through the Apify API.
  3. Keep transcript text, source URL, language, and timestamps.
  4. Chunk/embed with LangChain, LlamaIndex, your vector database, or a custom RAG pipeline.

No LangChain-specific adapter is required. Timestamped segments are useful when generated answers need source timing.

MCP

Connect the YouTube Actor directly to an AI client.

Signal Lab is published in the Official Model Context Protocol Registry as io.github.VZezelin/signal-lab-apify-tools. For a focused YouTube-only connection, use Apify's hosted MCP endpoint:

{
  "mcpServers": {
    "signal-lab-youtube": {
      "url": "https://mcp.apify.com?tools=signal_lab/youtube-transcript-scraper"
    }
  }
}

Apify authentication is required. The endpoint does not embed or expose Signal Lab owner credentials.

Limits

What this API does not promise.

  • It extracts available public caption tracks; it is not speech-to-text for videos with no accessible captions.
  • Caption availability can be affected by upstream YouTube behavior, language coverage, removal, regional availability, or other restrictions.
  • The current input schema supports bounded runs with maxVideos; account-level API/run concurrency and usage limits depend on Apify settings.
  • Pricing can change. Use the live Actor Pricing tab as the source of truth before running.
Buyer questions

Common YouTube Transcript API questions.

Is this a free YouTube transcript API?

The Actor uses Apify Pay per event pricing. Apify credits and plan allowances may reduce a user's out-of-pocket cost, but this page does not promise permanently free usage.

Can I download a transcript with timestamps?

When an accessible caption track is available, enable timestamped segments and retrieve the resulting Dataset through Apify.

Can I use it from Python?

Yes. Start the Actor through the Apify REST API, then fetch the default Dataset after the run finishes.

Can I use it for LangChain or RAG?

Yes. Use transcript rows as ingestion data and preserve source URLs and timestamps before chunking and embedding them in your preferred stack.

Does it bypass unavailable or blocked captions?

No. It is designed for accessible public caption tracks and does not claim to bypass YouTube restrictions.

Start with a real run

Open the live YouTube Transcript Actor.

Inspect current input and Pricing on Apify, then run only the public videos you are authorized to process.