xhs_get_note_comments_by_note_url
Retrieve top-level comments from a Xiaohongshu note by providing its URL, short link, or share text. Supports sorting by time or likes and pagination with page tokens.
Instructions
根据笔记链接、短链接或分享文案获取单篇小红书笔记的一级评论,支持 sort_type 评论排序和 page_token 翻页。 返回的 next_page_token 是不透明分页令牌;继续翻页时必须将完整 next_page_token 原样作为 page_token 传回。next_page_token 只绑定当前用户、笔记、排序或评论链路,不能跨用户、笔记或评论链路复用;一级评论还不能跨排序复用;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note_url | Yes | 小红书笔记链接、短链接或分享文案。支持以下形式:1) 小红书笔记长链接;2) xhslink.com / xhslink.cn / xhsurl.com / xhsurl.cn 短链接;3) 包含上述任一链接的完整分享文案。 | |
| 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 |