Skip to content

获取评论列表

获取指定视频号作品的评论列表,支持分页,也可查看指定评论的回复详情。

接口地址: POST /finderCommentDetails

前置条件

  • 当前 wId 已完成登录,并且账号状态正常。
  • idnonceIdsessionBuffer 来自视频号主页、搜索或详情类接口返回。
  • 首次请求 pageCode 传空字符串;继续翻页时传上一次响应返回的 pageCode
  • 查询评论回复详情时,传入上级评论的 rootCommentId

请求参数

参数名必选类型说明
wIdstring登录实例标识
idnumber视频号作品 ID
pageCodestring分页参数;首次传空,翻页时传响应中的 pageCode
sessionBufferstring作品上下文会话数据
refCommentIdnumber默认为 0
rootCommentIdnumber获取回复详情时传上级评论 ID;普通评论列表传 0
nonceIdstring视频号作品 nonceId

请求示例

json
{
  "wId": "{{wId}}",
  "id": 14200825020179157073,
  "pageCode": "",
  "sessionBuffer": "eyJzZXNzaW9uX2lkIjoic2lkXzEzNDUxMDA3MDNf...",
  "refCommentId": 0,
  "rootCommentId": 0,
  "nonceId": "14967079156574588894_0_0_2_2_0"
}

响应参数

参数名类型说明
codestring1000 成功,1001 失败
messagestring反馈信息
dataobject评论列表结果
data.videoDetailsobject / null作品详情,可能为 null
data.commentListarray评论列表
data.commentList[].userNamestring评论用户编码
data.commentList[].nickNamestring评论用户昵称
data.commentList[].contentstring评论内容
data.commentList[].commentIdnumber评论 ID
data.commentList[].replyCommentIdnumber / null回复的评论 ID
data.commentList[].headUrlstring评论用户头像
data.commentList[].createTimenumber评论时间,Unix 秒级时间戳
data.commentList[].likeCountnumber评论点赞数
data.commentList[].ipRegionstringIP 属地
data.commentList[].replyContentstring / null被回复内容
data.commentList[].replyUserNamestring / null被回复用户
data.commentList[].finderAuthorVoobject评论用户信息
data.pageCodestring下一页分页参数
data.commentCountnumber评论数
data.likeCountnumber点赞数
data.forwardCountnumber转发数
data.favCountnumber收藏数

成功响应

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 可能为较大的正负数,前端保存时注意整数精度。