xhs_search_notes
Search Xiaohongshu notes by keyword, with filters for note type, sort by engagement or time, and paginated results.
Instructions
按关键词搜索相关小红书笔记。 返回的 note_url 在任何使用场景都必须原样保留完整 URL,包括 xsec_token 等 query 参数;例如最终回答、展示、引用、存储、输出或传递;不得用 note_id 重新拼接链接。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | 小红书搜索关键词 | |
| note_type | No | 笔记类型筛选,可选:all(不限,默认)、image(图文)、video(视频) | all |
| sort_type | No | 搜索结果排序方式,可选:general(综合,默认)、time_descending(最新发布优先)、like_count_descending(最多点赞优先)、comment_count_descending(最多评论优先)、collect_count_descending(最多收藏优先) | general |
| page_token | No | 搜索分页令牌。首次请求留空;继续翻页时传入上一页返回的 完整 next_page_token 原样作为 page_token 传回。page_token 只能用于同一关键词、排序、笔记类型、发布时间范围和调用方的搜索链路;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成。 | |
| publish_time_range | No | 发布时间范围筛选,可选:all(不限,默认)、day(一天内)、week(一周内)、half_year(半年内) | all |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | 搜索结果中的笔记列表,已过滤非笔记卡片与不可公开笔记;当前页过滤后可能为空数组 | |
| next_page_token | Yes | 下一页不透明分页令牌;为空表示没有更多结果或无法继续 token 翻页。继续搜索时必须将完整 next_page_token 原样作为 page_token 传回。next_page_token 只能用于同一关键词、排序、笔记类型、发布时间范围和调用方的搜索链路。items 为空时不要单独据此判断结束。 |