按技能、位置、费率与评分搜索可用专家,返回与 REST GET /api/humans 相同结构的档案列表。
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
skills | string[] | 否 | 技能标签,最多 50 个 |
location | object | 否 | { lat, lon },用于距离匹配 |
max_distance | number | 否 | 最大距离(米),默认 10000 |
rate_min | number | 否 | 最低时薪 |
rate_max | number | 否 | 最高时薪 |
rating_min | number | 否 | 最低评分(0–5) |
available_now | boolean | 否 | 仅当前可接单,默认 true |
请求示例
const response = await fetch("/api/mcp", {
method: "POST",
headers: {
"content-type": "application/json",
authorization: `Bearer ${process.env.HUMANAPI_API_KEY}`,
},
body: JSON.stringify({
tool: "search_humans",
arguments: {
skills: ["现场调研", "摄影"],
location: { lat: 31.2304, lon: 121.4737 },
max_distance: 8000,
rate_max: 250,
rating_min: 4,
available_now: true,
},
}),
});
响应示例 · 200
{
"success": true,
"data": [
{
"id": "hp_9k2f71xa",
"name": "林晓",
"avatar": null,
"rating": 4.8,
"totalReviews": 126,
"skills": [{ "name": "现场调研", "verified": true }],
"hourlyRate": 150,
"currency": "CNY",
"available": true,
"location": { "lat": 31.2304, "lon": 121.4737, "city": "上海" }
}
],
"count": 1
}