小红书蒲公英 API - KOL搜索 (V1)
使用多种筛选条件搜索KOL。
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
token | query | string | 是 | 用户鉴权令牌。 |
searchType | query | string | 否 | 搜索条件类型。 可用值: - NICKNAME:按昵称搜索- NOTE:按备注内容搜索 |
keyword | query | string | 否 | 搜索关键词。 |
page | query | integer | 否 | 页码。 |
fansNumberLower | query | integer | 否 | 最低粉丝数。 |
fansNumberUpper | query | integer | 否 | 最大粉丝数。 |
fansAge | query | string | 否 | 目标粉丝年龄群体。 可用值: - ALL: 所有年龄段- LT_18: 18岁以下- AGE_18_24: 18至24岁- AGE_25_34: 25至34岁- AGE_35_44: 35至44岁- GT_44: 44岁以上 |
fansGender | query | string | 否 | 目标粉丝性别。 可用值: - ALL: 所有性别- MALE_HIGH: 主要男性- FE_MALE_HIGH: 主要女性 |
gender | query | string | 否 | KOL的性别。 可选值: - ALL: 所有性别- MALE: 男性- FEMALE: 女性 |
contentTag | query | string | 否 | 内容类别,以逗号分隔。 |
代码示例
💡 环境说明
默认示例使用 https://api.justoneapi.com (prod-global)。中国大陆地区建议替换为 http://47.117.133.51:30015 (prod-cn) 以获得更好的访问体验。详见 环境选择。
bash
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/xiaohongshu-pgy/api/solar/cooperator/blogger/v2/v1?token=YOUR_API_KEY"text
我想使用 Just One API 提供的“KOL搜索 (V1)”接口。
接口地址: https://api.justoneapi.com/api/xiaohongshu-pgy/api/solar/cooperator/blogger/v2/v1
HTTP 方法: GET
身份验证: 在 URL 后添加查询参数“?token=您的API密钥”。
OpenAPI 定义: https://docs.justoneapi.com/openapi/xiaohongshu-pgy-apis/kol-search-v1-zh.json
请求参数说明:
- token (query): 用户鉴权令牌。 (必填)
- searchType (query): 搜索条件类型。
可用值:
- `NICKNAME`:按昵称搜索
- `NOTE`:按备注内容搜索
- keyword (query): 搜索关键词。
- page (query): 页码。
- fansNumberLower (query): 最低粉丝数。
- fansNumberUpper (query): 最大粉丝数。
- fansAge (query): 目标粉丝年龄群体。
可用值:
- `ALL`: 所有年龄段
- `LT_18`: 18岁以下
- `AGE_18_24`: 18至24岁
- `AGE_25_34`: 25至34岁
- `AGE_35_44`: 35至44岁
- `GT_44`: 44岁以上
- fansGender (query): 目标粉丝性别。
可用值:
- `ALL`: 所有性别
- `MALE_HIGH`: 主要男性
- `FE_MALE_HIGH`: 主要女性
- gender (query): KOL的性别。
可选值:
- `ALL`: 所有性别
- `MALE`: 男性
- `FEMALE`: 女性
- contentTag (query): 内容类别,以逗号分隔。
返回格式: JSON
响应处理与错误码:
1. 需通过返回体中的 "code" 字段判断业务结果(code 为 0 表示成功)。
2. 超时建议:建议将请求超时时间设置为至少 60 秒。
3. 业务码说明:
- 0: 成功
- 100: Token 无效或已失效
- 301: 采集失败,请重试
- 302: 超出速率限制
- 303: 超出每日配额
- 400: 参数错误
- 500: 内部服务器错误
- 600: 权限不足
- 601: 余额不足
请帮我用我擅长的编程语言写一个脚本来调用这个接口,并处理返回结果。python
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import requests
url = "https://api.justoneapi.com/api/xiaohongshu-pgy/api/solar/cooperator/blogger/v2/v1?token=YOUR_API_KEY"
response = requests.get(url)
print(response.json())js
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/xiaohongshu-pgy/api/solar/cooperator/blogger/v2/v1?token=YOUR_API_KEY", {
method: "GET"
});
const data = await response.json();
console.log(data);java
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.justoneapi.com/api/xiaohongshu-pgy/api/solar/cooperator/blogger/v2/v1?token=YOUR_API_KEY"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}go
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
url := "https://api.justoneapi.com/api/xiaohongshu-pgy/api/solar/cooperator/blogger/v2/v1?token=YOUR_API_KEY"
req, _ := http.NewRequest("GET", url, nil)
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}php
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/xiaohongshu-pgy/api/solar/cooperator/blogger/v2/v1?token=YOUR_API_KEY");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;响应结果
json
{
"code": 0,
"data": {
"kols": [
{
"userId": "5fe83d6600000000010078c7",
"valid": 1,
"headPhoto": "https://sns-avatar-qc.xhscdn.com/avatar/1040g2jo31sdek3jr68kg5nv87lj08u676pictl8?imageView2/2/w/120/...",
"name": "鹤竹zzzz",
"redId": "1032482443",
"location": "天津",
"homePageDisplay": 1,
"travelAreaList": null,
"type": [],
"personalTags": null,
"fansCount": 0,
"likeCollectCountInfo": null,
"businessNoteCount": 0,
"totalNoteCount": null,
"recommend": null,
"picturePrice": 158,
"videoPrice": 9999999,
"lowerPrice": 158,
"userType": 2,
"showPrice": true,
"pictureState": 1,
"videoState": 1,
"isCollect": false,
"cooperateState": 1,
"pictureInCart": null,
"videoInCart": null,
"note": null,
"live": null,
"cps": null,
"noteSign": null,
"liveSign": null,
"goodRecommendPermission": null,
"cpc": null,
"pictureCpcBasePrice": "0",
"pictureCpcPerPrice": "0",
"pictureCpcEstimateNum": null,
"videoCpcState": null,
"videoCpcBasePrice": "0",
"videoCpcPerPrice": "0",
"videoCpcEstimateNum": null,
"pictureCpcInCart": null,
"videoCpcInCart": null,
"contentTags": [
{
"taxonomy1Tag": "兴趣爱好",
"taxonomy2Tags": [
"阅读"
]
}
],
"featureTags": null,
"industryTag": null,
"gender": "女",
"picPriceRemind": null,
"videoPriceRemind": null,
"currentLevel": 2,
"nextLevel": -1,
"priceState": 1,
"resemblance": true,
"noteList": [
{
"noteId": "69a976c3000000000e00e3ff",
"noteType": 1,
"imageUrl": "http://ci.xiaohongshu.com/1040g00831tb5h0ullmqg5nv87lj08u67r2ncvv8?imageView2/2/w/540/format/jpg/q/7...",
"featureTags": [],
"contentTag": "文化艺术",
"industryTags": null,
"bind": false
}
],
"tradeType": null,
"clickMidNum": 7972,
"clickMidNumMcn": 0,
"interMidNum": 1138,
"fansNum": 4544,
"matchNoteNumber": 0,
"authorityList": null,
"processingAuthorities": null,
"pictureShowState": null,
"videoShowState": null,
"classifyCode": 1,
"predictiveExposure": 0,
"efficiencyValidUser": 0,
"pictureReadCost": "0.31",
"videoReadCost": "0.00",
"pictureClickMidNum": 14139,
"pictureInterMidNum": 1957,
"videoClickMidNum": 0,
"videoFinishRate": 0,
"videoInterMidNum": 0,
"fans30GrowthRate": 130.9,
"fans30GrowthNum": 0,
"nextPicturePrice": null,
"nextVideoPrice": null,
"fansRiseNum": null,
"fansEngageNum": null,
"overflowNum": null,
"newHighQuality": 0,
"isIndustryRecommend": false,
"picturePriceGtZero": true,
"videoPriceGtZero": true,
"lowActive": true,
"fansActiveIn28dLv": 98.8,
"fansEngageNum30dLv": 43,
"hundredLikePercent30": 80,
"thousandLikePercent30": 60,
"pictureHundredLikePercent30": 80,
"pictureThousandLikePercent30": 60,
"videoHundredLikePercent30": 0,
"videoThousandLikePercent30": 0,
"cooperType": 1,
"buyerType": 2,
"promiseImpNum": "0",
"kolType": 0,
"showPromiseTag": 0,
"activityList": [],
"controlState": 0,
"clothingIndustryPrice": {
"bizType": null,
"industryId": 0,
"picturePrice": 0,
"pictureState": 0,
"videoPrice": 0,
"videoState": 0
},
"fbState": 0,
"forecastReadUvLower": 0,
"forecastReadUvUpper": 0,
"forecastGroupCoverRateLower": 0,
"forecastGroupCoverRateUpper": 0,
"intentionInfo": {
"intentionText": "",
"intentionType": 0
},
"seedAndHarcest": null,
"liveImg": null,
"liveId": null,
"liveGMV": null,
"isStar": null,
"top2CategoryList": null,
"hasBuyerAuth": true,
"sellerRealIncomeAmt90d": 0,
"estimatePictureCpm": 5.26,
"estimatePictureCpmCompare": 97.8,
"estimateVideoCpm": 0,
"estimateVideoCpmCompare": 47,
"estimatePictureEngageCost": 0.07,
"estimatePictureEngageCostCompare": 97.8,
"estimateVideoEngageCost": 0,
"estimateVideoEngageCostCompare": 47,
"inviteReply48hNumRatio": 31.3,
"recommendReason": null,
"kolHeadLabel": 0,
"accumCoopImpMedinNum30d": 0,
"estimateCpuv30d": 0,
"accumPicCommonImpMedinNum30d": 30032,
"accumVideoCommonImpMedinNum30d": 0,
"accumCommonImpMedinNum30d": 22663,
"marketTarget": null,
"readMidCoop30": 0,
"interMidCoop30": 0,
"coopNoteNum30d": 0,
"specialIndustryLimit": false,
"kliveCnt30d": 0,
"avgAgmv90d": 0,
"avgLiveViewerNum": 0,
"algoRecommendReasons": null,
"mcpuvNum30d": 0,
"mengagementNumMcn": 0,
"mengagementNum": 1278,
"mEngagementNum": 1278,
"mEngagementNumMcn": 0,
"mCpuvNum30d": 0
}
],
"total": 5000,
"trackId": "kolSearch_00fbc9950e0d451ba597c36cafd6b555",
"highlightWords": [],
"resultType": 1,
"redirect2NickSearch": false
}
}💡 提示:为简化展示,列表类数据样例仅保留 1-2 条记录,实际返回条数以接口响应为准。
