Get a video's transcript
The transcript of a YouTube video, line by line with when each is said, by chapter, and its whole text: as the video's "Show transcript" panel gives it.
youtube/transcripts/get1 credit a callv1.0.0When to use it
You need what is said in a YouTube video, from its id or any of its links: every line of its transcript with the moment it starts and ends (to quote, summarize, search or cite a moment), the chapter it belongs to, and the whole text at once. The transcript is the one the video's page shows: its author's captions in the video's language when it has them, else YouTube's own, made from its speech (is_auto_generated). For the video itself (its title, views, chapters, captions languages), use youtube/videos/get; its comments, youtube/comments/list.
Try it
The options on the left write the call; the answer on the right is the contract's example. With your API key, the same call returns live data.
curl https://api.lobstr.io/v2/run \ -H "Authorization: Bearer $LOBSTR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "source": "youtube", "operation": "transcripts/get", "options": { "video": "https://www.youtube.com/watch?v=k7Rt2mVxQ4s" } }'
An example answer. Run it on your own input.
{ "object": "run", "id": "run_uc2f3mnigiu6ilxm6gscbakpeq", "livemode": true, "source": "youtube", "operation": "transcripts/get", "version": "1.0.0", "schema_url": "https://api.lobstr.io/v2/catalog/youtube/transcripts/get", "options": { "video": "https://www.youtube.com/watch?v=k7Rt2mVxQ4s" }, "fields": null, "status": "succeeded", "count": 1, "has_more": false, "next": null, "cost": { "credits": 1 }, "results": [ { "object": "transcript", "id": "k7Rt2mVxQ4s", "ids": { "video_id": "k7Rt2mVxQ4s", "channel_id": "UCa1B2c3D4e5F6g7H8i9J0kL" }, "url": "https://www.youtube.com/watch?v=k7Rt2mVxQ4s", "title": "Sourdough for Beginners, Step by Step", "channel": { "id": "UCa1B2c3D4e5F6g7H8i9J0kL", "title": "Acme Kitchen", "handle": "@acmekitchen", "url": "https://www.youtube.com/@acmekitchen" }, "language": "en", "is_auto_generated": true, "chapters": [ { "title": "Intro", "start_ms": 0 }, { "title": "The starter", "start_ms": 135000 } ], "segments": [ { "start_ms": 0, "end_ms": 3840, "timestamp": "0:00", "text": "Hi, and welcome back to the kitchen.", "chapter": "Intro" }, { "start_ms": 135000, "end_ms": 141220, "timestamp": "2:15", "text": "A starter is just flour and water, given time.", "chapter": "The starter" } ], "text": "Hi, and welcome back to the kitchen.\nA starter is just flour and water, given time.", "source_url": "https://www.youtube.com/watch?v=k7Rt2mVxQ4s", "observed_at": "2026-12-03T12:00:00Z" } ] }
Options
videostringrequiredRecord
Each record of results, in the envelope every call returns (Run an operation).
objectstringidstringids.video_idstringids.channel_idstringurlstringtitlestringchannel.idstringchannel.titlestringchannel.handlestringchannel.urlstringlanguagestringis_auto_generatedbooleanchapterslistsegmentslisttextstringsource_urlstringobserved_atdateErrors
Its own, besides those of every call (Errors). A failed call is free.
| Code | Status | What it means |
|---|---|---|
ip_blocked | 503 | YouTube slowed down the IPs the call tried (429). Retry in a minute; failed calls are free. Retryable. |
invalid_video | 422 | video is a YouTube video: its id (dQw4w9WgXcQ) or one of its links (https://www.youtube.com/watch?v=dQw4w9WgXcQ, https://youtu.be/dQw4w9WgXcQ, a /shorts/ link). |
video_unavailable | 404 | YouTube has no such video (removed, private, or never one). Not charged. |
transcript_unavailable | 404 | The video has no transcript on YouTube: no captions of its author's, and none YouTube made (music without words, a video too new or in a language YouTube does not transcribe). Not charged. |
site_unavailable | 503 | YouTube did not answer properly; retry later (not charged). Retryable. |
unexpected_answer | 424 | YouTube answered in a shape we do not read yet; we are told and fix it (not charged). |
Price
1 credit a call, one video's whole transcript, however long. A video without a transcript, one that does not exist and a failed call are free. What a credit costs on each plan: Credits and pricing.
Changelog
1.0.02026-12-03