# 招标项目推荐供应商

> 来源：https://ai.zhiliaobiaoxun.com/docs/api/find-bidders
> 全部接口（单文件）：https://ai.zhiliaobiaoxun.com/llms-full.txt

根据标讯唯一键、链接或项目标题，推荐历史上参与同类项目较多的潜在供应商。

- 请求：`POST https://mcp-server.zhiliaobiaoxun.com/api_v2/find_potential_bidders`
- 计费：单次调用 1 积分（失败或 0 条结果不扣费）

## 调用示例

```bash
curl -X POST "https://mcp-server.zhiliaobiaoxun.com/api_v2/find_potential_bidders" \
  -H "X-API-Key: $ZLBX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"uniq_key":"48fc44301b90abf69a6bf5d0a7818438641615ce","limit":10}'
```

## 请求参数（Body，JSON）

| 参数 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
| uniq_key | string | 否 |  | 平台标讯唯一键（与下列组合互斥，四选一必填场景之一） |
| bid_id | int \| string | 否 |  | 标讯 ID，需配合 bid_type |
| bid_type | int | 否 |  | 标讯类型枚举值，与 bid_id 同时提供（1: 招标, 2: 中标） |
| bid_url | string | 否 |  | 知了标讯公告详情页链接 |
| project_title | string | 否 |  | 项目标题文本（无 ID 时用于召回相似项目） |
| limit | number | 否 | 20 | 返回推荐数量 |

## 响应示例

```json
{
	"success": true,
	"data": {
		"project_title": "市级政务云资源扩容及安全加固项目",
		"project_bid_id": 589738777,
		"project_bid_type": 1,
		"caller_name": "某市大数据管理局",
		"province": "广东省",
		"city": "深圳市",
		"sm_names": ["政务云", "安全加固"],
		"total": 2,
		"bidders": [{
			"company_name": "某某科技股份有限公司",
			"company_id": 10087220,
			"match_reason": "曾为该招标方供货12次；该地区同类产品中标28次",
			"caller_history_count": 12,
			"caller_history_amount_wan": 1250.0,
			"region_win_count": 28,
			"region_win_amount_wan": 3680.0,
			"last_cooperation_time": "2024-03-10",
			"latest_win_time": "2024-03-18",
			"matched_products": ["政务云", "等保三级"],
			"main_customers": ["某市大数据管理局", "某区政数局"]
		}]
	},
	"error": null,
	"meta": {
		"request_id": "req_0c77d901",
		"tool_name": "find_potential_bidders",
		"cost_units": 1,
		"execution_time_ms": 265
	}
}
```

## 返回字段

