Skip to content

搜索视频号

按关键词搜索视频号用户、视频内容或综合结果,支持分页和筛选。

接口地址: POST /newSearchFinder

前置条件

  • 当前 wId 已完成登录,并且账号状态正常。
  • 首次搜索时 page=1offset=0cookie=""searchId=""
  • 继续翻页时,使用上一次响应返回的 offsetcookiesearchId

请求参数

参数名必选类型说明
wIdstring登录实例标识
contentstring搜索关键词
typeint搜索类型:0 全部,1 用户,10 视频
filterint筛选类型:0 不限,1 最新,2 朋友赞过
pageint页码;首次传 1,后续自行累加
offsetint偏移量;首次传 0,后续传响应中的 offset
cookiestring搜索上下文;首次传空,后续传响应中的 cookie
searchIdstring搜索 ID;首次传空,后续传响应中的 searchId

请求示例

json
{
  "wId": "{{wId}}",
  "content": "中国",
  "type": 0,
  "filter": 0,
  "page": 1,
  "offset": 0,
  "cookie": "",
  "searchId": ""
}

响应参数

参数名类型说明
codestring1000 成功,1001 失败
messagestring反馈信息
dataobject搜索结果
data.cookiestring下一次搜索翻页使用的上下文
data.searchIdstring搜索 ID,翻页时原样传回
data.offsetnumber下一次搜索翻页使用的偏移量
data.authInfosarray认证信息列表
data.videoInfosarray搜索结果分组
data.videoInfos[].itemsarray分组下的结果列表
data.videoInfos[].items[].docIdstring结果 ID
data.videoInfos[].items[].titlestring标题,可能包含高亮 HTML
data.videoInfos[].items[].dateTimestring展示时间
data.videoInfos[].items[].durationstring视频时长
data.videoInfos[].items[].imagestring封面图
data.videoInfos[].items[].imageDataobject封面图尺寸信息
data.videoInfos[].items[].likeNumstring点赞展示值
data.videoInfos[].items[].pubTimenumber发布时间
data.videoInfos[].items[].sourceobject来源账号信息
data.videoInfos[].items[].jumpInfoobject跳转信息
data.videoInfos[].items[].videoUrlstring视频地址
data.videoInfos[].boxIdstring分组 ID
data.videoInfos[].typenumber分组类型
data.videoInfos[].subTypenumber分组子类型
data.videoInfos[].totalCountnumber总数

成功响应

json
{
  "code": "1000",
  "message": "处理成功",
  "data": {
    "cookie": "{\"box_offset\":0,\"businessType\":14,\"page_cnt\":1,\"query\":\"中国\"}",
    "searchId": "416754344366039934",
    "offset": 8,
    "authInfos": [],
    "videoInfos": [
      {
        "items": [
          {
            "dateTime": "3天前",
            "docId": "14212057401545988355",
            "duration": "08:09",
            "image": "http://wxapp.tc.qq.com/251/20304/stodownload?...",
            "imageData": {
              "height": 1088,
              "width": 1920,
              "url": "http://wxapp.tc.qq.com/251/20304/stodownload?..."
            },
            "likeNum": "10万+",
            "pubTime": 1694209265,
            "source": {
              "iconUrl": "https://wx.qlogo.cn/finderhead/ver_1/example/132",
              "mark": [
                "https://dldir1v6.qq.com/weixin/checkresupdate/auth_icon_level3_2e2f94615c1e4651a25a7e0446f63135.png"
              ],
              "title": "示例账号"
            },
            "jumpInfo": {
              "feedId": "14212057401545988355",
              "jumpType": 9,
              "extInfo": "{\"behavior\":[\"report_feed_read\"]}"
            },
            "title": "这里是<em class=\"highlight\">中国</em>",
            "videoUrl": "https://findermp.video.qq.com/251/20302/stodownload?..."
          }
        ],
        "boxId": "0x80000000000-1-14212057401545988355",
        "type": 86,
        "subType": 1,
        "totalCount": 270
      }
    ]
  }
}

错误响应

json
{
  "code": "1001",
  "message": "失败",
  "data": null
}

使用建议

  • 搜索翻页必须沿用响应中的 cookiesearchIdoffset,不要自行拼接。
  • title 可能包含高亮 HTML,展示前请按前端安全策略处理。
  • 搜索结果类型较多,业务侧应根据 typesubTypejumpInfo.jumpType 决定展示和跳转方式。