Skip to main content
YouTube transcripts

YouTube Transcript API
timed lines and full text

Send a video link and get its transcript as data: every caption line with its start time and duration, the whole text in one string, the language, and whether YouTube generated it automatically. Ask for another language with one parameter.

You sendwww.youtube.com/watch?v=aircAruvnKk
Timed linesFull text1 credit
You get back (real run, trimmed)
{
"title": "But what is a neural network? | Deep learning chapter 1",
"transcript": {
"language": "en",
"isAutoGenerated": false,
"segmentCount": 286,
"segments": [
{
"start": 4.22,
"duration": 1.18,
"text": "This is a 3."
},
{
"start": 6.06,
"duration": 4.65,
"text": "It's sloppily written and rendered at an extremely low resolution of 2…"
},
{
"start": 10.71,
"duration": 3.01,
"text": "but your brain has no trouble recognizing it as a 3."
},
"… 283 more"
]
}
}
13 of 13

videos with captions returned a transcript in live tests

15,121

timed lines from one full-length course, in one response

1 credit

per video, transcript included

$0

for a page that can't be delivered

Which links return a transcript

Any link to a single video works, as long as the video has captions.

Watch links

The standard video link. The transcript comes with the video's title, duration and chapters.

youtube.com/watch?v=aircAruvnKk

Short and embed links

youtu.be share links and embed links resolve to the same video and transcript.

youtu.be/aircAruvnKk

Shorts

Shorts with captions return a transcript too, usually YouTube's auto-generated one.

youtube.com/shorts/R6yNUnRXZ64

Past live streams

Streams that have ended return their captions like any video. Streams live right now have none yet.

youtube.com/live/49-rK7SAfQk

A chosen language

Add YouTube's own cc_lang_pref parameter to ask for a caption language the video has.

youtube.com/watch?v=aircAruvnKk&cc_lang_pref=es

Many videos at once

Send a list of links in one batch, for example every video from a channel tab or a playlist.

"urls": [{ "url": "..." }, { "url": "..." }]

One call, every field

Point the scrape call at a YouTube link. With JSON output and no prompt, the data comes back as it is, for 1 credit and no AI cost.

Ask for markdown instead and you get the readable page as text. The structured data still comes back, in its own structuredData field next to the markdown.

import { SpidraClient } from "spidra";
 
const spidra = new SpidraClient({
apiKey: process.env.SPIDRA_API_KEY,
});
 
const result = await spidra.scrape({
urls: [{ url: "https://www.youtube.com/watch?v=aircAruvnKk" }],
output: "json",
});
 
const data = result.content;
if (data.transcript) console.log(data.transcript.text);
else console.log(data.transcriptNote);
What you get in the transcript
Timed lines
Each caption line as start and duration in seconds, with its text
Full text
Every line joined into one string, ready for search or a model
Language
The language code and name of the captions returned
Caption type
isAutoGenerated: true for YouTube's speech recognition, false for captions the uploader added
Line count
segmentCount, so you can size a job before you process it
All languages
captionLanguages: every caption track on the video, with code, name and auto or not
Note
transcriptNote says why a transcript is missing, or that the language you asked for wasn't there
Context
The video's title, channel, duration, chapters and description in the same response

What comes back

Real responses from Spidra, trimmed for length. Nothing here is mocked up.

Request
https://www.youtube.com/watch?v=aircAruvnKk

Every video page includes the transcript when the video has captions: timed lines and the full text.

