> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/youtube/videos-transcript>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/youtube/videos-transcript.mdx>

---

# YouTube transcript API

Pull existing YouTube captions as full plainText plus millisecond-timed segments — watch links, youtu.be, and Shorts in one Social Fetch envelope.

`GET /v1/youtube/videos/transcript` accepts a public video `url` (watch, `youtu.be`, Shorts). On a found lookup, `data.transcript` includes `plainText`, `language` (when reported), and `segments` (`text`, `startMs`, `endMs`). `data.video` carries the resolved id and URL. Pass optional `language` as a two-letter ISO 639-1 code when multiple caption tracks exist and you prefer one, or `originalAudio=true` to only accept captions in the video's original spoken language (this overrides `language`; `data.transcript` is null when no such track exists). Branch on `data.lookupStatus` (`found` / `not_found` / `lookup_failed`) before you write rows — HTTP 200 alone does not mean text arrived.

This route reads existing captions. It does not run speech-to-text when no track exists, and there is no `useAiFallback` query (unlike TikTok). A completed `not_found` means no usable track for that URL. Pricing is on the credit badge; bill from `meta.creditsCharged`. For channel metadata or upload lists, use the channel and channels/videos routes under the same YouTube tag.

## Request

- **Endpoint:** `GET /v1/youtube/videos/transcript`
- **Credits:** 1 credit when a transcript is found
Free when a transcript is unavailable
- **Input:** video URL
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/youtube/videos/transcript/get)
- **Platform page:** [/platforms/youtube](https://www.socialfetch.dev/platforms/youtube)

## 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`. Read `data.lookupStatus`, then `data.transcript.plainText` or `data.transcript.segments`. See the API docs for parameters and examples.

### How much does the YouTube transcript endpoint cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged — that field is the billing source of truth.

### What does the YouTube transcript response look like?

When found, `data.transcript` includes `plainText` (full string), `language` when reported, and `segments` (`text`, `startMs`, `endMs`). `data.video` carries the resolved video id and URL. Always branch on `data.lookupStatus` before treating the transcript as present.

### Can I prefer a language for YouTube 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.

### What URL formats does the YouTube transcript API accept?

Public YouTube video URLs: standard watch links, `youtu.be` short links, and Shorts URLs. Pass one `url` per request.

### Does this run speech-to-text when YouTube has no captions?

No. This route returns caption tracks when they exist. There is no `useAiFallback` path. If captions are missing, expect `not_found` (or a null transcript) rather than generated speech.

### Does a completed YouTube transcript lookup always return text?

No. `data.lookupStatus` of `not_found` means the lookup finished and no transcript was available. You still pay for a completed successful request when the operation documents that charge. Persist `meta.requestId` when you need to debug a miss.
