YouTube Transcript API Reference

The base URL for every endpoint below is https://transcript-yt.com. Grab a key from your dashboard first. A machine-readable OpenAPI 3.1 spec is available for code generation and agent tooling.

Quickstart

Create a key, then request a transcript by URL or video ID:

curl "https://transcript-yt.com/v1/transcript?url=5f3Pn-N6yLc" \
  -H "Authorization: Bearer ts_live_xxxx"

AI agents (MCP)

Connect TranscriptYT to Claude Code, Codex, Cursor, VS Code, or Claude Desktop through our MCP server at https://transcript-yt.com/mcp. The one-click installs sign you in; in the snippets below, replace ts_live_... with your key.

claude mcp add --transport http transcriptyt https://transcript-yt.com/mcp \
  --header "Authorization: Bearer ts_live_..."

Your agent gets these tools:

  • get_transcript: transcript by URL or ID, with optional language, translate_to, format (defaults to md), and timestamps. 1 credit.
  • summarize_video: summary, key points, and timestamped notes from a video's transcript. 2 credits for most videos, more for long ones.
  • list_languages: available caption tracks. Free.
  • list_playlist_videos: videos in a playlist or a channel's uploads. Free on paid plans; Free plan: 10 a day, then 1 credit.
  • search_youtube: search YouTube, or within one channel. Free on paid plans; Free plan: 10 a day, then 1 credit.
  • research_topic: searches YouTube for a topic and returns the transcripts of the top videos (default 5, max 10) in one call, with timestamps and links. 1 credit per transcript.
  • watch_youtube, list_watches, delete_watch: get every new video from a channel or a search phrase by email or webhook (see Watches). 1 credit per delivered transcript.
  • get_usage: remaining credits. Free.

Authentication

Pass your key as a bearer token. x-api-key also works if a header library makes that easier.

Authorization: Bearer ts_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

GET /v1/transcript

Fetch a transcript for any public YouTube video.

ParamTypeDescription
urlstring, requiredA YouTube URL (watch, youtu.be, shorts, embed) or a bare 11-char video ID.
languagestring, optionalBCP-47 code (e.g. es, pt-BR). Defaults to the original / English track. If the video has no track in that language, the original is machine-translated into it and translated is true.
translate_tostring, optionalBCP-47 target code, any of 150+ languages. Machine-translates whichever tracklanguage selects, keeping every segment's timing. The response's languagebecomes the target and translated is true.
formatstring, optionaljson (default), text, srt, vtt,csv, or md.
includeSegmentsboolean, optionalSet false to drop the timestamped array and return only full text (JSON format only).
timestampsboolean, optionalSet true to prefix each line with a [HH:MM:SS] marker intext and md output. Formatting is free, with no extra credit cost.
paragraphsboolean, optionalSet true to merge segments into paragraph-length chunks (on speech pauses or a character budget) instead of raw caption cues.
chunkSizeinteger, optionalWith paragraphs=true, the maximum characters per paragraph (50 to 10000, default 400).
captionTypestring, optionalany (default), manual for uploaded captions only, or auto for YouTube's auto-generated captions only.
originalLanguageboolean, optionalSet true to get captions in the language actually spoken instead of the English track. Ignored when language is set.
modestring, optionalauto (default) uses captions and falls back to AI transcription. captions never uses AI. ai transcribes the audio even when captions exist (billed per minute). AI transcription needs a paid plan or credit pack; on the Free plan ai returns 403 PLAN_REQUIRED, and auto AI-transcribes the first 10 minutes of one caption-less video for free (the response has previewSeconds and an X-AI-Preview-Seconds header when it is cut short), then reads captions only.
startTime / endTimenumber, optionalSeconds. Return only the part of the transcript in this range.
searchstring, optionalReturn only the lines containing this text (case-insensitive), each with its timestamp.

Also available as POST /v1/transcript with a JSON body of the same shape.

curl "https://transcript-yt.com/v1/transcript?url=https://youtu.be/5f3Pn-N6yLc" \
  -H "Authorization: Bearer ts_live_xxxx"
{
  "videoId": "5f3Pn-N6yLc",
  "title": "How To Clean Up Gmail Inbox - Fast and Easily",
  "author": "Tech is Easy",
  "channelId": "UCu7hJvEMoy36jfbJXp6heRg",
  "durationSeconds": 151,
  "language": "en",
  "translated": false,
  "autoGenerated": true,
  "source": "captions",
  "segments": [
    { "start": 0.24, "duration": 3.84, "end": 4.08, "timestamp": "0:00", "text": "in the next two to three minutes I'm" },
    { "start": 2.159, "duration": 3.481, "end": 5.64, "timestamp": "0:02", "text": "gonna show you how to clean up your" }
  ],
  "text": "in the next two to three minutes I'm gonna show you how to clean up your ...",
  "availableLanguages": [
    { "languageCode": "en", "languageName": "English (auto-generated)", "autoGenerated": true }
  ]
}

