Xiaohongshu-V2/小红书V2
搜索笔记
POST
https://api.getoneapi.com/api/xiaohongshu-v2/search_notes请求参数
Header 参数
Authorization
string
必需
在 Header 添加参数 Authorization,其值为在 Bearer 之后拼接 apikey
默认值:
Bearer YOUR_API_KEY
Content-Type
string
必需
默认值:
application/json
Body 参数
application/jsonkeyword
string
关键词
必需
page
number
页数
必需
从1开始
默认值:
1
sort_type
enum<string>
排序
必需
枚举值:
general
综合 默认
time_descending
最新 按时间倒序
popularity_descending
最多点赞 按点赞数排序
comment_descending
最多评论 按评论数排序
collect_descending
最多收藏 按收藏数排序
english_preferred
英文优先
默认值:
general
note_type
enum<string>
笔记类型
必需
枚举值:
不限
所有类型 默认
视频笔记
仅视频
普通笔记
仅图文
直播笔记
仅直播
默认值:
不限
time_filter
enum<string>
发布时间
必需
不传默认不限
枚举值:
不限
所有时间 默认
一天内
24小时内
一周内
7天内
半年内
6个月内
默认值:
不限
search_id
string
搜索ID
可选
翻页时传入首次搜索返回的值
search_session_id
string
搜索会话ID
可选
翻页时传入首次搜索返回的值
source
string
来源
可选
默认值:
explore_feed
ai_mode
enum<integer>
AI模式
可选
枚举值:
0
关闭
1
开启
默认值:
0
示例
{
"keyword" : "罗永浩",
"page" : 1,
"sort_type" : "general",
"note_type" : "不限",
"time_filter" : "不限",
"search_id" : "",
"search_session_id" : "",
"source" : "explore_feed",
"ai_mode" : 0
}返回响应
响应 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/search_notes' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"keyword" : "罗永浩",
"page" : 1,
"sort_type" : "general",
"note_type" : "不限",
"time_filter" : "不限",
"search_id" : "",
"search_session_id" : "",
"source" : "explore_feed",
"ai_mode" : 0
}'