{
"ok": true,
"data": {
"id": "_T8cn2J13-4",
"url": "https://www.youtube.com/watch?v=_T8cn2J13-4",
"title": "How We Are Going to the Moon - 4K",
"description": "While Apollo placed the first steps on the Moon, Artemis opens the door for humanity to sustainably work and live on another world...",
"publishedAt": "2019-12-19T17:43:14.000Z",
"durationSeconds": 331,
"duration": "00:05:31",
"viewCount": 11863645,
"likeCount": 480000,
"commentCount": 43988,
"commentsTurnedOff": false,
"tags": [
"NASA",
"Moon",
"Artemis"
],
"hashtags": [],
"category": "Science & Technology",
"thumbnail": "https://i.ytimg.com/vi/_T8cn2J13-4/maxresdefault.jpg",
"videoType": "video",
"isShort": false,
"isLive": false,
"liveStatus": "none",
"isMembersOnly": false,
"isAgeRestricted": false,
"isUnlisted": false,
"isFamilySafe": true,
"hasPaidPromotion": false,
"descriptionLinks": [],
"chapters": [],
"channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
"channelName": "NASA",
"channelHandle": "@NASA",
"channelUrl": "https://www.youtube.com/@NASA",
"channelSubscriberCount": 15100000,
"channelIsVerified": true,
"scrapedAt": "2026-11-15T04:30:12.512Z"
},
"next_cursor": null
}
curl --location --request GET 'https://zylalabs.com/api/14956/youtube+real-time+api/39188/get+video+details?url=https://www.youtube.com/watch?v=_T8cn2J13-4' --header 'Authorization: Bearer YOUR_API_KEY'
{
"ok": true,
"data": {
"videoId": "_T8cn2J13-4",
"url": "https://www.youtube.com/watch?v=_T8cn2J13-4",
"title": "How We Are Going to the Moon - 4K",
"channelName": "NASA",
"channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
"channelUrl": "https://www.youtube.com/@NASA",
"publishedAt": "2019-12-19T17:43:14.000Z",
"durationSeconds": 331,
"viewCount": 11863645,
"category": "Science & Technology",
"language": "en",
"languageName": "English",
"isAutoGenerated": false,
"wordCount": 873,
"availableLanguages": [
{
"language": "en",
"languageName": "English",
"isAutoGenerated": false
},
{
"language": "en",
"languageName": "English",
"isAutoGenerated": true
}
],
"thumbnailUrl": "https://i.ytimg.com/vi/_T8cn2J13-4/maxresdefault.jpg",
"keywords": [
"NASA",
"Moon",
"Artemis"
],
"description": "While Apollo placed the first steps on the Moon, Artemis opens the door...",
"fullText": "Between 1968 and 1972, America launched 9 human missions to the Moon, 6 of which successfully touched down...",
"segments": [
{
"start": 1.31,
"duration": 7.39,
"text": "Between 1968 and 1972, America launched 9 human missions to the Moon, 6 of which successfully"
},
{
"start": 8.7,
"duration": 4.2,
"text": "touched down",
"allowing 12 men to walk on the lunar surface.": null
}
],
"scrapedAt": "2026-11-15T04:30:13.101Z"
},
"next_cursor": null
}
curl --location --request GET 'https://zylalabs.com/api/14956/youtube+real-time+api/39189/get+video+transcript?url=https://www.youtube.com/watch?v=_T8cn2J13-4&lang=en&format=text' --header 'Authorization: Bearer YOUR_API_KEY'
{
"ok": true,
"data": {
"query": "nasa artemis",
"estimatedResults": 3510030,
"items": [
{
"type": "video",
"id": "_T8cn2J13-4",
"url": "https://www.youtube.com/watch?v=_T8cn2J13-4",
"title": "How We Are Going to the Moon - 4K",
"description": "While Apollo placed the first steps on the Moon, Artemis opens the door for humanity...",
"durationSeconds": 331,
"duration": "00:05:31",
"viewCount": 11863614,
"publishedTimeText": "6 years ago",
"publishedAt": "2020-11-15T00:00:00.000Z",
"thumbnail": "https://i.ytimg.com/vi/_T8cn2J13-4/hq720.jpg",
"channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
"channelName": "NASA",
"channelHandle": "@NASA",
"channelUrl": "https://www.youtube.com/@NASA",
"channelIsVerified": true,
"isLive": false,
"isUpcoming": false,
"badges": [
"4K",
"CC"
],
"position": 1
}
]
},
"next_cursor": "eyJrIjoic2VhcmNoIiwicSI6Im5hc2EgYXJ0ZW1pcyIsImMiOiJFdU1DRWd4dVlYTmhJR0Z5ZEdWdGFYTWEw..."
}
curl --location --request GET 'https://zylalabs.com/api/14956/youtube+real-time+api/39190/search+youtube?q=drone footage&type=all&upload_date=any&duration=any&sort=relevance&features=hd,subtitles' --header 'Authorization: Bearer YOUR_API_KEY'
{
"ok": true,
"data": {
"id": "UCLA_DiR1FfKNvjuUpBHmylQ",
"url": "https://www.youtube.com/@NASA",
"name": "NASA",
"handle": "@NASA",
"description": "NASA's mission is to pioneer the future in space exploration, scientific discovery, and aeronautics research...",
"subscriberCount": 15100000,
"videoCount": 6202,
"viewCount": 1135840911,
"joinedAt": "2008-06-03",
"country": null,
"links": [
{
"title": "Website",
"url": "https://www.nasa.gov/"
}
],
"keywords": [
"NASA",
"space",
"astronomy"
],
"avatar": "https://yt3.googleusercontent.com/nasa-avatar=s900",
"banner": "https://yt3.googleusercontent.com/nasa-banner=w2560",
"isVerified": true,
"isFamilySafe": true,
"scrapedAt": "2026-11-15T04:30:14.227Z"
},
"next_cursor": null
}
curl --location --request GET 'https://zylalabs.com/api/14956/youtube+real-time+api/39191/get+channel+details?handle_or_url=@NASA' --header 'Authorization: Bearer YOUR_API_KEY'
{
"ok": true,
"data": {
"channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
"channelName": "NASA",
"tab": "videos",
"sort": "popular",
"items": [
{
"type": "video",
"id": "EJxwWpaGoJs",
"url": "https://www.youtube.com/watch?v=EJxwWpaGoJs",
"title": "The Year of Pluto - New Horizons Documentary Brings Humanity Closer to the Edge of the Solar System",
"description": null,
"durationSeconds": 3514,
"duration": "00:58:34",
"viewCount": 21000000,
"publishedTimeText": "11 years ago",
"publishedAt": "2015-11-15T00:00:00.000Z",
"thumbnail": "https://i.ytimg.com/vi/EJxwWpaGoJs/hq720.jpg",
"channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
"channelName": "NASA",
"channelHandle": "@NASA",
"channelUrl": "https://www.youtube.com/@NASA",
"channelIsVerified": null,
"isLive": false,
"isUpcoming": false,
"badges": [],
"position": 1
}
]
},
"next_cursor": "eyJrIjoiY2hhbm5lbC12aWRlb3MiLCJjaCI6IlVDTEFfRGlSMUZmS052anVVcEJIbXlsUSIs..."
}
curl --location --request GET 'https://zylalabs.com/api/14956/youtube+real-time+api/39192/get+channel+videos?handle_or_url=@NASA&tab=videos&sort=newest' --header 'Authorization: Bearer YOUR_API_KEY'
{
"ok": true,
"data": {
"videoId": "_T8cn2J13-4",
"commentCount": 43988,
"commentsTurnedOff": false,
"sort": "top",
"items": [
{
"id": "UgzExampleComment0AaABAg",
"text": "Can't wait to see people walk on the Moon again!",
"author": "@spacefan",
"authorChannelId": "UCxxxxxxxxxxxxxxxxxxxxxx",
"authorChannelUrl": "https://www.youtube.com/channel/UCxxxxxxxxxxxxxxxxxxxxxx",
"authorIsChannelOwner": false,
"authorIsVerified": false,
"likeCount": 1200,
"replyCount": 14,
"publishedAt": "2020-11-15T00:00:00.000Z",
"publishedTimeText": "6 years ago",
"isEdited": false,
"isPinned": false,
"hasCreatorHeart": false
}
]
},
"next_cursor": "eyJrIjoiY29tbWVudHMiLCJpZCI6Il9UOGNuMkoxMy00IiwicyI6InRvcCIsImMiOiJFZzBTQzE5VU9HTnVN..."
}
curl --location --request GET 'https://zylalabs.com/api/14956/youtube+real-time+api/39193/get+video+comments?url=_T8cn2J13-4&sort=top' --header 'Authorization: Bearer YOUR_API_KEY'
{
"ok": true,
"data": {
"playlistId": "PL2aBZuCeDwlQvNtHhNJtarm9OewQwVntv",
"url": "https://www.youtube.com/playlist?list=PL2aBZuCeDwlQvNtHhNJtarm9OewQwVntv",
"title": "Artemis II Mission Coverage",
"description": null,
"channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
"channelName": "NASA",
"videoCount": 23,
"viewCount": 1049387,
"isUnlisted": false,
"items": [
{
"type": "video",
"id": "DYY4nnfxKbU",
"url": "https://www.youtube.com/watch?v=DYY4nnfxKbU",
"title": "NASA's Artemis II Crew Return to Houston",
"description": null,
"durationSeconds": 4860,
"duration": "01:21:00",
"viewCount": 1700000,
"publishedTimeText": "Streamed 7 months ago",
"publishedAt": "2026-04-15T00:00:00.000Z",
"thumbnail": "https://i.ytimg.com/vi/DYY4nnfxKbU/hqdefault.jpg",
"channelId": "UCLA_DiR1FfKNvjuUpBHmylQ",
"channelName": "NASA",
"channelHandle": "@NASA",
"channelUrl": "https://www.youtube.com/@NASA",
"channelIsVerified": null,
"isLive": false,
"isUpcoming": false,
"badges": [],
"position": 1
}
]
},
"next_cursor": null
}
curl --location --request GET 'https://zylalabs.com/api/14956/youtube+real-time+api/39194/get+playlist+videos?url=https://www.youtube.com/playlist?list=PL2aBZuCeDwlQvNtHhNJtarm9OewQwVntv' --header 'Authorization: Bearer YOUR_API_KEY'
注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 YouTube 实时 API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
| 标头 | 描述 |
|---|---|
授权
|
必需
应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。
|
实时的YouTube数据以JSON格式展示:视频详情、任何字幕语言的 transcripts、搜索结果、频道、频道上传和短视频、评论和播放列表
视频中的任何字幕语言,包括自动生成的字幕 请求语言代码或获取默认轨道
列表端点返回next_cursor 将其作为游标参数传递以获取下一页 直到next_cursor为null
视频链接或视频和文稿的ID,频道链接、频道的ID或句柄,播放列表链接或播放列表的ID,以及搜索的自由文本
转录端点返回一个错误代码,表示没有可用的转录,而不是数据
每个端点以JSON格式返回特定的YouTube数据。例如“获取视频详细信息”端点提供视频元数据,而“获取视频字幕”返回字幕。其他端点如“搜索YouTube”返回搜索结果,“获取频道详细信息”提供有关频道的信息
关键字段因端点而异。在“获取视频详情”中,重要字段包括标题、观看次数和时长。在“获取频道详情”中,订阅者数量和描述等字段至关重要。每个端点的文档中都列出了其特定字段
参数因端点而异 对于“搜索 YouTube”您可以通过结果类型 上传日期和持续时间进行筛选 “获取视频成绩单”端点接受语言代码 有关接受参数的完整列表 请参考每个端点的文档
响应数据采用JSON格式结构,具有“ok”状态和“data”对象。“data”对象包含与端点特定相关的字段,如视频详情或搜索结果,便于解析和使用
每个端点提供不同的信息:“获取视频详情”提供关于视频的元数据“获取视频评论”列出用户评论,“获取播放列表视频”详细介绍播放列表中的视频。这种多样性允许全面的数据检索
用户可以通过使用特定参数来定制请求。例如,在“获取频道视频”中,您可以按受欢迎程度或年龄进行排序。在“搜索YouTube”中,您可以指定持续时间和上传日期等过滤器来精确结果
典型的用例包括分析视频性能、检索可访问性的转录文本和汇总评论以进行情感分析开发人员可以使用这些数据来创建内容策划或教育工具
数据准确性通过直接访问YouTube的API来维护,该API提供实时更新。该API反映了YouTube上可用的最新信息,确保用户获得当前和可靠的数据