Skip to content

获取用户主页 ​

获取某个视频号用户的主页和作品列表,pageCode 翻页。

接口地址: POST /finderUserHome

说明与注意 ​

  • userName 来自搜索、关注列表或视频详情类接口的返回。
  • 返回里每个作品的 id、objectNonceId、sessionBuffer 是浏览、点赞、评论等互动接口的入参,原样传。
  • 作品媒体链接有有效期,时长见 urlValidTime(秒)。

请求参数 ​

参数名必选类型说明
wId是string登录实例标识
userName是string目标视频号用户编码
pageCode否string分页参数;首次传空,翻页时传响应中的 pageCode

请求示例 ​

http
POST {BASE_URL}/finderUserHome
Authorization: Bearer <你的调用凭证>
Content-Type: application/json

{
  "wId": "{{wId}}",
  "userName": "v2_060000231003b20faec8c6e48f11c7d2c901e531b077a130b51b4788d2af47a9375e2e776c46@finder",
  "pageCode": ""
}
bash
curl -X POST '{BASE_URL}/finderUserHome' \
  -H 'Authorization: Bearer <你的调用凭证>' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "wId": "{{wId}}",
  "userName": "v2_060000231003b20faec8c6e48f11c7d2c901e531b077a130b51b4788d2af47a9375e2e776c46@finder",
  "pageCode": ""
}'
python
import requests

url = "{BASE_URL}/finderUserHome"
headers = {"Authorization": "Bearer <你的调用凭证>", "Content-Type": "application/json"}
body = """{
  "wId": "{{wId}}",
  "userName": "v2_060000231003b20faec8c6e48f11c7d2c901e531b077a130b51b4788d2af47a9375e2e776c46@finder",
  "pageCode": ""
}"""

resp = requests.post(url, headers=headers, data=body.encode("utf-8"))
print(resp.text)
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

String url = "{BASE_URL}/finderUserHome";
String body = "{\n" +
    "  \"wId\": \"{{wId}}\",\n" +
    "  \"userName\": \"v2_060000231003b20faec8c6e48f11c7d2c901e531b077a130b51b4788d2af47a9375e2e776c46@finder\",\n" +
    "  \"pageCode\": \"\"\n" +
    "}";

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder(URI.create(url))
    .header("Authorization", "Bearer <你的调用凭证>")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(body))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
php
<?php

$url = '{BASE_URL}/finderUserHome';
$body = <<<'JSON'
{
  "wId": "{{wId}}",
  "userName": "v2_060000231003b20faec8c6e48f11c7d2c901e531b077a130b51b4788d2af47a9375e2e776c46@finder",
  "pageCode": ""
}
JSON;

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Authorization: Bearer <你的调用凭证>',
    'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;

成功响应 ​

