What is a YouTube transcript API?

A YouTube transcript API takes a public video URL and returns its caption text as structured JSON. Social Fetch's endpoint, GET /v1/youtube/videos/transcript, returns the full plain text and a list of timed segments, each with its text, start time and end time.

Glossary · Platforms

What the response actually contains

Pass a watch, youtu.be or Shorts URL as url. Add language (an ISO 639-1 code such as en) to prefer that caption track. The response has the standard Social Fetch shape, says whether a transcript was found, and includes it when it was.

Check that status before you read the transcript fields, because a 200 on its own doesn't mean text came back. When it's found, you get plainText and segments (each with text, startMs and endMs). When it's not found, the video has no caption track.

What it costs and how it works

A request costs 5 credits when a transcript is found, and the credits charged on the response are the final word. Not-found results, lookups that fail on our side and temporarily-unavailable responses are free.

The endpoint reads existing caption tracks only and doesn't do speech-to-text. A video without captions comes back as not found.

When teams reach for this

Teams use it for RAG and search indexes, brand-safety scans, and repurposing tools that need the spoken words or cue timings.

Try the free YouTube transcript tool once, then call the API with your key in the x-api-key header for batch jobs. It uses the same key as every other Social Fetch endpoint.

How this compares to other ways of getting a transcript

Community scrapers are free but break without warning. The YouTube Data API doesn't return caption text for any public video unless the uploader grants OAuth access.

Social Fetch gives you a stable, typed response, billed by credit. Its TikTok transcript endpoint reports found and not found the same way, but returns WebVTT and offers an optional AI fallback (useAiFallback). The YouTube endpoint has no AI fallback.

Common mistakes

Expecting the language parameter to translate. It only prefers a track. If that language isn't available, you get not found or another available track.

Retrying a not-found result. It's charged again and won't create captions.

Expecting speech-to-text from the audio. This endpoint reads existing caption tracks only.

Questions. Short answers.

How do I get a YouTube transcript via API?

Call GET /v1/youtube/videos/transcript on Social Fetch with your API key in the x-api-key header and the video's url. Check that the transcript was found, then read plainText or segments.

Does the YouTube transcript API need an API key?

Yes. Send your Social Fetch API key in the x-api-key header for REST and the SDK, or sign in with OAuth through the hosted MCP server. The API can't be called anonymously.

Is this the same as the free YouTube transcript tool?

Social Fetch's free YouTube transcript tool runs the same lookup by hand, with no key. You can link straight to a video with /tools/youtube-transcript?v=VIDEO_ID. For production and batch jobs, use the API with your key.

How much does the YouTube transcript endpoint cost?

5 credits when a transcript is found. Not-found results, lookups that fail on our side and temporarily-unavailable responses aren't charged.

Can I request a transcript in a specific language?

Yes. Pass language as an ISO 639-1 code, and Social Fetch prefers that caption track if it exists. It doesn't translate.

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

Any public video that already has a caption track. The uploader doesn't need to authorize anything.

Does it generate captions if a video has none?

No. Social Fetch's YouTube endpoint reads existing caption tracks only, so a video without captions comes back as not found.

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

Both report found and not found the same way. The YouTube endpoint returns plain text and timed segments from existing captions only. The TikTok endpoint returns WebVTT and offers an optional AI fallback (useAiFallback).

Try it on real data.

100 free credits when you sign up, no card needed. Make your first request in the Playground.

No credit cardSign up in 30 seconds withGoogleGitHub