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

笔记评论列表

取笔记评论列表。`number` 指定目标条数,翻页由端点自动完成。**游客身份下平台对本接口限流较紧**:超限回 HTTP 461(伪装成成功的空壳),退避需分钟级、秒级无效;而且**不传 `number` 会触发翻页、多烧一次请求** —— 传具体小值可把请求数降到 1。

GET
/api/xiaohongshu/fetch_note_comments

Authorization

bearerAuth
AuthorizationBearer <token>

仅在 startServer 传了 token 时生效

In: header

Query Parameters

note_id*string

笔记 ID;从笔记分享链接里取

Length1 <= length
xsec_token*string

反爬令牌,随笔记分享链接下发;与发放它的会话绑定 —— 游客下换会话即 461,须同会话现取或带上原游客 CK

Length1 <= length
number?integer

目标条数;不传时按单页上限翻页取满,而不是只取一页 —— 游客下翻页必被拒且多烧一次请求,传具体小值可降到 1 次

Range1 <= value <= 500

Response Body

application/json

application/json

curl -X GET "https://example.com/api/xiaohongshu/fetch_note_comments?note_id=string&xsec_token=string"
{  "success": true,  "data": {    "code": 0,    "data": {      "comments": [        {          "at_users": [            {              "ai_agent": true,              "nickname": "string",              "user_id": "string",              "xsec_token": "string"            }          ],          "audio_info": {            "asr_text": "string",            "audio_id": "string",            "duration": 0,            "play_info": {              "url": "string"            },            "tag_text": "string"          },          "content": "string",          "create_time": 0,          "id": "string",          "invalid": true,          "ip_location": "string",          "like_count": "string",          "liked": true,          "note_id": "string",          "pictures": [            {              "height": 0,              "info_list": [                {                  "image_scene": "string",                  "url": "string"                }              ],              "url_default": "string",              "url_pre": "string",              "width": 0            }          ],          "show_tags": [            "string"          ],          "status": 0,          "sub_comment_count": "string",          "sub_comment_cursor": "string",          "sub_comment_has_more": true,          "sub_comments": [            {              "at_users": [                {                  "ai_agent": true,                  "nickname": "string",                  "user_id": "string",                  "xsec_token": "string"                }              ],              "content": "string",              "create_time": 0,              "id": "string",              "invalid": true,              "ip_location": "string",              "like_count": "string",              "liked": true,              "note_id": "string",              "pictures": [                {                  "height": 0,                  "info_list": [                    {                      "image_scene": "string",                      "url": "string"                    }                  ],                  "url_default": "string",                  "url_pre": "string",                  "width": 0                }              ],              "show_tags": [                "string"              ],              "status": 0,              "target_comment": {                "id": "string",                "user_info": {                  "ai_agent": true,                  "image": "string",                  "nickname": "string",                  "user_id": "string",                  "xsec_token": "string"                }              },              "user_info": {                "ai_agent": true,                "image": "string",                "nickname": "string",                "user_id": "string",                "xsec_token": "string"              }            }          ],          "user_info": {            "ai_agent": true,            "image": "string",            "nickname": "string",            "user_id": "string",            "xsec_token": "string"          }        }      ],      "cursor": "string",      "has_more": true,      "time": 0,      "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"}