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

用户笔记列表

取用户的笔记列表。翻页要手动:`cursor` 传上一页最后一条的 ID。

GET
/api/xiaohongshu/fetch_user_notes

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

cursor?string

翻页游标;传上一页最后一条的 ID,首页不传

num?integer

单次请求的笔记条数,默认 30

Range1 <= value <= 100

Response Body

application/json

application/json

curl -X GET "https://example.com/api/xiaohongshu/fetch_user_notes?user_id=string"
{  "success": true,  "data": {    "code": 0,    "data": {      "cursor": "string",      "has_more": true,      "notes": [        {          "cover": {            "file_id": "string",            "height": 0,            "info_list": [              {                "image_scene": "string",                "url": "string"              }            ],            "trace_id": "string",            "url": "string",            "url_default": "string",            "url_pre": "string",            "width": 0          },          "display_title": "string",          "interact_info": {            "liked": true,            "liked_count": "string",            "sticky": true          },          "note_id": "string",          "time": 0,          "type": "string",          "user": {            "avatar": "string",            "nick_name": "string",            "nickname": "string",            "user_id": "string"          },          "xsec_token": "string"        }      ]    },    "msg": "string",    "success": true  },  "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"}