← All glossary terms

What is a YouTube transcript API?

A YouTube transcript API takes a public video URL and returns caption text as structured JSON. Social Fetch: GET /v1/youtube/videos/transcript — on found, data.transcript.plainText and data.transcript.segments (text, startMs, endMs).

What the response actually contains

Pass watch, youtu.be, or Shorts URL as url. Optional language (ISO 639-1, e.g. en) prefers that track. Returns { data, meta } with lookupStatus plus transcript when found.

Check data.lookupStatus before transcript fields — 200 alone doesn't mean text arrived. found → plainText + segments; not_found → no caption track.

What it costs and what it doesn't do

1 credit per successful request — meta.creditsCharged is source of truth. found and not_found both bill; lookup_failed and 503 don't.

Reads existing caption tracks only — no speech-to-text. No captions → lookupStatus not_found.

When teams reach for this

RAG/search indexes, brand-safety scans, repurposing tools that need spoken words or cue timestamps.

Try /tools/youtube-transcript once, then API with x-api-key for batch jobs. Same YouTube tag and key as other routes.

How this compares to other ways of getting a transcript

Community scrapers: free but break without warning. YouTube Data API: no arbitrary public caption text without uploader OAuth.

Social Fetch: stable typed response, metered by credit. TikTok transcript shares lookupStatus but returns WebVTT with optional useAiFallback — YouTube has no AI fallback.

Common mistakes

language param prefers a track — doesn't translate. Missing language → not_found or another available track.

Retrying not_found — billed again, won't create captions.

Expecting speech-to-text from audio — this endpoint reads existing tracks only.

FAQ

How do I get a YouTube transcript via API?

GET /v1/youtube/videos/transcript with x-api-key and url param. Check lookupStatus, read plainText or segments.

Does the YouTube transcript API need an API key?

Yes — x-api-key on REST/SDK, or OAuth via hosted MCP. No anonymous access.

Is this the same as the free YouTube transcript tool?

/tools/youtube-transcript runs the same lookup for manual use. Production/batch → API with your key.

How much does the YouTube transcript endpoint cost?

1 credit per successful request (found or not_found). lookup_failed and 503 don't charge.

Can I request a transcript in a specific language?

Optional language as ISO 639-1 — prefers that track if it exists. No translation.

Does this work on any YouTube video, or only ones I own?

Any public video with an existing caption track — no uploader auth required.

Does it generate captions if a video has none?

No — reads existing tracks only. No captions → not_found.

How is this different from Social Fetch's TikTok transcript API?

Same lookupStatus envelope. YouTube: plainText + segments from existing captions only. TikTok: WebVTT + optional useAiFallback.