小红书 API
覆盖笔记搜索、详情、评论、账号信息和账号作品。
覆盖笔记搜索、详情、评论、账号信息和账号作品。
| 能力 | REST 路径 | 方法 | 积分/次 | MCP 工具 |
|---|---|---|---|---|
| 笔记搜索 | /v1/xhs/note_search | GET | 13 | xhs_note_search |
| 笔记详情 | /v1/xhs/note_detail | GET | 10 | xhs_note_detail |
| 笔记评论 | /v1/xhs/note_comments | GET | 13 | xhs_note_comments |
| 账号信息 | /v1/xhs/user_info | GET | 13 | xhs_user_info |
| 账号作品 | /v1/xhs/user_notes | GET | 13 | xhs_user_notes |
小红书笔记搜索
按关键词搜索小红书笔记
- REST 路径:
/v1/xhs/note_search - 方法:
GET - MCP 工具:
xhs_note_search - 计费: 13 积分/次,仅成功返回数据时扣费
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
keyword | string | 是 | 搜索关键词/Search keyword |
page | integer | 否 | 页码,从1开始/Page number, start from 1 |
sort_type | string | 否 | 排序方式/Sort type |
note_type | string | 否 | 笔记类型/Note type: 不限, 视频笔记, 普通笔记, 直播笔记 |
time_filter | string | 否 | 发布时间筛选/Time filter: 不限, 一天内, 一周内, 半年内 |
search_id | string | 否 | 搜索ID,翻页时传入首次搜索返回的值/Search ID for pagination |
search_session_id | string | 否 | 搜索会话ID,翻页时传入首次搜索返回的值/Search session ID for pagination |
source | string | 否 | 来源/Source |
ai_mode | integer | 否 | AI模式:0=关闭, 1=开启/AI mode: 0=off, 1=on |
请求示例
curl "https://api.example.com/v1/xhs/note_search?keyword=coffee" \
-H "X-API-Key: $FIREFLY_API_KEY" \
-H "X-Request-Id: demo-xhs_note_search-001"小红书笔记详情
按笔记ID或分享链接获取笔记完整详情
- REST 路径:
/v1/xhs/note_detail - 方法:
GET - MCP 工具:
xhs_note_detail - 计费: 10 积分/次,仅成功返回数据时扣费
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
note_id | string | 至少提供:note_id / share_text | 笔记ID/Note ID |
share_text | string | 至少提供:note_id / share_text | 分享链接/Share link |
请求示例
curl "https://api.example.com/v1/xhs/note_detail?note_id=NOTE_ID" \
-H "X-API-Key: $FIREFLY_API_KEY" \
-H "X-Request-Id: demo-xhs_note_detail-001"小红书笔记评论
获取笔记评论列表
- REST 路径:
/v1/xhs/note_comments - 方法:
GET - MCP 工具:
xhs_note_comments - 计费: 13 积分/次,仅成功返回数据时扣费
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
note_id | string | 至少提供:note_id / share_text | 笔记ID/Note ID |
share_text | string | 至少提供:note_id / share_text | 分享链接/Share link |
cursor | string | 否 | 分页游标,首次请求留空/Pagination cursor, leave empty for first request |
index | integer | 否 | 评论索引,首次请求传0/Comment index, pass 0 for first request |
pageArea | string | 否 | 折叠状态: UNFOLDED(默认-展开), FOLDED(折叠) |
sort_strategy | string | 否 | 排序策略/Sort strategy: default, latest_v2, like_count |
请求示例
curl "https://api.example.com/v1/xhs/note_comments?note_id=NOTE_ID" \
-H "X-API-Key: $FIREFLY_API_KEY" \
-H "X-Request-Id: demo-xhs_note_comments-001"小红书账号信息
获取小红书用户资料
- REST 路径:
/v1/xhs/user_info - 方法:
GET - MCP 工具:
xhs_user_info - 计费: 13 积分/次,仅成功返回数据时扣费
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
user_id | string | 至少提供:user_id / share_text | 用户ID/User ID |
share_text | string | 至少提供:user_id / share_text | 分享链接/Share link |
请求示例
curl "https://api.example.com/v1/xhs/user_info?user_id=USER_ID" \
-H "X-API-Key: $FIREFLY_API_KEY" \
-H "X-Request-Id: demo-xhs_user_info-001"小红书账号作品
获取用户发布的笔记列表
- REST 路径:
/v1/xhs/user_notes - 方法:
GET - MCP 工具:
xhs_user_notes - 计费: 13 积分/次,仅成功返回数据时扣费
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
user_id | string | 至少提供:user_id / share_text | 用户ID/User ID |
share_text | string | 至少提供:user_id / share_text | 分享链接/Share link |
cursor | string | 否 | 分页游标,首次请求留空/Pagination cursor, leave empty for first request |
请求示例
curl "https://api.example.com/v1/xhs/user_notes?user_id=USER_ID" \
-H "X-API-Key: $FIREFLY_API_KEY" \
-H "X-Request-Id: demo-xhs_user_notes-001"