支持以下两种方式(任选其一):
Authorization: Bearer YOUR_API_KEY
"api_key": "YOUR_API_KEY"
| 参数名 | 类型 | 说明 |
|---|---|---|
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 -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=图文)"
}
}'
如果您不习惯使用 Header,可以将 API Key 直接放在 Body 里:
{
"api_key": "sk-xxxxxxxx",
"api_id": 1,
"params": {
"page": "页码",
"keywords": "关键词",
"timeScope": "时间范围(一周内=2,半年内=3)",
"sort": "排序(最多点赞2、最多评论3)",
"noteType": "笔记类型(1=视频,2=图文)"
}
}
| 参数名 | 类型 | 说明 |
|---|---|---|
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="
}
]
}
}