当前浏览的是 v7 预览版文档(v7 尚未正式发布,API 可能随版本调整)。本页是 v7 新增内容,去 v6 正式版文档首页
@ikenxuan/amagi

用户主页信息

取用户主页的资料与统计。笔记列表见 `userNoteList`。

GET
/api/xiaohongshu/fetch_user_profile

Authorization

bearerAuth
AuthorizationBearer <token>

仅在 startServer 传了 token 时生效

In: header

Query Parameters

user_id*string

用户 ID,从主页地址里取

Length1 <= length
xsec_token?string

反爬令牌,随用户主页分享链接下发;游客必传、有效登录 CK 可省;与发放它的会话绑定(游客下换会话即 461)

xsec_source?string

反爬来源,默认 pc_feed;仅在带 xsec_token 时发出

Response Body

application/json

application/json

curl -X GET "https://example.com/api/xiaohongshu/fetch_user_profile?user_id=string"
{  "success": true,  "data": null,  "error": {    "kind": "validation",    "code": "string",    "message": "string",    "retryable": true,    "platform": {      "code": "string",      "message": "string"    },    "http": {      "status": 0,      "statusText": "string"    },    "issues": [      {        "path": "string",        "message": "string",        "received": null      }    ]  },  "message": "string",  "meta": {    "requestId": "string",    "clientId": "string",    "platform": "douyin",    "endpoint": "string",    "durationMs": 0,    "attempts": 0,    "trace": [      {        "url": "string",        "method": "string",        "status": 0,        "durationMs": 0,        "reason": "initial",        "retryOf": "string"      }    ]  },  "requestPath": "/api/bilibili/fetch_one_video?bvid=BV1xx"}