YouTube 公开页面转 Markdown

面向字幕转录与播放列表的 YouTube 抓取 API

把公开 YouTube URL 发给 Crawl 接口,拿回结构化 Markdown——视频返回带时间戳的字幕全文,播放列表返回结构化条目。无需 Google 账号。

接口bash
POST https://api.search1api.com/crawl
{ "url": "https://www.youtube.com/watch?v=aircAruvnKk" }
可以抓什么

专用解析器直接读页面自带的 caption 字幕轨——不需要无头浏览器跑视频。

1
视频

带时间戳的完整字幕转录,metadata 带 videoId 与 availability 标记。

2
播放列表

列表标题、简介,以及每条视频的结构化条目——标题、UP 主、时长。

3
字幕覆盖度

无字幕视频返回诚实的部分结果——availability 和 unavailableFields 明说缺了什么。

适用场景

课程讲座进 RAG / 字幕语料 / 播放列表盘点

输入什么,返回什么

三种 URL 形态:左边是 YouTube 向匿名访客实际返回页面的真实截图(经由爬虫同款出口拍摄),右边是 API 返回的 results.content 全文。

视频 + 字幕youtube.com/watch?v=aircAruvnKk

YouTube 实际返回的页面

YouTube 向匿名访客返回的 3Blue1Brown 神经网络视频页截图

2.5 MB 渲染 HTML——播放器外壳、推荐栏、商店模块

API 返回的数据

