小红书搜索关键词返回列表

小红书 10.00 积分 / 次

接口调用说明

接口地址 (Endpoint)
POST
鉴权 (Authentication)

支持以下两种方式(任选其一):

  • 推荐 Header: Authorization: Bearer YOUR_API_KEY
  • 可选 Body参数: 在 JSON 中包含 "api_key": "YOUR_API_KEY"
请求参数 (Body Parameters)
参数名 类型 说明
api_id Int 固定值: 1
api_key String (可选)如果不使用Header鉴权,请在此传入 Key
params.page number 页码
params.keywords string 关键词
params.timeScope string 时间范围(一周内=2,半年内=3)
params.sort string 排序(最多点赞2、最多评论3)
params.noteType string 笔记类型(1=视频,2=图文)
调用示例 (cURL)
curl -X POST "https://api2.haofangkeji.com/api/run" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer sk-xxxxxxxx" \
     -d '{
    "api_id": 1,
    "params": {
        "page": "页码",
        "keywords": "关键词",
        "timeScope": "时间范围(一周内=2,半年内=3)",
        "sort": "排序(最多点赞2、最多评论3)",
        "noteType": "笔记类型(1=视频,2=图文)"
    }
}'
JSON Body 完整示范

如果您不习惯使用 Header,可以将 API Key 直接放在 Body 里:

{
    "api_key": "sk-xxxxxxxx",
    "api_id": 1,
    "params": {
        "page": "页码",
        "keywords": "关键词",
        "timeScope": "时间范围(一周内=2,半年内=3)",
        "sort": "排序(最多点赞2、最多评论3)",
        "noteType": "笔记类型(1=视频,2=图文)"
    }
}
响应参数说明 (Response Parameters)
参数名 类型 说明
has_more
string 返回状态,成功为true
items
string
url_default (items.url_default)
string 首图链接
响应示例
{
  "output": {
    "has_more": true,
    "items": [
      {
        "id": "68f79b760000000004013f99",
        "display_title": "你可能不认识我,但是认识一下,包不亏的!",
        "url_default": "http://sns-webpic-qc.xhscdn.com/202601202112/1e54f13d1e46b8334e82a554c2ce18a4/1040g00831ntfu3ivmm005ongjbnnotmjhhpt6g8!nc_n_webp_mw_1",
        "collected_count": 25,
        "comment_count": 23,
        "liked": false,
        "liked_count": 66,
        "shared_count": 16,
        "nick_name": "飞书",
        "url": "https://www.xiaohongshu.com/explore/68f79b760000000004013f99?xsec_token=ABsTUrQ2VmgLYnIMqYcZ-hNAfuxBSrXJiMxyrAQECmUaA=",
        "image_list": [
          "http://sns-webpic-qc.xhscdn.com/202601202112/1e54f13d1e46b8334e82a554c2ce18a4/1040g00831ntfu3ivmm005ongjbnnotmjhhpt6g8!nc_n_webp_mw_1",
          "http://sns-webpic-qc.xhscdn.com/202601202112/95b9a038aedcd3385b1f8cf4d58c9f11/1040g00831ntfu3ivmm1g5ongjbnnotmj4ml9298!nc_n_webp_mw_1",
          "http://sns-webpic-qc.xhscdn.com/202601202112/2b87e6687ce9f88c0d179924b3cf909b/1040g00831ntfu3ivmm105ongjbnnotmjhu4ku6g!nc_n_webp_mw_1",
          "http://sns-webpic-qc.xhscdn.com/202601202112/59956508c9b27c2bba8d1bcd4263bd79/1040g00831ntfu3ivmm0g5ongjbnnotmj4gmv49o!nc_n_webp_mw_1"
        ],
        "publish_time": "2025-10-21",
        "xsec_token": "ABsTUrQ2VmgLYnIMqYcZ-hNAfuxBSrXJiMxyrAQECmUaA="
      }
    ]
  }
}
开始使用

注册账号并充值后即可调用此 API。