Platforms/YouTube/Video transcript

YouTube Transcript API

GET ยท 1 credit

Send a video's id or link, and get its captions as one text and as timed segments, in the language you pick.

GET /v1/youtube/videos/transcript

What people use it for

  • AI summaries: send a video's text to a language model to summarize, translate or answer questions about it.
  • Search over videos: index transcripts to find the moment a topic comes up, with segments for the time.
  • Subtitles and repurposing: turn the segments into SRT or VTT, or a video into a blog post.

How it works with other endpoints

Video ids come from Channel videos, Search or a link. Video lists a video's caption tracks in captions, with the language codes this endpoint takes.

Limits

  • One video, one caption track a call.
  • A video without captions answers 404 NOT_FOUND.

Example request

const url = `${process.env.API_URL}/v1/youtube/videos/transcript?video_id=rfscVS0vtbw`;

const response = await fetch(url, {
  headers: { "x-api-key": process.env.API_KEY },
});

const { data } = await response.json();
console.log(data);

Parameters

ParameterRequiredDescription
video_idNoA video's id: the 11 characters after watch?v= or /shorts/ in its link. Give video_id or url.
urlNoA video's link: watch?v=<id>, youtu.be/<id>, or a /shorts/, /live/, /embed/ or /v/ link, on youtube.com, www., m. or music. Give video_id or url.
languageNoWhich captions: a language code as the video endpoint's captions give it, such as en or pt-BR. When left out, the captions YouTube's player shows first.
original_audioNoOnly captions in the language the video was recorded in: a dubbed video's original audio, else the language of YouTube's automatic captions. Not with language.

Example response

{
  "data": {
    "video_id": "rfscVS0vtbw",
    "language": "en",
    "auto": true,
    "text": "In this course, I'm going to teach you everything you need to know to get started programming in Python.",
    "segments": [
      {
        "start": 0,
        "end": 4.2,
        "text": "In this course, I'm going to teach you"
      },
      {
        "start": 4.2,
        "end": 8.9,
        "text": "everything you need to know to get started programming in Python."
      }
    ]
  },
  "page": null,
  "meta": {
    "platform": "youtube",
    "endpoint": "video_transcript",
    "params": {
      "video_id": "rfscVS0vtbw",
      "original_audio": false
    },
    "request_id": "sp_req_1f8c2d3e4a5b6c7d",
    "api_version": "v1",
    "fetched_at": "2026-11-30T09:30:00Z",
    "cached": false
  }
}

An illustrative answer: live answers have the same shape, with the page's current data.

Every field, with its type, is in the API reference, and every error code in Errors.

Price

Each call costs 1 credit, a not-found answer too. Cached answers and other errors cost nothing, and credits never expire. New accounts start with 100 free credits. See pricing for the packs.

FAQ

Which language do I get?

The one you pass in language, as Video's captions list it (en, pt-BR), else the captions YouTube's player shows first.

What does original_audio do?

It picks the captions in the language the video was recorded in: a dubbed video's original audio, else the language of YouTube's automatic captions. It can't be combined with language.

What if a video has no captions?

It answers 404 NOT_FOUND.

Are the captions written by the creator?

auto says which: false for captions the channel uploaded, true for YouTube's automatic ones.

Works with

On other platforms

Free tools

YouTube guides

Start free

Your first 100 credits are on us

Sign up, create a key and make your first call in a few minutes.

No credit card required