AGENT 接入
把 逸飞智标 接进你的 Agent
MCP、RSS、API 三种方式读的是同一份数据:精选、热点、日报、周报和月报,按你用的工具选一种就行。全部匿名只读,不用注册,也不用 API Key。
服务正常版本 1.0.0匿名只读 · 无需 Key
REST API · 1.0.0
匿名 GET,拿来就能用
不用 token;浏览器跨域、curl 和各语言默认的 HTTP 客户端都能直接调。路径是 /api/v1,字段和错误码以 OpenAPI 为准。
第一个请求
curl --compressed 'https://info.yfeiai.com/api/v1/tenders?sort=latest&limit=20'按行业筛选
在项目检索中重复传入 industry 可选一个或多个行业;地区使用六位行政区划代码 region。
| 行业 | 请求参数 |
|---|---|
| 建筑工程与装修 | industry=construction |
| 市政园林与公共设施 | industry=municipal |
| 交通运输与物流 | industry=transport-logistics |
| 水利水务 | industry=water |
| 能源电力 | industry=energy-power |
| 环境保护与环卫 | industry=environment-sanitation |
| 信息技术与通信 | industry=it-telecom |
| 医疗卫生 | industry=healthcare |
| 教育科研 | industry=education-research |
| 农林牧渔 | industry=agriculture |
| 工业制造与机械设备 | industry=industrial-equipment |
| 矿业、冶金与石油化工 | industry=mining-metallurgy-petrochemical |
| 政务与公共安全 | industry=government-public-safety |
| 文化、体育与旅游 | industry=culture-sports-tourism |
| 商务咨询与专业服务 | industry=business-professional-services |
| 物业、餐饮与后勤服务 | industry=property-catering-logistics |
用得省,也更快
- 01开压缩
curl 加
--compressed,其他客户端打开 gzip 或 br。JSON 压缩后只有原来的 1/4 到 1/8。 - 02带上 ETag
保存响应里的 ETag,下次带
If-None-Match;内容没变时返回 304,不传正文。 - 03按节奏取
项目列表按 Cache-Control 轮询;日报每天 08:00 后取一次,周报、月报出刊后取一次。完整镜像只做一次快照,之后读取变更。
内容多久变一次:招标公告全天陆续更新,日报每天 08:00、周报每周一 10:00、月报每月 1 日 10:30(北京时间)各一期。
接口一览
| 路径 | 用来做什么 | 多久取一次 |
|---|---|---|
| 项目与公告 | ||
/api/v1/tenders | 搜索项目,可按关键词、行业、地区、阶段、状态、日期和预算筛选 | 按 Cache-Control |
/api/v1/tenders/{id} | 一个项目的公告、标段、附件元数据和证据 | 需要时 |
/api/v1/notices/{id} | 一则官方公告的公开元数据 | 需要时 |
/api/v1/attachments/{id} | 附件元数据、扫描/解析状态和证据定位,不含本地副本与提取正文 | 需要时 |
| 专题列表 | ||
/api/v1/closing | 指定天数内即将截止的项目 | 按 Cache-Control |
/api/v1/awards | 最新中标结果 | 按 Cache-Control |
/api/v1/coverage | 官方来源接入状态统计 | 5 分钟一次 |
/api/v1/industries | 行业字典 | 版本升级时 |
/api/v1/regions | 行政区划代码与名称 | 版本升级时 |
/api/v1/notice-stages | 公告阶段字典 | 版本升级时 |
| 招标简报 | ||
/api/v1/reports/{kind} | 最新日报、周报或月报及期次索引 | 出刊后一次 |
/api/v1/reports/{kind}/{key} | 指定一期简报 | 缓存过期后用 ETag |
| 给 AI 助手 | ||
/api/v1/agent | 给 Agent 的使用说明,列出的地址返回整理好的中文 Markdown | 需要时 |
| 完整公开镜像 | ||
/api/v1/snapshot | 固定 asOf 的全量公开项目快照 | 只在第一次或游标丢失时 |
/api/v1/changes | 公告、修订与项目状态的有序 upsert | 按 Cache-Control |
常见用法
bash
# 第一次:保存响应头里的 ETag
curl --compressed -i 'https://info.yfeiai.com/api/v1/tenders?sort=latest&limit=20'
# 之后最快每分钟一次,带上 ETag;返回 304 就是没变化
curl --compressed -i -H 'If-None-Match: <上次的 ETag>' 'https://info.yfeiai.com/api/v1/tenders?sort=latest&limit=20'需要继续翻页时,把 nextCursor 原样作为 cursor 传回同一个检索;不要解析或拼接 cursor。
出错了怎么办
- 400
- 参数不对:按 OpenAPI 和返回的 code 修正,不要自动换成更宽的查询。cursor 无效时从对应列表第一页重来。
- 409
- snapshot_required:增量没法安全续上,重新取一次完整快照。
- 429
- 请求太密:按 Retry-After 等待,不要并发重试。
- 5xx
- 指数退避,先用上次成功的结果;公开服务不承诺 SLA。
能匿名调用不等于所有用途都获许可,见使用规则。