{
"items": [
{
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"commentId": "UgzKYksqeQ5gA3t0g0F4AaABAg",
"text": "I Rick rolled my entire French class because we had to study a city in France and make a quiz about it as well as a presentation, I decided to make a Kahoot quiz because it’s very easy. I put a link in to this saying it’s the kahoot link. The teacher needless to say got very very mad. As well as my classmates asking who rick rolls in 2019",
"author": "@grustache4569",
"authorChannelId": "UCKrzgYonJnMd0Dk7zQXjYXw",
"authorPhoto": "https://yt3.ggpht.com/ytc/AIdro_kDD-FhIbth2qcBbI9VGxR41dJa0kE3kN9iVlGzNgRU_g=s88-c-k-c0x00ffffff-no-rj",
"likes": "109 mil",
"replyCount": 740,
"isReply": false,
"parentCommentId": null,
"heartedByCreator": false,
"publishedTimeText": "há 7 anos (editado)",
"publishedAtApprox": "2019-11-23T18:37:27.563175+00:00"
},
{
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"commentId": "UgwPwTibxdgqCHZxktd4AaABAg",
"text": "My algebra teacher said that this was a link to the test answers",
"author": "@bdr8823",
"authorChannelId": "UCdi6tGxvFvTRGe-7dAn7m7w",
"authorPhoto": "https://yt3.ggpht.com/ytc/AIdro_kcDoQJUNDkDzTrA5kaF5ADVujN-6UcDjMP2Kydtw=s88-c-k-c0x00ffffff-no-rj",
"likes": "72 mil",
"replyCount": 708,
"isReply": false,
"parentCommentId": null,
"heartedByCreator": false,
"publishedTimeText": "há 7 anos",
"publishedAtApprox": "2019-11-23T18:37:27.568448+00:00"
},
{
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"commentId": "Ugw10bSluCDSZMIxUSB4AaABAg",
"text": "Let’s put the meme aside, this is actually a banging song.",
"author": "@LK-ht7qz",
"authorChannelId": "UCHpvHTRSILoOFKWX5oFCYDA",
"authorPhoto": "https://yt3.ggpht.com/RJnrz4JwDmHNgtFdnVdJ6FKLiuo59IuHkY6bvqaEJM0mxTSlq0GKQs_ItA-sJ8QMqps_lf9Lvgs=s88-c-k-c0x00ffffff-no-rj",
"likes": "223 mil",
"replyCount": 666,
"isReply": false,
"parentCommentId": null,
"heartedByCreator": false,
"publishedTimeText": "há 6 anos",
"publishedAtApprox": "2020-11-23T18:37:27.571719+00:00"
},
{
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"commentId": "UgyW4kfw4IeIP2SVP6N4AaABAg",
"text": "They should turn off ads so that the rickroll happens by surprise...\n\nWOW! I can't believe it! One billion views!! This is a very special moment for me. God bless you all, and hope there's more billions of views in the future!\n\nOK, guys, I have a confesion: I was just copying what some memes from Reddit and YouTube already said, since it was a good idea. This is not an original comment...",
"author": "@GabrielsEpicLifeofGoals",
"authorChannelId": "UCUztIF1vqHhPGCbO27IRDEg",
"authorPhoto": "https://yt3.ggpht.com/ytc/AIdro_keh05OEEoNHBwN1maGSGYTcVTcuPz-9Vl1Q6O9FYemDw=s88-c-k-c0x00ffffff-no-rj",
"likes": "73 mil",
"replyCount": 462,
"isReply": false,
"parentCommentId": null,
"heartedByCreator": false,
"publishedTimeText": "há 7 anos (editado)",
"publishedAtApprox": "2019-11-23T18:37:27.574921+00:00"
},
{
"videoId": "dQw4w9WgXcQ",
"videoUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"commentId": "Ugzn9VS5jfDEby21Yv94AaABAg",
"text": "Yall still getting rick rolled after gta6",
"author": "@ELIBRON-i2g",
"authorChannelId": "UCYkKHiczoMbaR7v7kuefCAg",
"authorPhoto": "https://yt3.ggpht.com/9ptwIqgvw-f3nu8YMMQZmvZ2DRJ_0KFqQQ5NIsjtNZnNIlN3gefuQRQvtI4SoyI_s7G0mb7Lyw=s88-c-k-c0x00ffffff-no-rj",
"likes": 126,
"replyCount": 6,
"isReply": false,
"parentCommentId": null,
"heartedByCreator": false,
"publishedTimeText": "há 15 horas",
"publishedAtApprox": "2026-11-23T03:37:27.577038+00:00"
}
],
"meta": {
"robot": "youtube-comments",
"items": 5,
"status": "SUCCEEDED",
"seconds": 3,
"via": "vps"
}
}
curl --location --request GET 'https://zylalabs.com/api/15392/youtube+comments+scraper+api/41367/youtube+comments?video=https://www.youtube.com/watch?v=dQw4w9WgXcQ&max=5' --header 'Authorization: Bearer YOUR_API_KEY'
注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 YouTube 评论抓取器 API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
| 标头 | 描述 |
|---|---|
授权
|
必需
应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。
|
它返回 YouTube 视频和 Shorts 中的评论和回复 每条内容可以包含视频引用 评论文本 作者详情 点赞数 回复数 发布时间 置顶状态 创作者点赞状态以及回复关系
关键字段包括 `videoId`、`videoUrl`、`commentId`、`text`、`author`、`authorChannelId`、`authorPhoto`、`likes`、`replyCount`、`isReply`、`parentCommentId`、`heartedByCreator` 和 `publishedTimeText`
响应是一个包含 `items` 数组的 JSON 对象。数组中的每个元素代表一条顶级评论或回复。回复通过 `isReply: true` 标识,并可通过 `parentCommentId` 引用其父评论
检查 `isReply` 字段 顶级评论的 `isReply: false` 且 `parentCommentId` 通常为 null 回复的 `isReply: true` 并使用 `parentCommentId` 标识其所属的评论
每条记录可能会在 `likes` 中包含显示的点赞数,并在 `replyCount` 中包含回复数。`heartedByCreator` 字段表示视频创作者是否给这条评论点了爱心。
作者数据可以包括 `author` 中显示的用户名、`authorChannelId` 中的频道标识符,以及 `authorPhoto` 中的个人资料图片网址。这些字段可用于署名、分组或作者个人资料链接
该端点支持来自标准 YouTube 视频和 YouTube Shorts 的评论和回复。记录包含 `videoId` 和 `videoUrl`,可将结果与其来源内容关联起来
对于该请求,将空的 `items` 数组视为没有返回任何评论或回复。单条记录也可能省略某些字段或将其值设为 null,因此客户端应在显示或处理可选字段之前进行验证