Fetch YouTube Transcripts API 提供了一个强大而高效的解决方案,用于获取任何兼容的 YouTube 视频的详细文字记录。通过提供对口语内容的直接访问,该 API 提供的结构化数据包括完整文本、时间戳、自动划分的段落以及重要的视频元数据,如标题、时长、检测到的语言和作者。每个响应都经过优化,确保清晰、一致且易于集成,使大量内容能够无缝处理。
系统分析请求的视频,并返回经过组织的文本块,附有各自的开始和结束时间段,确保追踪每个片段的准确性。此外,API 会自动识别 YouTube 生成的字幕、自动生成的字幕以及在适用的情况下,自定义的文字记录。所有信息都以标准化格式提供,便于在应用程序、插件、仪表板或自动化流程中使用。
为了性能和可靠性,该 API 快速且稳定地处理请求,即使在长视频的情况下也能保持一致的响应时间。
简而言之,Fetch YouTube Transcripts API 是一个专业工具,让您能够获取完整、同步的文字记录,随时可供使用。
要使用此终端,您必须指定视频的 URL
获取转录 - 端点功能
| 对象 | 描述 |
|---|---|
请求体 |
[必需] Json |
{"transcription":"Writing code is writing a precise set of instructions a computer or device can understand. It's explaining exactly what you want your computer to do at any given moment. Computers need to know exactly how to react to things like the clicking of a mouse or the pushing of a button. And whatever happens ultimately is happening because of lines of code written by a human programmer. Just about anything with a plug or battery uses code. It's keeping our airplanes in the air. It's allowing you to swipe a credit card. And the computer doesn't know what to do in any given situation. It has to be taught everything. So you can think of a computer programmer explaining to a computer what we want it to do as like trying to give someone directions for how to drive somewhere when they don't even know what a car is. So you can see what kind of complications you'd run into. uh you'd have to not only tell them how to get to where they're going, but you'd also have to give them contingency plans for things like what if there's a traffic jam or what if a truck breaks down in the turn lane. And you'd even need to explain precisely how the steering wheel or gas pedal works. So that's kind of like a computer programmer writing code for a computer. They have to basically teach it everything every time. To understand that communication and how this process even started, you have to go back to the industrial revolution where the first computer program was invented in 1801 by a guy named Joseph Jakard. He developed a system of weaving instructions or code for his sewing looms that could be stored on cards with holes. And there was a mechanism that would go along the card and try to push a pin through. And so either the pin would go through or it wouldn't. It's binary. It's either it does or it doesn't. it's a one or it's a zero. And so if the pin goes through the hole, it would allow a rod attached to it to lift, which lifts the string and lifts the associated thread. And if the pin does not go through a hole, the pin doesn't move and the thread doesn't move. So essentially, the card would hold a preset pattern that is read by the loom and serves as a guide, giving the direction to the threads one at a time. And with this contraption, you could create very fancy pieces of weaving. And this idea of there being recorded information read by a machine was quickly borrowed to be applied to mathematical computation. Charles Babage invented the analytical engine in 1837 and it was basically a calculating machine. Eventually transistors are invented which replace punch cards as a way of transferring data. And nowadays, we use computers that have billions and billions of transistors, but still carrying that same basic idea of on and off to carry data. As a way of harnessing these various combinations of transistors, we use code. Computer programmers use different languages, whether it's Python for gaming, Java for desktop applications, or Objective C for an iPhone app. A computer program is only a text file following those rules and it's eventually translated into something the computer can understand. Just like the pins on Jakard's loom, a computer can only understand two things. Think of one and zero as the alphabet of a computer. It's like if you look at the alphabet of the English language, there's only 26 letters and by themselves, they're meaningless. But when you combine them into different ways, you get the Great Gatsby or Romeo and Juliet. In the same way, billions of different combinations of ones and zeros have the potential to give us Microsoft Word or iTunes. And the process goes like this. On the top level, you have a human writing code for a specific computer language. And after this, the code is translated or compiled into a low-level language by a tool called a compiler. And finally, the code is translated into binary or machine language by an assembler. So because we have a way of translating human orders in the form of code into ones and zeros that a computer can understand after that it's really just a matter of what you want the computer to do. And it's like being a chef writing a recipe because both chefs writing recipes and computer programmers writing code both have the ability to create something awesome using the resources and tools available. [Music] [Music]"}
curl --location --request POST 'https://zylalabs.com/api/11460/fetch+youtube+transcripts+api/21620/get+transcription' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{
"url": "https://www.youtube.com/watch?v=N7ZmPYaXoic"
}'
| 标头 | 描述 |
|---|---|
授权
|
[必需] 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。 |
无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。
API返回YouTube视频的详细文本记录,包括同步文本、每个片段的时间戳以及重要视频元数据,如标题、时长、作者和检测到的语言
响应中的关键字段包括`videoId` `videoTitle` `duration` `author`和一个`caption`对象,该对象包含每个转录段的`start` `end`和`text`属性的段落
响应以JSON格式构建,顶层对象包含状态标志、视频元数据和一个嵌套的`caption`对象,该对象包含一个转录段数组,每个段都有自己的时间和文本
API提供信息,例如完整的逐字稿文本、每个片段的时间戳、视频标题、时长、作者以及视频的检测语言,以便进行全面分析
用户可以通过指定他们想要转录的YouTube视频的`videoId`来自定义请求。未来的更新中可能会包含其他参数以优化输出,但目前主要关注的是视频ID
通过利用YouTube自己的字幕系统来保持数据的准确性,该系统包括自动字幕和自定义转录。API处理这些数据以确保可靠和同步的输出
典型的使用案例包括为视频创建字幕 进行内容分析 开发教育工具以及自动化需要从视频内容中提取文本的工作流程
用户可以通过将返回的数据集成到应用程序中实现搜索功能 创建视频分析仪表板或基于转录文本和元数据自动生成内容
服务级别:
100%
响应时间:
1,360ms
服务级别:
100%
响应时间:
1,827ms
服务级别:
100%
响应时间:
11,754ms
服务级别:
100%
响应时间:
12,198ms
服务级别:
100%
响应时间:
657ms
服务级别:
100%
响应时间:
4,742ms
服务级别:
100%
响应时间:
4,834ms
服务级别:
99%
响应时间:
1,933ms
服务级别:
97%
响应时间:
3,086ms
服务级别:
100%
响应时间:
444ms
服务级别:
100%
响应时间:
421ms
服务级别:
100%
响应时间:
100ms
服务级别:
100%
响应时间:
296ms
服务级别:
100%
响应时间:
197ms
服务级别:
100%
响应时间:
61ms
服务级别:
100%
响应时间:
3,033ms
服务级别:
100%
响应时间:
1,124ms
服务级别:
100%
响应时间:
446ms
服务级别:
100%
响应时间:
357ms
服务级别:
63%
响应时间:
424ms