Response (real run, October 18, 2026, trimmed)
{
"id": "aircAruvnKk",
"title": "But what is a neural network? | Deep learning chapter 1",
"duration": "18:40",
"captionLanguages": [
{
"languageCode": "ar",
"name": "Arabic",
"isAutoGenerated": false,
"isTranslatable": true
},
{
"languageCode": "bn",
"name": "Bangla",
"isAutoGenerated": false,
"isTranslatable": true
},
{
"languageCode": "zh",
"name": "Chinese",
"isAutoGenerated": false,
"isTranslatable": true
},
{
"languageCode": "zh-CN",
"name": "Chinese (China)",
"isAutoGenerated": false,
"isTranslatable": true
},
"… 27 more"
],
"transcript": {
"language": "en",
"languageName": "English",
"isAutoGenerated": false,
"segmentCount": 286,
"segments": [
{
"start": 4.22,
"duration": 1.18,
"text": "This is a 3."
},
{
"start": 6.06,
"duration": 4.65,
"text": "It's sloppily written and rendered at an extremely low resolution of 28x28 pixels,"
},
{
"start": 10.71,
"duration": 3.01,
"text": "but your brain has no trouble recognizing it as a 3."
},
{
"start": 14.34,
"duration": 2.22,
"text": "And I want you to take a moment to appreciate how"
},
"… 282 more"
],
"text": "This is a 3. It's sloppily written and rendered at an extremely low resolution of 28x28 pixels, but your brain has no trouble recognizing it as a 3. And I want you to take a moment to appreciate how crazy it is that brains can do this so effortlessly. I mean, this, this and this are also recognizabl…"
}
}

Timed lines when you need the moment, full text when you need the words

Every transcript comes in two forms. segments keeps YouTube's caption lines with start and duration in seconds, so you can link to the exact moment (add &t=14s to the video link), build subtitles, or split the transcript by chapter.

text is the same transcript as one plain string. Use it for full-text search, keyword counts, or as the input to a language model, where the timings would only take up space.

3Blue1Brown, "But what is a neural network?" (real run, trimmed)
"transcript": {
"language": "en",
"languageName": "English",
"isAutoGenerated": false,
"segmentCount": 286,
"segments": [
{ "start": 4.22, "duration": 1.18, "text": "This is a 3." },
{
"start": 6.06,
"duration": 4.65,
"text": "It's sloppily written and rendered at an extremely low resolution of 28x28 pixels,"
},
{
"start": 10.71,
"duration": 3.01,
"text": "but your brain has no trouble recognizing it as a 3."
}
]
}

Pick the caption language

Add cc_lang_pref to the video link, the same parameter YouTube itself uses, and Spidra returns captions in that language when the video has them. Without it, Spidra picks English, then the video's own language.

captionLanguages lists every track the video has, so you know what to ask for. If the language you asked for isn't there, you still get a transcript, and transcriptNote says which language came back instead. In live tests, a Spanish-language video returned English captions by default and Spanish ones with cc_lang_pref=es.

Request: Spanish captions
{
"urls": [{ "url": "https://www.youtube.com/watch?v=aircAruvnKk&cc_lang_pref=es" }],
"output": "json"
}
What came back (real run, October 19, 2026, trimmed)
"transcript": {
"language": "es",
"languageName": "Spanish",
"isAutoGenerated": false,
"segmentCount": 264,
"segments": [
{
"start": 4.22,
"duration": 1.18,
"text": "Este es un tres, que esta escrito de manera descuidada"
},
{
"start": 6.06,
"duration": 4.15,
"text": "y renderisado en una resolución extremadamente pequeña de 28X28 pixeles,"
},
{
"start": 10.21,
"duration": 3.51,
"text": "pero tu cerebro no tiene problemas reconociéndolo como un 3,"
},
"… 261 more"
]
}

Human captions first, auto-generated when that's all there is

Many videos have two kinds of captions: ones the uploader wrote or uploaded, and ones YouTube generates with speech recognition. When both exist in the language you want, Spidra returns the human ones.

Plenty of videos only have the automatic kind. In live tests, 7 of the 13 captioned videos (news clips, Shorts, a past stream and a long course among them) returned auto-generated captions. isAutoGenerated tells you which you got, so you can treat names and technical terms with more care when it's true.

Transcripts for AI summaries and search

Most people want a transcript to hand it to a model. You can do that in the same call: add a prompt and a schema, and the answer comes back in your shape. The example further down summarized a video from its transcript for 7 credits.

Or take transcript.text into your own model or index. Long videos are long: one full-length course came back as 15,121 lines and about 498,000 characters, more than many context windows hold. Split by segment start times or by chapter, and keep the start time with each chunk so answers can link back to the moment in the video.

  • Summaries, show notes and chapter outlines
  • Question answering over a channel's videos
  • Search that jumps to the second a phrase was said

Ask for the columns you want

Describe the answer as a prompt, a JSON schema or both, and it comes back in that shape. The AI reads a compact copy of the data Spidra already read, not the whole page.

