Appearance
获取评论列表
获取指定视频号作品的评论列表,支持分页,也可查看指定评论的回复详情。
接口地址: POST /finderCommentDetails
前置条件
- 当前
wId已完成登录,并且账号状态正常。 id、nonceId、sessionBuffer来自视频号主页、搜索或详情类接口返回。- 首次请求
pageCode传空字符串;继续翻页时传上一次响应返回的pageCode。 - 查询评论回复详情时,传入上级评论的
rootCommentId。
请求参数
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| wId | 是 | string | 登录实例标识 |
| id | 是 | number | 视频号作品 ID |
| pageCode | 是 | string | 分页参数;首次传空,翻页时传响应中的 pageCode |
| sessionBuffer | 是 | string | 作品上下文会话数据 |
| refCommentId | 是 | number | 默认为 0 |
| rootCommentId | 是 | number | 获取回复详情时传上级评论 ID;普通评论列表传 0 |
| nonceId | 是 | string | 视频号作品 nonceId |
请求示例
json
{
"wId": "{{wId}}",
"id": 14200825020179157073,
"pageCode": "",
"sessionBuffer": "eyJzZXNzaW9uX2lkIjoic2lkXzEzNDUxMDA3MDNf...",
"refCommentId": 0,
"rootCommentId": 0,
"nonceId": "14967079156574588894_0_0_2_2_0"
}响应参数
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | string | 1000 成功,1001 失败 |
| message | string | 反馈信息 |
| data | object | 评论列表结果 |
| data.videoDetails | object / null | 作品详情,可能为 null |
| data.commentList | array | 评论列表 |
| data.commentList[].userName | string | 评论用户编码 |
| data.commentList[].nickName | string | 评论用户昵称 |
| data.commentList[].content | string | 评论内容 |
| data.commentList[].commentId | number | 评论 ID |
| data.commentList[].replyCommentId | number / null | 回复的评论 ID |
| data.commentList[].headUrl | string | 评论用户头像 |
| data.commentList[].createTime | number | 评论时间,Unix 秒级时间戳 |
| data.commentList[].likeCount | number | 评论点赞数 |
| data.commentList[].ipRegion | string | IP 属地 |
| data.commentList[].replyContent | string / null | 被回复内容 |
| data.commentList[].replyUserName | string / null | 被回复用户 |
| data.commentList[].finderAuthorVo | object | 评论用户信息 |
| data.pageCode | string | 下一页分页参数 |
| data.commentCount | number | 评论数 |
| data.likeCount | number | 点赞数 |
| data.forwardCount | number | 转发数 |
| data.favCount | number | 收藏数 |
成功响应
json
{
"code": "1000",
"message": "处理成功",
"data": {
"videoDetails": null,
"commentList": [
{
"userName": "v5_020b0a166104010000000000ae18109352a67c000000b1afa7d8728e3dd43ef4317a780e33c2718b019b67053251a030e444e04fd520e943bd3c5be4d603186002dd12e6ec5ed990dc378a101a5ee7ffe6ac04261c74d14196876054300d15f037bf39@stranger",
"nickName": "示例用户",
"content": "示例评论内容",
"commentId": -4245909463265376127,
"replyCommentId": null,
"headUrl": "https://wx.qlogo.cn/mmhead/ver_1/example/132",
"createTime": 1692871404,
"likeCount": 46142,
"ipRegion": "江苏",
"replyContent": null,
"replyUserName": null,
"finderAuthorVo": {
"userName": "v5_020b0a166104010000000000ae18109352a67c000000b1afa7d8728e3dd43ef4317a780e33c2718b019b67053251a030e444e04fd520e943bd3c5be4d603186002dd12e6ec5ed990dc378a101a5ee7ffe6ac04261c74d14196876054300d15f037bf39@stranger",
"nickName": "示例用户",
"headUrl": "https://wx.qlogo.cn/mmhead/ver_1/example/132"
}
}
],
"pageCode": "CrABCLCwsM79pO+NxQEYgZHkrOz634nFARixkvD6yerficUBG...",
"commentCount": 5534,
"likeCount": 100002,
"forwardCount": 100002,
"favCount": 100002
}
}错误响应
json
{
"code": "1001",
"message": "失败",
"data": null
}使用建议
- 评论列表和评论回复详情共用同一接口,区别在于
rootCommentId。 - 继续翻页时,请把响应中的
pageCode原样传回。 - 评论 ID 可能为较大的正负数,前端保存时注意整数精度。
