Skip to content
OperationsYouTube

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.0

When 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.

1Request
The video: its id (11 letters, digits, - or _) or any of its links (youtube.com/watch?v=..., youtu.be/..., /shorts/..., /live/..., /embed/...).
1 credit a call
Code, from the fields above
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"
    }
  }'
2Response

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

videostringrequired
The video: its id (11 letters, digits, - or _) or any of its links (youtube.com/watch?v=..., youtu.be/..., /shorts/..., /live/..., /embed/...).

Record

Each record of results, in the envelope every call returns (Run an operation).

objectstring
idstring
The video's id on YouTube, 11 characters.
ids.video_idstring
ids.channel_idstring
Its channel's id (UC...).
urlstring
The video's page.
titlestring
The video's title.
channel.idstring
channel.titlestring
channel.handlestring
Its @handle.
channel.urlstring
Its page.
languagestring
The transcript's language code (en, de...), the one the page shows.
is_auto_generatedboolean
Made by YouTube from the video's speech, not written by its author.
chapterslist
The video's chapters, as the transcript groups its lines; empty for a video without.
segmentslist
The lines of the transcript, in order.
textstring
The whole transcript, its lines apart.
source_urlstring
The video's page on youtube.com.
observed_atdate

Errors

Its own, besides those of every call (Errors). A failed call is free.

CodeStatusWhat it means
ip_blocked503YouTube slowed down the IPs the call tried (429). Retry in a minute; failed calls are free. Retryable.
invalid_video422video 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_unavailable404YouTube has no such video (removed, private, or never one). Not charged.
transcript_unavailable404The 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_unavailable503YouTube did not answer properly; retry later (not charged). Retryable.
unexpected_answer424YouTube 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
First version: a video's transcript by its id or any of its links, signed out, as its page's panel shows it: every line with when it starts and ends and its chapter, the chapters, the whole text, its language and whether YouTube made it.