markdown
## Transcript
### Introduction example
**0:04** · This is a 3.
**0:06** · 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.
**0:14** · And I want you to take a moment to appreciate how crazy it is that brains can do this so effortlessly.
**0:19** · I mean, this, this and this are also recognizable as 3s, even though the specific values of each pixel is very different from one image to the next.
**0:28** · The particular light-sensitive cells in your eye that are firing when you see this 3 are very different from the ones firing when you see this 3.
**0:37** · But something in that crazy-smart visual cortex of yours resolves these as representing the same idea, while at the same time recognizing other images as their own distinct ideas.
**0:49** · But if I told you, hey, sit down and write for me a program that takes in a grid of 28x28 pixels like this and outputs a single number between 0 and 10, telling you what it thinks the digit is, well the task goes from comically trivial to dauntingly difficult.
### Series preview
**1:07** · Unless you've been living under a rock, I think I hardly need to motivate the relevance and importance of machine learning and neural networks to the present and to the future.
**1:15** · But what I want to do here is show you what a neural network actually is, assuming no background, and to help visualize what it's doing, not as a buzzword but as a piece of math.
**1:25** · My hope is that you come away feeling like the structure itself is motivated, and to feel like you know what it means when you read, or you hear about a neural network quote-unquote learning.
**1:35** · This video is just going to be devoted to the structure component of that, and the following one is going to tackle learning.
**1:40** · What we're going to do is put together a neural network that can learn to recognize handwritten digits.
**1:49** · This is a somewhat classic example for introducing the topic, and I'm happy to stick with the status quo here, because at the end of the two videos I want to point you to a couple good resources where you can learn more, and where you can download the code that does this and play with it on your own computer.
**2:05** · There are many many variants of neural networks, and in recent years there's been sort of a boom in research towards these variants, but in these two introductory videos you and I are just going to look at the simplest plain vanilla form with no added frills.
**2:19** · This is kind of a necessary prerequisite for understanding any of the more powerful modern variants, and trust me it still has plenty of complexity for us to wrap our minds around.
**2:29** · But even in this simplest form it can learn to recognize handwritten digits, which is a pretty cool thing for a computer to be able to do.
**2:37** · And at the same time you'll see how it does fall short of a couple hopes that we might have for it.
### What are neurons?
**2:43** · As the name suggests neural networks are inspired by the brain, but let's break that down.
**2:48** · What are the neurons, and in what sense are they linked together?
**2:52** · Right now when I say neuron all I want you to think about is a thing that holds a number, specifically a number between 0 and 1.
**3:00** · It's really not more than that.
**3:03** · For example the network starts with a bunch of neurons corresponding to each of the 28x28 pixels of the input image, which is 784 neurons in total.
**3:14** · Each one of these holds a number that represents the grayscale value of the corresponding pixel, ranging from 0 for black pixels up to 1 for white pixels.
**3:25** · This number inside the neuron is called its activation, and the image you might have in mind here is that each neuron is lit up when its activation is a high number.
### Introducing layers
**3:36** · So all of these 784 neurons make up the first layer of our network.
**3:46** · Now jumping over to the last layer, this has 10 neurons, each representing one of the digits.
**3:52** · The activation in these neurons, again some number that's between 0 and 1, represents how much the system thinks that a given image corresponds with a given digit.
**4:03** · There's also a couple layers in between called the hidden layers, which for the time being should just be a giant question mark for how on earth this process of recognizing digits is going to be handled.
**4:14** · In this network I chose two hidden layers, each one with 16 neurons, and admittedly that's kind of an arbitrary choice.
**4:21** · To be honest I chose two layers based on how I want to motivate the structure in just a moment, and 16, well that was just a nice number to fit on the screen.
**4:28** · In practice there is a lot of room for experiment with a specific structure here.
**4:33** · The way the network operates, activations in one layer determine the activations of the next layer.
**4:39** · And of course the heart of the network as an information processing mechanism comes down to exactly how those activations from one layer bring about activations in the next layer.
**4:49** · It's meant to be loosely analogous to how in biological networks of neurons, some groups of neurons firing cause certain others to fire.
**4:58** · Now the network I'm showing here has already been trained to recognize digits, and let me show you what I mean by that.
**5:03** · It means if you feed in an image, lighting up all 784 neurons of the input layer according to the brightness of each pixel in the image, that pattern of activations causes some very specific pattern in the next layer which causes some pattern in the one after it, which finally gives some pattern in the output layer.
**5:22** · And the brightest neuron of that output layer is the network's choice, so to speak, for what digit this image represents.
### Why layers?
**5:32** · And before jumping into the math for how one layer influences the next, or how training works, let's just talk about why it's even reasonable to expect a layered structure like this to behave intelligently.
**5:44** · What are we expecting here?
**5:45** · What is the best hope for what those middle layers might be doing?
**5:48** · Well, when you or I recognize digits, we piece together various components.
**5:54** · A 9 has a loop up top and a line on the right.
**5:57** · An 8 also has a loop up top, but it's paired with another loop down low.
**6:01** · A 4 basically breaks down into three specific lines, and things like that.
**6:07** · Now in a perfect world, we might hope that each neuron in the second to last layer corresponds with one of these subcomponents, that anytime you feed in an image with, say, a loop up top, like a 9 or an 8, there's some specific neuron whose activation is going to be close to 1.
**6:24** · And I don't mean this specific loop of pixels, the hope would be that any generally loopy pattern towards the top sets off this neuron.
**6:32** · That way, going from the third layer to the last one just requires learning which combination of subcomponents corresponds to which digits.
**6:41** · Of course, that just kicks the problem down the road, because how would you recognize these subcomponents, or even learn what the right subcomponents should be?
**6:48** · And I still haven't even talked about how one layer influences the next, but run with me on this one for a moment.
**6:53** · Recognizing a loop can also break down into subproblems.
**6:57** · One reasonable way to do this would be to first recognize the various little edges that make it up.
**7:03** · Similarly, a long line, like the kind you might see in the digits 1 or 4 or 7, is really just a long edge, or maybe you think of it as a certain pattern of several smaller edges.
**7:15** · So maybe our hope is that each neuron in the second layer of the network corresponds with the various relevant little edges.
**7:23** · Maybe when an image like this one comes in, it lights up all of the neurons associated with around 8 to 10 specific little edges, which in turn lights up the neurons associated with the upper loop and a long vertical line, and those light up the neuron associated with a 9.
**7:40** · Whether or not this is what our final network actually does is another question, one that I'll come back to once we see how to train the network, but this is a hope that we might have, a sort of goal with the layered structure like this.
**7:53** · Moreover, you can imagine how being able to detect edges and patterns like this would be really useful for other image recognition tasks.
**8:00** · And even beyond image recognition, there are all sorts of intelligent things you might want to do that break down into layers of abstraction.
**8:08** · Parsing speech, for example, involves taking raw audio and picking out distinct sounds, which combine to make certain syllables, which combine to form words, which combine to make up phrases and more abstract thoughts, etc.
**8:21** · But getting back to how any of this actually works, picture yourself right now designing how exactly the activations in one layer might determine the activations in the next.
**8:30** · The goal is to have some mechanism that could conceivably combine pixels into edges, or edges into patterns, or patterns into digits.
### Edge detection example
**8:39** · And to zoom in on one very specific example, let's say the hope is for one particular neuron in the second layer to pick up on whether or not the image has an edge in this region here.
**8:51** · The question at hand is what parameters should the network have?
**8:55** · What dials and knobs should you be able to tweak so that it's expressive enough to potentially capture this pattern, or any other pixel pattern, or the pattern that several edges can make a loop, and other such things?
**9:08** · Well, what we'll do is assign a weight to each one of the connections between our neuron and the neurons from the first layer.
**9:16** · These weights are just numbers.
**9:18** · Then take all of those activations from the first layer and compute their weighted sum according to these weights.
**9:27** · I find it helpful to think of these weights as being organized into a little grid of their own, and I'm going to use green pixels to indicate positive weights, and red pixels to indicate negative weights, where the brightness of that pixel is some loose depiction of the weight's value.
**9:42** · Now if we made the weights associated with almost all of the pixels zero except for some positive weights in this region that we care about, then taking the weighted sum of all the pixel values really just amounts to adding up the values of the pixel just in the region that we care about.
**9:59** · And if you really wanted to pick up on whether there's an edge here, what you might do is have some negative weights associated with the surrounding pixels.
**10:07** · Then the sum is largest when those middle pixels are bright but the surrounding pixels are darker.
**10:14** · When you compute a weighted sum like this, you might come out with any number, but for this network what we want is for activations to be some value between 0 and 1.
**10:24** · So a common thing to do is to pump this weighted sum into some function that squishes the real number line into the range between 0 and 1.
**10:32** · And a common function that does this is called the sigmoid function, also known as a logistic curve.
**10:38** · Basically very negative inputs end up close to 0, positive inputs end up close to 1, and it just steadily increases around the input 0.
**10:49** · So the activation of the neuron here is basically a measure of how positive the relevant weighted sum is.
**10:57** · But maybe it's not that you want the neuron to light up when the weighted sum is bigger than 0.
**11:02** · Maybe you only want it to be active when the sum is bigger than say 10.
**11:06** · That is, you want some bias for it to be inactive.
**11:11** · What we'll do then is just add in some other number like negative 10 to this weighted sum before plugging it through the sigmoid squishification function.
**11:20** · That additional number is called the bias.
**11:23** · So the weights tell you what pixel pattern this neuron in the second layer is picking up on, and the bias tells you how high the weighted sum needs to be before the neuron starts getting meaningfully active.
### Counting weights and biases
**11:36** · And that is just one neuron.
**11:38** · Every other neuron in this layer is going to be connected to all 784 pixel neurons from the first layer, and each one of those 784 connections has its own weight associated with it.
**11:51** · Also, each one has some bias, some other number that you add on to the weighted sum before squishing it with the sigmoid.
**11:58** · And that's a lot to think about!
**11:59** · With this hidden layer of 16 neurons, that's a total of 784 times 16 weights, along with 16 biases.
**12:08** · And all of that is just the connections from the first layer to the second.
**12:12** · The connections between the other layers also have a bunch of weights and biases associated with them.
**12:18** · All said and done, this network has almost exactly 13,000 total weights and biases.
**12:23** · 13,000 knobs and dials that can be tweaked and turned to make this network behave in different ways.
### How learning relates
**12:31** · So when we talk about learning, what that's referring to is getting the computer to find a valid setting for all of these many many numbers so that it'll actually solve the problem at hand.
**12:42** · One thought experiment that is at once fun and kind of horrifying is to imagine sitting down and setting all of these weights and biases by hand, purposefully tweaking the numbers so that the second layer picks up on edges, the third layer picks up on patterns, etc.
**12:56** · I personally find this satisfying rather than just treating the network as a total black box, because when the network doesn't perform the way you anticipate, if you've built up a little bit of a relationship with what those weights and biases actually mean, you have a starting place for experimenting with how to change the structure to improve.
**13:14** · Or when the network does work but not for the reasons you might expect, digging into what the weights and biases are doing is a good way to challenge your assumptions and really expose the full space of possible solutions.
### Notation and linear algebra
**13:26** · By the way, the actual function here is a little cumbersome to write down, don't you think?
**13:32** · So let me show you a more notationally compact way that these connections are represented.
**13:37** · This is how you'd see it if you choose to read up more about neural networks.
**13:40** · Organize all of the activations from one layer into a column as a vector.
**13:48** · Then organize all of the weights as a matrix, where each row of that matrix corresponds to the connections between one layer and a particular neuron in the next layer.
**13:58** · What that means is that taking the weighted sum of the activations in the first layer according to these weights corresponds to one of the terms in the matrix vector product of everything we have on the left here.
**14:14** · By the way, so much of machine learning just comes down to having a good grasp of linear algebra, so for any of you who want a nice visual understanding for matrices and what matrix vector multiplication means, take a look at the series I did on linear algebra, especially chapter 3.
**14:29** · Back to our expression, instead of talking about adding the bias to each one of these values independently, we represent it by organizing all those biases into a vector, and adding the entire vector to the previous matrix vector product.
**14:43** · Then as a final step, I'll wrap a sigmoid around the outside here, and what that's supposed to represent is that you're going to apply the sigmoid function to each specific component of the resulting vector inside.
**14:55** · So once you write down this weight matrix and these vectors as their own symbols, you can communicate the full transition of activations from one layer to the next in an extremely tight and neat little expression, and this makes the relevant code both a lot simpler and a lot faster, since many libraries optimize the heck out of matrix multiplication.
### Recap
**15:17** · Remember how earlier I said these neurons are simply things that hold numbers?
**15:22** · Well of course the specific numbers that they hold depends on the image you feed in, so it's actually more accurate to think of each neuron as a function, one that takes in the outputs of all the neurons in the previous layer and spits out a number between 0 and 1.
**15:39** · Really the entire network is just a function, one that takes in 784 numbers as an input and spits out 10 numbers as an output.
**15:47** · It's an absurdly complicated function, one that involves 13,000 parameters in the forms of these weights and biases that pick up on certain patterns, and which involves iterating many matrix vector products and the sigmoid squishification function, but it's just a function nonetheless.
**16:03** · And in a way it's kind of reassuring that it looks complicated.
**16:07** · I mean if it were any simpler, what hope would we have that it could take on the challenge of recognizing digits?
**16:13** · And how does it take on that challenge?
**16:15** · How does this network learn the appropriate weights and biases just by looking at data?
**16:20** · Well that's what I'll show in the next video, and I'll also dig a little more into what this particular network we're seeing is really doing.
### Some final words
**16:27** · Now is the point I suppose I should say subscribe to stay notified about when that video or any new videos come out, but realistically most of you don't actually receive notifications from YouTube, do you?
**16:38** · Maybe more honestly I should say subscribe so that the neural networks that underlie YouTube's recommendation algorithm are primed to believe that you want to see content from this channel get recommended to you.
**16:48** · Anyway, stay posted for more.
**16:50** · Thank you very much to everyone supporting these videos on Patreon.
**16:54** · I've been a little slow to progress in the probability series this summer, but I'm jumping back into it after this project, so patrons you can look out for updates there.
### ReLU vs Sigmoid
**17:03** · To close things off here I have with me Lisha Li who did her PhD work on the theoretical side of deep learning and who currently works at a venture capital firm called Amplify Partners who kindly provided some of the funding for this video.
**17:15** · So Lisha one thing I think we should quickly bring up is this sigmoid function.
**17:19** · As I understand it early networks use this to squish the relevant weighted sum into that interval between zero and one, you know kind of motivated by this biological analogy of neurons either being inactive or active.
**17:30** · Exactly. But relatively few modern networks actually use sigmoid anymore.
**17:34** · Yeah. It's kind of old school right?
**17:35** · Yeah or rather ReLU seems to be much easier to train.
**17:39** · And ReLU, ReLU stands for rectified linear unit?
**17:42** · Yes it's this kind of function where you're just taking a max of zero and a where a is given by what you were explaining in the video and what this was sort of motivated from I think was a partially by a biological analogy with how neurons would either be activated or not.
**18:01** · And so if it passes a certain threshold it would be the identity function but if it did not then it would just not be activated so it'd be zero so it's kind of a simplification.
**18:11** · Using sigmoids didn't help training or it was very difficult to train at some point and people just tried ReLU and it happened to work very well for these incredibly deep neural networks.
**18:25** · All right thank you Lisha.