POST /v1/transcripts

Many videos in one call: 10 on Free, 25 on Micro, 50 on Starter, 200 on Growth, 500 on Scale. Send urls plus any of the options above; each video is billed and rate-limited like a single request, and one failure doesn't fail the batch. Videos beyond your per-minute rate limit come back as RATE_LIMITEDitems to retry.

curl -X POST "https://transcript-yt.com/v1/transcripts" \
  -H "Authorization: Bearer ts_live_xxxx" -H "Content-Type: application/json" \
  -d '{"urls": ["5f3Pn-N6yLc", "https://youtu.be/dQw4w9WgXcQ"], "format": "text"}'
{
  "total": 2, "succeeded": 2, "failed": 0,
  "results": [
    { "url": "5f3Pn-N6yLc", "ok": true, "cached": true, "body": "in the next two to three minutes..." },
    ...
  ]
}

JSON-format items carry a transcript object; other formats carry the file as body.

A whole playlist or channel. Send playlist (a playlist link or ID, or a channel link or @handle) instead of urls, with an optional limit (up to your plan's batch size). Channels return their newest uploads first.

curl -X POST "https://transcript-yt.com/v1/transcripts" \
  -H "Authorization: Bearer ts_live_xxxx" -H "Content-Type: application/json" \
  -d '{"playlist": "https://www.youtube.com/@mkbhd", "limit": 10, "format": "md"}'

GET /v1/playlist

List the videos in a playlist, or a channel's uploads, without fetching any transcripts. Free on paid plans and credit packs; on the Free plan, the first 10 uncached lookups a day are free, then each costs 1 credit. limit defaults to 100 (max 500).

curl "https://transcript-yt.com/v1/playlist?url=@mkbhd&limit=3" \
  -H "Authorization: Bearer ts_live_xxxx"
{
  "kind": "channel",
  "id": "UUBJycsmduvYEL83R_U4JriQ",
  "title": "Marques Brownlee",
  "videos": [
    { "videoId": "...", "title": "...", "durationSeconds": 742 },
    ...
  ],
  "truncated": true
}

Watches: /v1/watches

A watch checks a channel, or a search phrase, every hour and sends the transcript of each new video to your webhook, your email, or both. Videos already published when you create the watch are skipped. A search watch looks at videos uploaded in the last 24 hours, so brand and topic mentions arrive within about an hour. Each delivered transcript costs 1 credit; checking is free. A new upload often has no captions for a while, so it is retried hourly for up to 48 hours. With "ai": true, a video still without captions 6 hours after it appeared is AI-transcribed instead (1 credit per started minute).

Watches need a paid plan or a credit pack: Micro 5, Starter 20, Growth 100, Scale 300, credit packs 20. You can also manage them without code in the dashboard, or from an AI assistant over MCP.

curl -X POST "https://transcript-yt.com/v1/watches" \
  -H "Authorization: Bearer ts_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{ "channel": "@mkbhd", "webhook_url": "https://example.com/hooks/youtube", "email": true }'
{
  "id": "cm...",
  "kind": "channel",
  "target": "UCBJycsmduvYEL83R_U4JriQ",
  "label": "Marques Brownlee",
  "webhook_url": "https://example.com/hooks/youtube",
  "email": true,
  "ai": false,
  "paused": false,
  "secret": "whsec_...",
  "baseline_videos": 15
}

Give channel (link, ID, or @handle) or query, plus webhook_url (https), email, or both. The secret is shown only once. Manage watches with GET /v1/watches, GET /v1/watches/{id} (recent videos and their delivery status), PATCH /v1/watches/{id} (paused, webhook_url, email, ai), and DELETE /v1/watches/{id}. None of these cost credits.

Each delivery is a POST with this JSON body. Answer with any 2xx within 15 seconds. A failed delivery is retried hourly for 48 hours without charging again; after 3 days of failures the watch pauses itself.

{
  "event": "video.transcript",
  "delivered_at": "2026-11-23T10:05:12.000Z",
  "watch": { "id": "cm...", "kind": "channel", "target": "UC...", "label": "Marques Brownlee" },
  "video": {
    "id": "...", "url": "https://www.youtube.com/watch?v=...", "title": "...", "author": "...",
    "channel_id": "UC...", "duration_seconds": 742, "language": "en",
    "auto_generated": true, "source": "captions"
  },
  "transcript": { "text": "...", "segments": [{ "start": 0.4, "duration": 3.1, "text": "..." }] }
}

Verify X-TranscriptYT-Signature (sha256= plus the hex HMAC-SHA256 of the raw body, keyed with the watch secret) before trusting a delivery. X-TranscriptYT-Delivery is unique per attempt.

import crypto from "node:crypto";

function verify(rawBody, header, secret) {
  const expected = "sha256=" + crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
  return header?.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(header), Buffer.from(expected));
}

