YouTube — 视频评论
SpiderHubs OpenAPI 文档:YouTube — 视频评论,分类 YouTube。接口 GET /openapi/v1/contentcreator/youtube/web_v2/get_video_comments。读取一条视频的一级评论。默认按热门排序,可改为最新。下一页把上次返回的 con...
OpId:
yt-video-comments · 最近更新: 2026-11-19说明
读取一条视频的一级评论。默认按热门排序,可改为最新。下一页把上次返回的 continuation_token 原样传回。
基础信息
- Endpoint:
- GET /openapi/v1/contentcreator/youtube/web_v2/get_video_comments
- 计费:
- 1 积分 / 次
- 限流:
- 300 次 / 分钟 / 用户
请求参数说明
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| video_id | string | 是 | 11 位视频 ID |
| sort_by | string | 否 | top 热门(默认)或 newest 最新 |
| continuation_token | string | 否 | 翻页令牌。首页不传 |
| language_code | string | 否 | 显示语言,默认 zh-CN |
| country_code | string | 否 | 地区,默认 US |
| need_format | boolean | 否 | 是否返回清洗后的评论。默认 true |
响应字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| code | int | 业务状态码,200 表示成功 |
| request_id | string | 本次请求唯一标识,排查问题时可提供 |
| data | object | 业务数据容器,具体字段见下 |
| data.comments | array | 一级评论 |
| data.comments[].comment_id | string | 评论 ID |
| data.comments[].content | string | 评论正文 |
| data.comments[].published_time | string | 相对发布时间,如 1天前 |
| data.comments[].like_count | string | 点赞数 |
| data.comments[].reply_count | string | 回复数 |
| data.comments[].author | object | 作者:channel_id、display_name、channel_url、is_verified |
| data.continuation_token | string | 下一页令牌。没有更多时为空 |
请求示例 · cURL
curl 'https://api.spiderhubs.com/openapi/v1/contentcreator/youtube/web_v2/get_video_comments?video_id=ZFEnfscZpAU&sort_by=top' \
-H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx'响应示例
{
"code": 200,
"request_id": "b31e0a44-91c2-4f08-8a55-6d2e1c70aa09",
"data": {
"comments": [
{
"comment_id": "UgzExampleCommentId",
"content": "Example comment",
"published_time": "1 day ago",
"like_count": "2",
"reply_count": "0",
"author": {
"channel_id": "UCexample",
"display_name": "@example",
"channel_url": "https://www.youtube.com/@example",
"is_verified": false
}
}
],
"continuation_token": ""
}
}开始调用 SpiderHubs API
使用账户中心生成的 API Key,通过 Authorization: Bearer sk_live_xxx 调用接口。