Xiaohongshu-V2/小红书V2
获取笔记一级评论
POST
https://api.getoneapi.com/api/xiaohongshu-v2/fetch_note_comment请求参数
Header 参数
Authorization
string
必需
在 Header 添加参数 Authorization,其值为在 Bearer 之后拼接 apikey
默认值:
Bearer YOUR_API_KEY
Content-Type
string
必需
默认值:
application/json
Body 参数
application/jsonnote_id
string
笔记ID
必需
示例值:
68bebd21000000001b03315d
share_text
string
小红书分享链接(支持APP和Web端分享链接)
可选
优先使用note_id,如果没有则使用share_text,两个参数二选一,如都携带则以note_id为准
cursor
string
分页游标
可选
首次请求留空,翻页时传入上一次响应中返回的 cursor 值
index
string
评论索引
可选
首次请求传 0,翻页时传入上一次响应中返回的 index 值
pageArea
string
折叠状态
可选
默认 "UNFOLDED"(展开),翻页时传入上一次响应中返回的 pageArea 值
默认值:
UNFOLDED
sort_strategy
enum<string>
排序
可选
枚举值:
latest_v2
最新 按时间倒序,默认使用
like_count
最热 按点赞数排序
默认值:
latest_v2
示例
{
"note_id" : "68bebd21000000001b03315d",
"share_text" : "",
"cursor" : "",
"index" : 0,
"pageArea" : "UNFOLDED",
"sort_strategy" : "latest_v2"
}返回响应
响应 200
application/jsoncode
integer
必需
message
string
必需
data
object
必需
示例
{
"code" : 200,
"message" : "success",
"data" : { }
}请求示例代码
替换 YOUR_API_KEY、参数占位符与请求数据后使用。第三方客户端需先安装对应依赖。
curl --globoff --request POST 'https://api.getoneapi.com/api/xiaohongshu-v2/fetch_note_comment' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"note_id" : "68bebd21000000001b03315d",
"share_text" : "",
"cursor" : "",
"index" : 0,
"pageArea" : "UNFOLDED",
"sort_strategy" : "latest_v2"
}'