What is a YouTube transcript API?
A YouTube transcript API takes a public YouTube video URL and returns caption text as structured JSON. Social Fetch exposes GET /v1/youtube/videos/transcript: on a found lookup, data.transcript.plainText is the full string and data.transcript.segments lists text, startMs, and endMs per line.
What the response contains
Pass a watch link, youtu.be short link, or Shorts URL. Optional language (two-letter ISO 639-1) prefers that caption track when it exists. Branch on data.lookupStatus before treating the transcript as present — HTTP 200 alone does not mean text arrived.
Cost is 1 credit per successful request as documented on the operation. Confirm with meta.creditsCharged. This route does not run speech-to-text when captions are missing; not_found means no track was available for that URL.
When teams use it
RAG pipelines, sponsorship scanners, and repurposing tools need the words spoken on a video, not a watch-page HTML dump. Timed segments help when you cite a line in a player UI; plainText helps when you embed the full script.
Try one URL in the free tool, then call the API with x-api-key for batch jobs. Channel and video routes sit under the same YouTube tag and API key.
FAQ
How do I get a YouTube video transcript via API?
Call GET /v1/youtube/videos/transcript with your Social Fetch API key (x-api-key) and a public video url query param. Read data.lookupStatus, then data.transcript.plainText or data.transcript.segments. Full parameters are in the API docs.
How much does the YouTube transcript endpoint cost?
1 credit per successful request, as documented on the operation. Check meta.creditsCharged on each response — that field is the billing source of truth.
Can I prefer a language for captions?
Yes. Pass optional language as a two-letter ISO 639-1 code (for example en). Social Fetch prefers that track when it exists. There is no guarantee the creator uploaded captions in that language.
Is this the same as TikTok transcripts?
Both use data.lookupStatus and the shared success envelope. YouTube returns plainText plus timed segments. TikTok returns WebVTT when a caption track exists and has an optional useAiFallback path — YouTube does not.