xhs_get_note_comments_by_note_id
Retrieve top-level comments from a Xiaohongshu note by note ID, with sorting by time or likes and pagination using page tokens.
Instructions
根据 note_id 获取单篇小红书笔记的一级评论,支持 sort_type 评论排序和 page_token 翻页。 返回的 next_page_token 是不透明分页令牌;继续翻页时必须将完整 next_page_token 原样作为 page_token 传回。next_page_token 只绑定当前用户、笔记、排序或评论链路,不能跨用户、笔记或评论链路复用;一级评论还不能跨排序复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note_id | Yes | note_id 是 24 位小写十六进制稳定笔记 ID。必须原样复制搜索、详情、评论或用户发帖列表返回的完整 note_id;不得截断、缩写、脱敏、补全、格式化、重组,也不得只传前缀。 | |
| sort_type | No | 评论排序方式,可选:default(默认/综合排序)、time_descending(最新评论优先)、like_count_descending(点赞最多优先) | default |
| page_token | No | 分页令牌。首次请求留空;继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回。page_token 是不透明分页令牌,只绑定当前用户、笔记、排序或评论链路,不能跨用户、笔记或评论链路复用;一级评论还不能跨排序复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | 当前页一级评论列表 | |
| comment_count | Yes | 整篇笔记的总评论数,含一级评论与回复;不是当前页 items 数量 | |
| next_page_token | Yes | 下一页不透明分页令牌;为空表示没有更多结果。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回。next_page_token 只绑定当前用户、笔记或评论链路,不能跨用户、笔记或评论链路复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。 | |
| top_level_comment_count | Yes | 整篇笔记的一级评论总数,不含回复;不是当前页 items 数量;无法获取时为 null |