YouTube: 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.
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" } ] }
17 fields per transcript
Every call returns them for each record, in the results of its JSON answer.
Get a video's transcript
17 fields- object
- text
- transcript
- id
- id
- The video's id on YouTube, 11 characters.
k7Rt2mVxQ4s- ids.video_id
- id
k7Rt2mVxQ4s- ids.channel_id
- id
- Its channel's id (UC...).
UCa1B2c3D4e5F6g7H8i9J0kL
What it costs
Billed by the call: 1 credit. Pick how many calls a month.
1 credit a call
Calls a month
100
Built to run
Every call counts; a day is green at 95% successful.
- Successful calls
- 100.00%
- Median call
- 2.7 s
A call fails when the site does not answer or we cannot read its answer; a wrong input is not counted.
Frequently asked questions
What people ask before calling youtube/transcripts/get.
Get a video's transcript
When do I 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.
What do I give it?
video(required): The video: its id (11 letters, digits, - or _) or any of its links (youtube.com/watch?v=..., youtu.be/..., /shorts/..., /live/..., /embed/...).
What does it return?
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. Every record has the same fields, empty ones included: they are all listed above.
Can I run it on a list?
Yes: call it once per item, or run it as a batch, on a list and every day if you like, from the button at the top of this page.
Pricing
What does a call cost?
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.
When is a call free?
- a call that fails
Errors
What can go wrong?
ip_blocked(503, retry): YouTube slowed down the IPs the call tried (429). Retry in a minute; failed calls are free.invalid_video(422):videois 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, retry): YouTube did not answer properly; retry later (not charged).unexpected_answer(424): YouTube answered in a shape we do not read yet; we are told and fix it (not charged).
How long can a call take?
30 seconds at most by default, up to 60 with timeout_s. A call past it answers timeout (408), is not charged, and can be sent again.
API and agents
Can my AI agent run it?
Yes: connect the lobstr.io MCP server (https://api.lobstr.io/v2/mcp, your API key as a Bearer token); its run_operation tool runs youtube/transcripts/get. Its page for agents, in Markdown: youtube/transcripts/get.md.
Where is its full description?
The contract, as JSON: https://api.lobstr.io/v2/catalog/youtube/transcripts/get: every option, every field, the price and the errors. This page is drawn from it.
Ready to call it?
An API key in a minute, then the call above, from your code or your agent.