{
"found": true,
"data": {
"language": "en",
"transcript": "[♪♪♪]\n♪ We're no strangers to love ♪\n♪ You know the rules\nand so do I ♪\n♪ A full commitment's\nwhat I'm thinking of ♪\n♪ You wouldn't get this\nfrom any other guy ♪\n♪ I just wanna tell you\nhow I'm feeling ♪\n♪ Gotta make you understand ♪\n♪ Never gonna give you up ♪\n♪ Never gonna let you down ♪\n♪ Never gonna run around\nand desert you ♪\n♪ Never gonna make you cry ♪\n♪ Never gonna say goodbye ♪\n♪ Never gonna tell a lie\nand hurt you ♪\n♪ We've known each other\nfor so long ♪\n♪ Your heart's been aching\nbut you're too shy to say it ♪\n♪ Inside we both know\nwhat's been going ♪\n♪ We know the game\nand we're go...",
"segments": [
{
"text": "[♪♪♪]",
"startSeconds": 1.36,
"durationSeconds": 1.68
},
{
"text": "♪ We're no strangers to love ♪",
"startSeconds": 18.64,
"durationSeconds": 3.24
}
]
}
}
curl --location --request GET 'https://zylalabs.com/api/15581/youtube+captions+to+text+api/41930/get+video+transcript?id=dQw4w9WgXcQ' --header 'Authorization: Bearer YOUR_API_KEY'
注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 YouTube字幕转文字 API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
| 标头 | 描述 |
|---|---|
授权
|
必需
应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。
|
通过 ID 或 URL 获取任意 YouTube 视频的字幕文本,并显示字幕语言。支持自动生成和手动添加的字幕
搜索无结果时返回 HTTP 404,found 为 false
不 发送请求并获取结构化 JSON 响应