Request
const result = await spidra.scrape({
urls: [{ url: "https://www.youtube.com/watch?v=aircAruvnKk" }],
prompt: "Summarise the video from its transcript in 3 bullet points, and list the main concepts explained.",
schema: {
type: "object",
properties: {
summary: {
type: "array",
items: {
type: "string"
}
},
concepts: {
type: "array",
items: {
type: "string"
}
}
}
},
});
What came back (real run)
{
"summary": [
"The video introduces the fundamental structure of neural networks using the classic example of recognizing handwritten digits from 28x28 pixel images.",
"It explains how neurons hold activations between 0 and 1, and how information flows through input, hidden, and output layers via weighted sums and biases.",
"It discusses the mathematical mechanisms behind the network, including the sigmoid squishification function and a brief comparison with ReLU units."
],
"concepts": [
"Neural Networks",
"Neurons and Layers",
"Weights and Biases",
"… 3 more"
]
}

This request cost 7 credits on October 18, 2026: 1 for the page plus the AI tokens. For the data as it is, use JSON output with no prompt for 1 credit.

What teams build with it

Transcripts turn video into text that software can work with.

How Spidra compares

Transcript APIs are a crowded market and some are cheaper per transcript at volume. Here is how they differ.

YouTube Data APISupadataSpidra
1,000 transcriptsCaption text only for videos you own; others return 4031 credit each: about $1.57 per 1,000 on the $47 plan, about $0.99 on the $297 plan1,000 credits: $3.80 down to $1.99
No captionsNot availableAI transcript generated from the audio, 2 credits per minutetranscript: null with a note. Audio is never read
Free tier10,000 quota units a day100 credits a month, expiring monthly300 credits, once
Same callSeparate calls for details and commentsMetadata, channel and playlist endpoints; no comments listedVideo details, 40 top comments and related videos in the same response

Choose Supadata if

You need the lowest price per transcript at high volume, or transcripts for videos that have no captions at all, generated from the audio.

Choose Spidra if

You want the transcript together with the video's details and top comments in one call, language choice with YouTube's own parameter, and any other website through the same API.

Competitor prices and features are as published on their own pages on October 18, 2026 and may have changed. Spidra prices use 1 credit per page on each plan. Sources: YouTube Data API, Supadata.

What to know before you build

We would rather you hear the limits from us than find them in production.

  • Spidra reads YouTube's own captions. A video without captions returns transcript: null with a note, and Spidra doesn't generate one, because it never reads video or audio. In live tests, 2 of 15 varied videos had no captions.
  • One caption language per request. For several languages, send the link once per cc_lang_pref value. Only languages listed in captionLanguages come back; YouTube's machine translations aren't returned.
  • Spidra reads YouTube as a visitor who isn't signed in. Age-restricted videos return their details but no captions. Private and members-only videos fail, and aren't charged.
  • Streams that are live right now have no transcript until they end.
  • The transcript is what the captions say. Sound cues like [Music] and speech recognition mistakes come through as written.

What it costs

1 credit per page. Pages that can't be delivered are free. Work out your monthly volume below.

Monthly credits
6,000
Fits the Builder plan ($79/mo)

Example: 200 videos a day is about 6,000 credits a month, each with its transcript, details and comments. Plain JSON output uses no AI tokens.

PlanPriceYouTube pages a month
Free$0up to 300 (one time)
Starter$19/moup to 5,000
BuilderPopular$79/moup to 25,000
Pro$249/moup to 125,000

Credits are shared across everything Spidra does, so the same plan covers YouTube and any other site.

Related scrapers

Same API key, same credits. See every scraper.

FAQ

Questions, answered

YouTube

Not for other people's videos. The YouTube Data API lists caption tracks, but downloading caption text returns an error unless you have rights to the video. Spidra reads the captions YouTube shows on the public video page and returns them as JSON for 1 credit per video.

Send a video link and get its transcript.

Get 300 free credits, no card, and pull your first transcript from the dashboard or the API.

Spidra is not affiliated with, endorsed by, or sponsored by YouTube or Google. YouTube is a trademark of Google LLC. Check YouTube's terms of service and the laws that apply to you before you collect data, and use the data responsibly.