GET /v1/summary

Summary, key points, and timestamped study notes for a video, generated from its transcript. Written in the transcript's language; translate_to summarizes a translated transcript instead. Costs 1 credit for the transcript plus the summary's AI cost: 1 credit for videos up to about 25 minutes and for already-cached summaries, about 1 more per further 45 minutes of speech. Most requests cost 2 credits; X-Credits-Charged shows the total.

curl "https://transcript-yt.com/v1/summary?url=5f3Pn-N6yLc" \
  -H "Authorization: Bearer ts_live_xxxx"
{
  "videoId": "5f3Pn-N6yLc",
  "title": "...",
  "author": "...",
  "language": "en",
  "cached": { "transcript": true, "summary": false },
  "summary": "...",
  "keyPoints": ["...", "..."],
  "notes": [
    { "start": 42, "heading": "...", "bullets": ["...", "..."] },
    ...
  ]
}

GET /v1/languages

List available caption tracks for a video without downloading one, plus every language translateTo accepts. This call does not cost a credit.

curl "https://transcript-yt.com/v1/languages?url=5f3Pn-N6yLc" \
  -H "Authorization: Bearer ts_live_xxxx"
{
  "videoId": "5f3Pn-N6yLc",
  "languages": [
    { "languageCode": "en", "languageName": "English (auto-generated)", "autoGenerated": true }
  ],
  "translationLanguages": [
    { "languageCode": "af", "languageName": "Afrikaans" },
    ...
  ]
}

Output formats

format=srt, format=vtt, format=csv, andformat=md return files directly with a matching Content-Type. Pipe the response straight to a file. Every format is generated from the same underlying transcript at no extra credit cost, including timestamps and paragraphs.

Videos with no captions. When a video has no caption track, we transcribe its audio with AI speech-to-text. AI transcription covers videos up to 9 hours long; a longer caption-less video returns NO_CAPTIONS with details.too_long: true and costs nothing. The response has source: "speech_to_text" and autoGenerated: true, and costs 1 credit per started minute of audio (see the X-Credits-Charged header). Repeat requests for the same video are cache hits and cost 1 credit. language and translate_to work the same way on these transcripts. AI transcription is available on paid plans and credit packs; a Free account gets one free AI transcription (the first 10 minutes of a video), then captions only, and a caption-less video returns NO_CAPTIONS.

curl "https://transcript-yt.com/v1/transcript?url=5f3Pn-N6yLc&format=srt" \
  -H "Authorization: Bearer ts_live_xxxx" -o captions.srt

GET /v1/usage

Current plan, credit balance (plan + top-up), and rate limit. Free, never costs a credit.

curl "https://transcript-yt.com/v1/usage" \
  -H "Authorization: Bearer ts_live_xxxx"
{
  "plan": "STARTER",
  "credits_remaining": 3820,
  "plan_credits": { "total": 4000, "used": 180, "remaining": 3820 },
  "topup_credits": { "remaining": 0, "grants": [] },
  "period_resets_at": "2026-10-19T00:00:00.000Z",
  "rate_limit_per_minute": 200
}

Errors

Every error uses the same envelope, except 402 (see below):

{ "error": { "code": "NO_CAPTIONS", "message": "This video has no captions available." } }
CodeHTTPMeaning
INVALID_VIDEO400Couldn't parse a video ID from the given url
VIDEO_UNAVAILABLE404Video is private, deleted, or region-locked
NO_CAPTIONS404Video has no captions and its audio could not be AI-transcribed: over 9 hours long (details.too_long), audio unavailable, or a Free plan that has used its one free AI transcription
PLAN_REQUIRED403mode=ai on the Free plan; AI transcription needs a paid plan or credit pack
LANGUAGE_NOT_AVAILABLE404Requested language isn't offered
UNAUTHORIZED401Missing or invalid API key
RATE_LIMITED429Too many requests per minute
BLOCKED503Temporary upstream block. Retry shortly.

Out of credits is a 402 with its own flat shape rather than the error envelope above:

{
  "error": "Out of credits",
  "plan": "MICRO",
  "credits_remaining": 0,
  "upgrade_url": "https://transcript-yt.com/dashboard/billing",
  "topup_url": "https://transcript-yt.com/dashboard/billing#topup"
}

Failed requests (any 4xx/5xx from us) are never billed a credit.

Rate limits & credits

Every response carries usage headers so you can back off before hitting a wall. A 429 also carries Retry-After (seconds):

X-RateLimit-Limit: 200
X-RateLimit-Remaining: 197
X-RateLimit-Reset: 1737403200
Retry-After: 12
X-Credits-Charged: 1
X-Credits-Remaining: 3786

X-Credits-Charged is the credits billed for that call (including cache hits) and 0 on any failure. X-Credits-Remaining is your plan balance plus any purchased top-up or pack credits. See the pricing page for per-plan limits.