json
{
  "code": "1000",
  "message": "处理成功",
  "data": {
    "videoList": [
      {
        "id": 13897021715463014565,
        "nickName": "摩托欧耶",
        "userName": "v2_060000231003b20faec8c6e48f11c7d2c901e531b077a130b51b4788d2af47a9375e2e776c46@finder",
        "createTime": 1656654085,
        "forwardCount": 96,
        "likeCount": 114,
        "commentCount": 64,
        "friendLikeCount": 0,
        "objectNonceId": "10833141393859919979_0_0_2_1",
        "sessionBuffer": "eyJzZXNzaW9uX2lkIjoi...",
        "favCount": 50,
        "urlValidTime": 172800,
        "finderUser": {
          "userName": "v2_060000231003b20faec8c6e48f11c7d2c901e531b077a130b51b4788d2af47a9375e2e776c46@finder",
          "nickName": "摩托欧耶",
          "headUrl": "http://wx.qlogo.cn/finderhead/ver_1/example/0",
          "signature": "喜欢摩托车就会关注",
          "authInfo": {
            "authIconType": 2,
            "authProfession": "北京自由摩力科技有限公司",
            "detailLink": "pages/index/index.html?showdetail=true&username=v2_060000231003b20faec8c6e48f11c7d2c901e531b077a130b51b4788d2af47a9375e2e776c46@finder",
            "appName": "gh_4ee148a6ecaa@app"
          },
          "userMode": 2
        },
        "videoDetails": {
          "desc": "过个减速带就断了,意塔杰特前摇臂货不对版#摩托车\n",
          "mediaType": 4,
          "mediaList": [
            {
              "url": "http://wxapp.tc.qq.com/251/20302/stodownload?...",
              "thumbUrl": "http://wxapp.tc.qq.com/251/20304/stodownload?...",
              "mediaType": 4,
              "videoPlayLen": 1052,
              "width": 1920,
              "height": 1080,
              "md5": "9df282dfc0f355f7c5c8260970602a3d",
              "fileSize": 1077630854
            }
          ],
          "location": {
            "longitude": "116.14294",
            "latitude": "39.74788",
            "city": "北京市"
          },
          "finderTopicInfo": "<finder>...</finder>",
          "commentList": null
        },
        "commentList": [
          {
            "userName": "v5_020b0a166104010000000000489a3a1d7ba12d000000b1afa7d8728e3dd43ef4317a780e33c2996857e4fdf7e8b0f6772a3d0ed03edf984fe1e17f31c39207f75c1d6ff53b4f2e492e1a3c03a64e41998c0945b68ddc9a714512c95d45b1be796545ec@stranger",
            "nickName": "坚持",
            "content": "听着着急/::D/::D",
            "commentId": 598083965,
            "replyCommentId": 0,
            "headUrl": "https://wx.qlogo.cn/mmhead/ver_1/example/132",
            "createTime": 1657076433
          }
        ]
      }
    ],
    "userInfo": {
      "userName": "v2_060000231003b20faec8c6e48f11c7d2c901e531b077a130b51b4788d2af47a9375e2e776c46@finder",
      "nickName": "摩托欧耶",
      "headUrl": "http://wx.qlogo.cn/finderhead/ver_1/example/0",
      "signature": "喜欢摩托车就会关注"
    },
    "pageCode": "CJuRpLG5y7fbvwEQARgAIKWRwJDu84juwAE...",
    "friendFollowCount": 0
  }
}

错误响应 ​

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

响应参数 ​

参数名类型说明
codestring1000 成功;其他值都是失败,通常是 1001
messagestring反馈信息
dataobject用户主页信息
data.videoListarray作品列表
data.videoList[].idnumber作品 ID
data.videoList[].nickNamestring作者昵称
data.videoList[].userNamestring作者视频号用户编码
data.videoList[].createTimenumber发布时间,Unix 秒级时间戳
data.videoList[].forwardCountnumber转发数
data.videoList[].likeCountnumber点赞数
data.videoList[].commentCountnumber评论数
data.videoList[].friendLikeCountnumber好友点赞数
data.videoList[].objectNonceIdstring作品 nonce 标识
data.videoList[].sessionBufferstring翻页、互动或上下文使用的会话数据
data.videoList[].favCountnumber收藏数
data.videoList[].urlValidTimenumber媒体链接有效时长,单位秒
data.videoList[].finderUserobject作者信息
data.videoList[].finderUser.authInfoobject作者认证信息
data.videoList[].videoDetailsobject作品内容详情
data.videoList[].videoDetails.descstring作品文案
data.videoList[].videoDetails.mediaTypenumber媒体类型
data.videoList[].videoDetails.mediaListarray媒体列表
data.videoList[].videoDetails.locationobject位置信息
data.videoList[].videoDetails.finderTopicInfostring话题 XML 信息
data.videoList[].commentListarray评论列表
data.userInfoobject目标视频号用户信息
data.pageCodestring下一页分页参数;为空表示没有下一页
data.friendFollowCountnumber共同关注或好友关注数量