带时间戳的字幕全文 — 20 KB · contentType: "video"

播放列表youtube.com/playlist?list=PLrAXtm…

YouTube 实际返回的页面

YouTube 向匿名访客返回的 MIT Select Lectures 播放列表页截图

1.1 MB 渲染 HTML——横幅、视频栏、登录引导

API 返回的数据

markdown
# Select Lectures
Some lectures on deep learning, deep reinforcement learning, autonomous vehicles, and artificial intelligence. https://deeplearning.mit.edu
## Videos (2)
1. [Deep Learning State of the Art (2020)](https://www.youtube.com/watch?v=0VH1Lim8gL8&list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf)
Lex Fridman · 1:27:41
2. [Deep Learning Basics: Introduction and Overview](https://www.youtube.com/watch?v=O5xeyoRL95U&list=PLrAXtmErZgOeiKm4sgNOknGvNjby9efdf)
Lex Fridman · 1:08:06

结构化清单 — 490 B · videoCount: 2 · contentType: "playlist"

MV 视频youtube.com/watch?v=dQw4w9WgXcQ

YouTube 实际返回的页面

YouTube 向匿名访客返回的 Rick Astley MV 页截图

2.1 MB 渲染 HTML——同样的播放器外壳,歌词藏在字幕轨里

API 返回的数据

markdown
## Transcript
**0:01** · \[♪♪♪\]
**0:18** · ♪ We're no strangers to love ♪ ♪ You know the rules and so do I ♪ ♪ A full commitment's what I'm thinking of ♪ ♪ You wouldn't get this from any other guy ♪ ♪ I just wanna tell you how I'm feeling ♪
**0:40** · ♪ Gotta make you understand ♪ ♪ Never gonna give you up ♪ ♪ Never gonna let you down ♪ ♪ Never gonna run around and desert you ♪ ♪ Never gonna make you cry ♪ ♪ Never gonna say goodbye ♪ ♪ Never gonna tell a lie and hurt you ♪
**1:00** · ♪ We've known each other for so long ♪ ♪ Your heart's been aching but you're too shy to say it ♪ ♪ Inside we both know what's been going ♪ ♪ We know the game and we're gonna play it ♪ ♪ And if you ask me how I'm feeling ♪
**1:22** · ♪ Don't tell me you're too blind to see ♪ ♪ Never gonna give you up ♪ ♪ Never gonna let you down ♪ ♪ Never gonna run around and desert you ♪ ♪ Never gonna make you cry ♪ ♪ Never gonna say goodbye ♪ ♪ Never gonna tell a lie and hurt you ♪ ♪ Never gonna give you up ♪ ♪ Never gonna let you down ♪ ♪ Never gonna run around and desert you ♪
**1:50** · ♪ Never gonna make you cry ♪ ♪ Never gonna say goodbye ♪ ♪ Never gonna tell a lie and hurt you ♪ ♪ (Ooh, give you up) ♪ ♪ (Ooh, give you up) ♪
**2:08** · ♪ Never gonna give, never gonna give ♪ ♪ (Give you up) ♪ ♪ Never gonna give, never gonna give ♪ ♪ (Give you up) ♪ ♪ We've known each other for so long ♪ ♪ Your heart's been aching but you're too shy to say it ♪ ♪ Inside we both know what's been going ♪ ♪ We know the game and we're gonna play it ♪ ♪ I just wanna tell you how I'm feeling ♪
**2:38** · ♪ Gotta make you understand ♪ ♪ Never gonna give you up ♪ ♪ Never gonna let you down ♪ ♪ Never gonna run around and desert you ♪ ♪ Never gonna make you cry ♪ ♪ Never gonna say goodbye ♪ ♪ Never gonna tell a lie and hurt you ♪ ♪ Never gonna give you up ♪ ♪ Never gonna let you down ♪ ♪ Never gonna run around and desert you ♪
**3:06** · ♪ Never gonna make you cry ♪ ♪ Never gonna say goodbye ♪ ♪ Never gonna tell a lie and hurt you ♪ ♪ Never gonna give you up ♪ ♪ Never gonna let you down ♪ ♪ Never gonna run around and desert you ♪ ♪ Never gonna make you cry ♪ ♪ Never gonna say goodbye ♪ ♪ Never gonna tell a lie and hurt you ♪

歌词转录 — 2.2 KB · contentType: "video" · availability: "full"

按 URL 形态划分的支持矩阵

YouTube 的支持是按 URL 形态实测出来的,不是按域名笼统宣称的。表里的每一行都已在生产爬虫上验证。

URL 形态状态返回内容
/watch?v=<id>
支持
带时间戳的字幕全文加标题——直接读页面自带的 caption 字幕轨。
youtu.be/<id>
支持
短链归一到同一个 watch 页——输出完全一致。
/playlist?list=<id>
支持
列表标题、简介,以及每条视频的结构化条目(标题、UP 主、时长)。
无字幕视频
部分支持
没有字幕轨就没有转录——返回标题和简介,metadata 标 availability: "partial" 并在 unavailableFields 里列明缺失字段。

不走 Data API 也能拿到 YouTube 字幕

把 YouTube URL 发给 Crawl 接口,请求会按 URL 形态路由到专用解析器:视频返回带时间戳的字幕 Markdown,播放列表返回结构化清单。官方 Data API 的字幕端点要 OAuth,而且只能拉你自己上传的视频——这条路读的是 YouTube 本来就在公开页面上发给观众的字幕轨。

读字幕轨,不抠像素

解析器直接读 watch 页内嵌的 caption 轨——不开无头浏览器、不做语音识别、不截帧。

播放列表保持结构化

播放列表 URL 逐条返回视频标题、频道和时长——可以直接当队列清单用,不是网页汤。

诚实的可用性标记

results.metadata.availability 标明 full / partial,unavailableFields 列出 YouTube 没公开的具体字段——不留暗坑。

按 URL 形态实测

矩阵每行都是真实 URL 在线爬虫的复现结果——按形态实测,不按域名拍胸脯。

什么是 YouTube 抓取 API?

YouTube 抓取 API 是一个 HTTP 接口:传入 YouTube URL,返回结构化、模型可用的页面内容。对多数管线来说核心是字幕转录:官方 YouTube Data API 只在 OAuth 流程内提供 captions,且仅限账号自己上传的视频。Search1API 的 Crawl 接口走的是页面本身开放的路径——为观众内嵌的字幕轨——任何公开视频都能拿回带时间戳的 Markdown。播放列表返回的是结构化清单,而不是网页残骸。

接入路径

典型工作流

把公开 YouTube URL 发给 Crawl 接口,拿回结构化 Markdown——视频返回带时间戳的字幕全文,播放列表返回结构化条目。无需 Google 账号。

1

把 YouTube URL POST 给 Crawl 接口——不需要 Google 账号。

2

URL 按形态规则匹配,路由到专用 YouTube 解析器。

3

视频返回带时间戳的字幕全文,播放列表返回结构化清单——都带 results.metadata.platform 和 contentType。

4

无字幕视频和直播流返回诚实的部分结果,标好 availability 和 unavailableFields——绝不编造内容。

典型用法

把讲座、会议演讲、访谈以带时间戳文本的形式喂给 RAG 管线。

用公开字幕轨构建字幕与翻译语料。

一次调用把播放列表变成结构化的课程或节目清单。

长视频摘要——转录稿按时间戳分好段,直接进上下文窗口。

常见问题

需要 Google 账号或 YouTube Data API 吗?

不需要。解析器读的是 YouTube 在公开播放页发给所有观众的字幕轨。与官方 captions 端点不同,不需要 OAuth 流程、不需要 API 控制台配置,也不要求是频道所有者。

支持哪些 YouTube URL?

播放页(youtube.com/watch?v=…)、短链(youtu.be/…)、播放列表(youtube.com/playlist?list=…)。Shorts、频道页、搜索结果不在支持范围——已验证的边界见矩阵。

没有字幕的视频怎么办?

返回诚实的部分结果:标题和简介照常给,metadata.availability 标为 "partial",unavailableFields 列出缺失字段。直播流在有字幕前也是同样行为。

MV 和自动生成字幕也支持吗?

支持——自动生成的字幕轨和上传字幕读法一样。如 demo 所示,MV 返回的就是歌词轨。

返回格式是什么?

Markdown。视频返回 ## Transcript 节,按 **时间戳** · 文本 分段;播放列表返回编号清单。results.metadata 带 platform、contentType、videoId / playlistId 和 availability 标记。

抓 YouTube 合法吗?

我们只读 YouTube 向匿名访客提供的字幕轨和页面数据——不登录、不共享会话、不绕过访问控制。具体用途是否合法取决于你的法域和场景,请与自己的法务确认。