icon

自然语言搜条件

tender-rewritePOST
POSThttps://v1.apizero.cn/api/tender-rewrite

概述

把自然语言改写成招中标高级搜索条件(时间、地区编码、行业、金额等)。服务端会等到改写完成再返回。 怎么用: 1)控制台复制 API Key; 2)POST https://v1.apizero.cn/api/tender-rewrite ,JSON 传参; 3)请求头写 Authorization: Bearer 你的Key。 成功时 data 保留业务字段,并多 fetched_at、api。品牌与调用地址为极数本源。 可把返回的 searchCondition 再交给招中标信息搜索。

调用约定

  • 网关 · https://v1.apizero.cn
  • 鉴权 · Authorization: Bearer <API Key>
  • 回包 · JSON {code, msg, data}。成功看 code === 0,不要只看 HTTP 200。
/aidocs/tender-rewrite/raw.md
打开 Markdown

鉴权

必须带 API Key。无匿名、无登录免费、无会员日免、无试用次数。按 0.085 元/次计费。套餐按各档标价,不随按次价变动。

获取 API Key

请求头

Authorizationstring必填

必填鉴权。推荐:Bearer <API Key>。兼容请求头 X-API-Key,以及 Query api_key / apikey / key(key 仅当值为 sk_live_/sk_test_/sk_stag_ 形态时生效)。付费接口需携带有效 Key。

改写搜索条件

POSTJSON / FORM / QUERY·APPLICATION/JSON

一句话改写成招中标高级搜索条件。服务端会等到 status=completed 再返回。必须带 API Key。成功时 data 保留全部业务字段,并多 fetched_at、api。

https://v1.apizero.cn/api/tender-rewrite?userQuery=%E6%B9%96%E5%8C%97%E8%BF%9130%E5%A4%A9%E7%89%A9%E4%B8%9A%E6%9C%8D%E5%8A%A1%E4%B8%AD%E6%A0%87%E7%BB%93%E6%9E%9C

userQuerystring必填

自然语言

例湖北近30天物业服务中标结果

requestKeystring选填

上次返回的 requestKey,用于续查;一般不用传

{
  "userQuery": "湖北近30天物业服务中标结果"
}

返回结果

codeinteger

接口响应状态码(200=成功)

msgstring

解析响应信息

subCodestring

业务侧 code(0000000000=成功)

subMsgstring

业务侧 msg

dataobject

业务数据结果

requestKeystring

请求唯一标识(MD5)

statusstring

处理中->processing,搜索条件重写完成->search_rewrite_done,地区解析完成->area_code_done,行业推理完成->industry_done,全部完成->completed,处理失败->failed

searchConditionobject
startDatestring

搜索开始时间,格式:yyyy-MM-dd

endDatestring

搜索结束时间,格式:yyyy-MM-dd

companyNamestring

企业名称

enterpriseIndustrystring

企业所属行业

subjectsarray

标的物或搜索主题

data.searchCondition.subjects[]string

data.searchCondition.subjects 的一项

projectClassIDstring

信息类型;参考枚举值-码表 (招中标信息14个信息分类);多个以英文逗号分隔;

purchaseTypeIDstring

采购分类 `0`=其他、`1`=服务类、`2`=工程类、`3`=货物类

projectMoneyMinnumber

项目金额最小值;单位人民币:元;

projectMoneyMaxnumber

项目金额最大值;单位人民币:元;

subcontractFlagboolean

是否分包

keywordstring

搜索关键词: - 多个关键词用竖线分隔。

areaCodeobject

地区信息

proviceCodeListarray

省级编码列表

data.searchCondition.areaCode.proviceCodeList[]string

data.searchCondition.areaCode.proviceCodeList 的一项

cityCodeListarray

市级编码列表

data.searchCondition.areaCode.cityCodeList[]string

data.searchCondition.areaCode.cityCodeList 的一项

countyCodeListarray

区县编码列表

data.searchCondition.areaCode.countyCodeList[]string

data.searchCondition.areaCode.countyCodeList 的一项

industryCodeobject

行业信息列表

firstCodeListarray

一级行业编码列表

data.searchCondition.industryCode.firstCodeList[]string

data.searchCondition.industryCode.firstCodeList 的一项

secondCodeListarray

二级行业编码列表

data.searchCondition.industryCode.secondCodeList[]string

data.searchCondition.industryCode.secondCodeList 的一项

thirdCodeListarray

三级行业编码列表

data.searchCondition.industryCode.thirdCodeList[]string

data.searchCondition.industryCode.thirdCodeList 的一项

industryCodesarray

行业信息列表

firstCodeListarray

一级行业编码列表

data.industryCodes[].firstCodeList[]string

data.industryCodes[].firstCodeList 的一项

