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

首页推荐笔记列表

取首页推荐流笔记。翻页要手动:把上一页响应的 `cursor_score` 传回来。

GET
/api/xiaohongshu/fetch_home_feed

Authorization

bearerAuth
AuthorizationBearer <token>

仅在 startServer 传了 token 时生效

In: header

Query Parameters

cursor_score?string

翻页游标;首页不传,续页传上一页的值

num?integer

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

Range1 <= value <= 100
refresh_type?integer

刷新类型,默认 1

Range-9007199254740991 <= value <= 9007199254740991
note_index?integer

笔记索引,默认 0

Range-9007199254740991 <= value <= 9007199254740991
category?string

内容分类,默认首页推荐流

search_key?string

搜索关键词,默认空字符串

unread_begin_note_id?string

未读区间起点笔记 ID

unread_end_note_id?string

未读区间终点笔记 ID

unread_note_count?integer

未读笔记数,默认 0

Range0 <= value <= 9007199254740991
need_num?integer

需要的笔记数量,默认 8

Range1 <= value <= 100
need_filter_image?|

是否过滤图片,默认 false

Response Body

application/json

application/json

curl -X GET "https://example.com/api/xiaohongshu/fetch_home_feed"
{  "success": true,  "data": {    "code": 0,    "data": {      "cursor_score": "string",      "items": [        {          "id": "string",          "ignore": true,          "model_type": "string",          "note_card": {            "cover": {              "file_id": "string",              "height": 0,              "info_list": [                {                  "image_scene": "string",                  "url": "string"                }              ],              "url": "string",              "url_default": "string",              "url_pre": "string",              "width": 0            },            "display_title": "string",            "interact_info": {              "liked": true,              "liked_count": "string"            },            "type": "string",            "user": {              "avatar": "string",              "nick_name": "string",              "nickname": "string",              "user_id": "string",              "xsec_token": "string"            },            "video": {              "capa": {                "duration": 0              }            }          },          "track_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"}