- MoreAPI接口说明
- 更新记录
- 抖音API
- 获取视频详情POST
- 获取视频详情 V3POST
- 获取视频详情V4POST
- 获取用户信息POST
- 获取用户信息 _V2POST
- 获取用户信息 _V3POST
- 获取用户信息 _V4POST
- 获取直播间信息与视频流直链POST
- 获取视频一级评论POST
- 获取视频子评论POST
- 综合搜索POST
- 获取开放直播间用户列表POST
- 搜索话题POST
- 获取话题视频POST
- 获取视频弹幕POST
- 搜索用户POST
- 搜索用户V2POST
- 搜索用户V3POST
- 搜索直播用户POST
- 搜索直播用户V2POST
- 获取视频短连接POST
- 生成视频抖音码POST
- 获取用户主页发布POST
- 获取直播间商品列表POST
- 搜索视频POST
- 搜索音乐POST
- 获取音乐详情POST
- 获取话题详情POST
- 获取音乐相关视频POST
- 搜索视频V2POST
- 获取用户最新作品V2POST
- 获取用户合集POST
- 获取合集视频列表POST
- 搜索用户指定作品POST
- 用户喜欢的作品POST
- 搜索长尾关键词POST
- 热点讨论POST
- 获取短剧详细信息POST
- 获取短剧视频列表POST
- 获取用户短剧集POST
- 用户橱窗销售信息POST
- 获取合集信息POST
- TikTok
- Lemon8
- 快手API
- 小红书API
- 微博API
- 哔哩哔哩API
- 头条 | 西瓜 API
- 榜单API
- youtube
- cookie池
- 创作者API
搜索联想关键词
正式环境
正式环境
POST
/api/xhs/search_suggestion
📌
response_status
、response_body
、response_headers
,分别对应小红书返回的响应码
,响应体
,响应头
,其中response_body
内容字段与原有的保持一致。
请求参数
Body 参数application/json
keyword
string
关键词
示例
{
"keyword": "周六加班"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/xhs/search_suggestion' \
--header 'Content-Type: application/json' \
--data-raw '{
"keyword":"周六加班"
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
msg
string
必需
data
object
必需
search_cpl_id
string
必需
word_request_id
string
必需
sug_items
array [object {4}]
必需
示例
{
"code": 200,
"msg": "success",
"path": "/api/xhs/search_suggestion",
"data": {
"response_status": 200,
"response_body": {
"code": 1000,
"success": true,
"msg": "成功",
"data": {
"search_cpl_id": "8457901396ff49639f0ec410fb941c9f",
"word_request_id": "296f8c11-9348-4cba-af1e-bb28d069c1cb#1725887499552",
"sug_items": [
{
"search_type": "notes",
"type": "top_note",
"text": "周六加班幽默文案",
"highlight_flags": [
true,
true,
true,
true,
false,
false,
false,
false
]
},
{
"text": "周六加班文案",
"highlight_flags": [
true,
true,
true,
true,
false,
false
],
"search_type": "notes",
"type": "top_note"
},
{
"text": "周六加班朋友圈文案",
"highlight_flags": [
true,
true,
true,
true,
false,
false,
false,
false,
false
],
"search_type": "notes",
"type": "top_note"
},
{
"search_type": "notes",
"type": "top_note",
"text": "周六加班文案图片",
"highlight_flags": [
true,
true,
true,
true,
false,
false,
false,
false
]
},
{
"text": "周六加班表情包",
"highlight_flags": [
true,
true,
true,
true,
false,
false,
false
],
"search_type": "notes",
"type": "top_note"
},
{
"text": "周六加班文案高级",
"highlight_flags": [
true,
true,
true,
true,
false,
false,
false,
false
],
"search_type": "notes",
"type": "top_note"
},
{
"text": "周六加班文案搞笑",
"highlight_flags": [
true,
true,
true,
true,
false,
false,
false,
false
],
"search_type": "notes",
"type": "top_note"
},
{
"text": "周六加班不想去怎么办",
"highlight_flags": [
true,
true,
true,
true,
false,
false,
false,
false,
false,
false
],
"search_type": "notes",
"type": "top_note"
},
{
"text": "周六加班费怎么算",
"highlight_flags": [
true,
true,
true,
true,
false,
false,
false,
false
],
"search_type": "notes",
"type": "top_note"
},
{
"text": "周六加班通知",
"highlight_flags": [
true,
true,
true,
true,
false,
false
],
"search_type": "notes",
"type": "top_note"
}
]
}
},
"response_headers": {
"date": "Mon, 09 Sep 2024 13:11:39 GMT",
"content-type": "application/json; charset=utf-8",
"transfer-encoding": "chunked",
"connection": "keep-alive",
"alt-svc": "h3=\":443\"; ma=3600,quic=\":443\"; v=\"46,43,39\"; ma=3600",
"access-control-allow-credentials": "true",
"access-control-allow-origin": "https://www.xiaohongshu.com",
"request-id": "27b047d07b8e44e384796f52cb959d2a",
"x-kong-sign": "0",
"xhs-request-time": "0.074",
"content-encoding": "gzip",
"xhs-real-ip": "117.188.20.104"
}
}
}
修改于 2024-09-25 17:15:56