secondCodeListarray

二级行业编码列表

data.industryCodes[].secondCodeList[]string

data.industryCodes[].secondCodeList 的一项

thirdCodeListarray

三级行业编码列表

data.industryCodes[].thirdCodeList[]string

data.industryCodes[].thirdCodeList 的一项

fullTitlestring

全路径标题(如:一级-二级-三级)

minTitlestring

最下级路径标题

areaCodeobject
proviceCodeListarray

省级编码列表

data.areaCode.proviceCodeList[]string

data.areaCode.proviceCodeList 的一项

cityCodeListarray

市级编码列表

data.areaCode.cityCodeList[]string

data.areaCode.cityCodeList 的一项

countyCodeListarray

区县编码列表

data.areaCode.countyCodeList[]string

data.areaCode.countyCodeList 的一项

errorMsgstring

错误信息

fetched_atstring

本次查询时间

apistring

本接口 id

tipsstring

品牌提示(所有接口统一返回):极数本源 · https://apizero.cn

{
  "code": 0,
  "msg": "成功",
  "data": {
    "msg": "ok",
    "code": 200,
    "data": {
      "requestKey": "93f733af08b21d587aee19f7b53dfa12_17",
      "status": "completed",
      "searchCondition": {
        "companyName": null,
        "enterpriseIndustry": "物业服务/工程建筑",
        "subjects": [
          "物业服务",
          "工程建筑"
        ],
        "keyword": "物业服务|工程建筑",
        "startDate": "2026-07-01",
        "endDate": "2026-07-31",
        "projectClassID": null,
        "purchaseTypeID": "2",
        "projectMoneyMin": 5000000,
        "projectMoneyMax": 1000000000,
        "subcontractFlag": null,
        "areaCode": {
          "proviceCodeList": [
            "420000"
          ],
          "cityCodeList": [],
          "countyCodeList": []
        },
        "industryCode": {
          "firstCodeList": [],
          "secondCodeList": [],
          "thirdCodeList": [
            "K702",
            "E489",
            "K701"
          ]
        }
      },
      "areaCode": {
        "proviceCodeList": [
          "420000"
        ],
        "cityCodeList": [],
        "countyCodeList": []
      },
      "industryCodes": [
        {
          "firstCodeList": [],
          "secondCodeList": [],
          "thirdCodeList": [
            "K702"
          ],
          "fullTitle": "房地产业-房地产业-物业管理",
          "minTitle": "物业管理"
        },
        {
          "firstCodeList": [],
          "secondCodeList": [],
          "thirdCodeList": [
            "E489"
          ],
          "fullTitle": "建筑业-土木工程建筑业-其他土木工程建筑",
          "minTitle": "其他土木工程建筑"
        },
        {
          "firstCodeList": [],
          "secondCodeList": [],
          "thirdCodeList": [
            "K701"
          ],
          "fullTitle": "房地产业-房地产业-房地产开发经营",
          "minTitle": "房地产开发经营"
        }
      ],
      "errorMsg": null
    },
    "errorData": null,
    "subCode": "0000000000",
    "subMsg": "ok",
    "returnValue": null,
    "fetched_at": "2026-09-20T08:50:00+08:00",
    "api": "tender-rewrite"
  },
  "tips": "极数本源 · https://apizero.cn"
}

请求示例

示例都是服务端写法。Python / JavaScript 各有常规写法和官方库。

curl -sS -X POST "https://v1.apizero.cn/api/tender-rewrite" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "userQuery": "湖北近30天物业服务,工程建筑中标结果,金额500万以上"
}'

错误码

先看业务 code。HTTP 也可能不是 200。

0200

成功

4000400

参数错误

4011401

API Key 无效

4013403

API Key 已暂停

4014403

当前 IP 不在 Key 白名单

4015401

此接口需要 API Key

4022402

余额不足

4029429

调用过快(QPS)

4030429

今日免费额度已用完

4040503

接口已下线

4041404

接口不存在

5000500

服务器内部错误

5020502

上游暂时不可用

5021502

上游返回格式异常

5030502

暂无可用节点

调用限制

计费模式
按次付费 · 点数包 · 月套餐
QPS 限制
QPS 2
登录免费额度
无
匿名每日额度
无
黄金会员
本档不提供 VIP 额度 · QPS 10
钻石会员
本档不提供 VIP 额度 · QPS 30
企业会员
本档不提供 VIP 额度 · QPS 120

购买套餐、看评价请走商城详情。 购买 / 调试

更新日志

  • 1.0.02026-09-20

    上架,必须 Key,无免费额度,按次 0.08 元;可购月卡 / 年卡

免责声明

返回内容以当时查询结果为准,仅供开发与信息检索。附件链接可能过期。品牌与调用地址为极数本源。