QuickTube

YouTube Transcript API

Send a YouTube URL, get the transcript back as JSON: timestamped segments plus the full plain text, with the caption language and whether YouTube generated it automatically. One endpoint, one header, 1 credit per transcript.

Get started in three steps

  1. 1

    Create a free account

    New accounts get 400 credits once you verify your email, enough for 400 transcripts.

  2. 2

    Create an API key

    In Settings → API Keys. New keys include the transcript and ai scopes, so one key covers transcripts, summaries, quizzes and chat.

  3. 3

    Call POST /api/transcript

    Send the key in the X-API-Key header and the video URL in a JSON body.

What the API returns

Timestamped segments

transcript is an array of { text, start, duration } in seconds, ready for subtitles, search or chunking.

Plain text

text is the whole transcript joined into one string, ready to hand to a language model.

Language metadata

language, language_code and is_generated tell you which caption track you got and whether it was auto-generated.

Language preference

Pass languages, e.g. ["en", "es"], to say which tracks you want in order. "en" also matches regional variants such as en-US.

Fetch a transcript with curl

The only required field is video_url. It accepts youtube.com/watch, youtu.be, Shorts and embed links, or a bare 11-character video ID.

Request
curl -X POST https://quicktube.ai/api/transcript \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $QUICKTUBE_API_KEY" \
  -d '{"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'
Response (shortened)
{
  "video_id": "dQw4w9WgXcQ",
  "language": "English",
  "language_code": "en",
  "is_generated": false,
  "transcript": [
    { "text": "first caption line", "start": 0.0, "duration": 3.5 },
    { "text": "second caption line", "start": 3.5, "duration": 2.8 }
  ],
  "text": "first caption line\nsecond caption line"
}

Fetch a transcript in Python

Any HTTP client works; this uses requests. Store the key in an environment variable rather than in code.

transcript.py
import os
import requests

response = requests.post(
    "https://quicktube.ai/api/transcript",
    headers={"X-API-Key": os.environ["QUICKTUBE_API_KEY"]},
    json={"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "languages": ["en", "es"]},
    timeout=60,
)
response.raise_for_status()
data = response.json()

print(data["language"], data["language_code"])
for segment in data["transcript"][:5]:
    print(f"{segment['start']:8.2f}s  {segment['text']}")

Errors to handle

Errors come back as JSON with a detail message and one of these status codes:

  • 422: the request body is invalid, for example video_url is not a YouTube video link.
  • 402: your account is out of credits.
  • 403: the API key lacks the transcript scope, or the video is age-restricted.
  • 404: the video is unavailable or has no captions in the languages you asked for.
  • 429: you hit the rate limit; wait and retry.
  • 503: YouTube temporarily refused the request; retry later.

Go beyond the transcript

The same key calls QuickTube’s AI endpoints: /api/summarize (5 credits), /api/best-sections for highlights (5), /api/quiz (5), /api/fact-check (5), /api/characters for speaker detection (3) and /api/chat (1 per message). They need the ai scope. Each takes the video URL and fetches the transcript for you.

Summarize a video
curl -X POST https://quicktube.ai/api/summarize \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $QUICKTUBE_API_KEY" \
  -d '{"video_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'

Pricing

A transcript costs 1 credit, whether it is fetched fresh from YouTube or served from QuickTube’s cache. Credits come with your account and in one-time packs, with no subscription or monthly minimum. Transcripts in the web app stay free.

Frequently asked questions

How much does the YouTube transcript API cost?

Each transcript fetched with an API key costs 1 credit, including transcripts served from cache. AI endpoints cost the same as in the web app, for example 5 credits for a summary. A free account comes with 400 credits once your email is verified, and more are sold as one-time packs with no subscription.

Does it work with videos in other languages?

Yes. QuickTube uses the captions in whatever language the video has them, preferring English when an English track exists. It does not translate them. Quizzes are written in the language of the transcript. Through the API you can ask for specific languages in order of preference.

What if a video has no captions?

QuickTube reads the captions YouTube already has, either uploaded by the creator or generated automatically. It does not transcribe audio itself, so a video with captions turned off can't be transcribed or analyzed.

Can AI agents use QuickTube?

Yes. QuickTube has a REST API and an MCP (Model Context Protocol) server, installable with "pip install quicktube-mcp", that let tools such as Claude Code and Claude Desktop fetch transcripts, summarize videos and generate quizzes. Fetching a transcript through the API costs 1 credit.