| 字段 | 类型 | 说明 |
|---|---|---|
| success | boolean | 请求是否成功 |
| data | object | 业务数据，结构随接口而异，字段见下表 |
| error | object\|null | 错误信息，成功时为 null |
| error.code | string | 失败时的错误码，如 MISSING_REQUIRED_PARAMETER、QUERY_EMPTY、NOT_FOUND、QUOTA_EXCEEDED |
| error.message | string | 失败时的错误描述 |
| error.details | object\|null | 失败时的补充信息 |
| error.suggestions | string[]\|null | 失败时的排查/重试建议 |
| meta | object | 元信息 |
| meta.request_id | string | 本次请求 ID，排查问题时提供 |
| meta.tool_name | string | 调用的接口名 |
| meta.cost_units | float | 本次调用实际扣除的积分 |
| meta.execution_time_ms | int | 服务端执行耗时（毫秒） |
| data.need_selection | boolean | 按 project_title 命中多条时为 true，此时需用 bid_id+bid_type 或 uniq_key 重新调用 |
| data.message | string | need_selection=true 时的提示文案 |
| data.candidates[] | object[] | need_selection=true 时的候选项目列表，元素字段见下 |
| data.candidates[].bid_id | int | 候选标讯 ID |
| data.candidates[].bid_type | int | 候选标讯类型：1=招标，2=中标 |
| data.candidates[].uniq_key | string | 候选标讯平台侧唯一键 |
| data.candidates[].title | string | 候选公告标题 |
| data.candidates[].pub_time | string | 候选公告发布时间 |
| data.candidates[].money_wan | float\|null | 候选项目金额（万元） |
| data.candidates[].caller_name | string | 候选项目招标方名称 |
| data.candidates[].province | string | 候选项目省份 |
| data.candidates[].city | string | 候选项目城市 |
| data.project_title | string | 目标项目标题 |
| data.project_bid_id | int\|null | 目标项目标讯 ID |
| data.project_bid_type | int\|null | 目标项目标讯类型：1=招标，2=中标 |
| data.caller_name | string | 目标项目招标方名称 |
| data.province | string | 目标项目省份 |
| data.city | string | 目标项目城市 |
| data.sm_names | string[] | 目标项目标的物列表 |
| data.total | int | 推荐供应商数量 |
| data.bidders[] | object[] | 推荐供应商列表，元素字段见下 |
| data.bidders[].company_name | string | 供应商名称 |
| data.bidders[].company_id | int\|null | 供应商 ID |
| data.bidders[].match_reason | string | 推荐理由，如「曾为该招标方供货3次；该地区同类产品中标5次」 |
| data.bidders[].caller_history_count | int | 曾为该招标方供货次数 |
| data.bidders[].caller_history_amount_wan | float\|null | 为该招标方历史供货金额（万元） |
| data.bidders[].region_win_count | int | 该地区同类产品中标次数 |
| data.bidders[].region_win_amount_wan | float\|null | 该地区同类产品中标金额（万元） |
| data.bidders[].last_cooperation_time | string | 最近一次与该招标方合作时间 |
| data.bidders[].latest_win_time | string | 最近一次中标时间 |
| data.bidders[].matched_products | string[] | 与目标项目匹配的标的物（最多 10 个） |
| data.bidders[].main_customers | string[] | 该供应商的主要客户（最多 10 个） |

## 通用约定

- 鉴权：请求头 `X-API-Key: <你的 API Key>`，不是 `Authorization: Bearer`；Key 在 https://ai.zhiliaobiaoxun.com/dashboard/api-keys 获取，示例从环境变量 `ZLBX_API_KEY` 读取
- 响应信封：`{"success", "data", "error": {"code", "message", "suggestions"}, "meta": {"request_id", "cost_units"}}`
- 业务成功与业务失败都返回 HTTP 200，以响应体的 `success` 判断成败，以 `error.code` 分支处理
- 请求体结构或类型不合法（如 page 传了字符串）返回 HTTP 422，响应体为 `{"detail": [{"loc": [...], "msg": "..."}]}`，不是统一信封
- 按积分计费，各接口单价见接口文档；实际扣费以响应 `meta.cost_units` 为准
- 调用失败或 0 条结果不扣费
- 错误码：`INVALID_APP_KEY`（不可重试） · `APP_KEY_EXPIRED`（不可重试） · `APP_KEY_DISABLED`（不可重试） · `QUOTA_EXCEEDED`（不可重试） · `ENTITLEMENT_REQUIRED`（不可重试） · `RATE_LIMIT_EXCEEDED`（可重试） · `MISSING_REQUIRED_PARAMETER`（修改请求后重试） · `INVALID_PARAMETER`（修改请求后重试） · `QUERY_TIMEOUT`（修改请求后重试） · `QUERY_TOO_LARGE`（修改请求后重试） · `QUERY_EMPTY`（不可重试） · `NOT_FOUND`（不可重试） · `ES_UNAVAILABLE`（可重试） · `DB_UNAVAILABLE`（可重试） · `INTERNAL_ERROR`（可重试）
- 完整错误码、频率限制与全部接口：https://ai.zhiliaobiaoxun.com/docs/api.md
