英國採購 API 教學:修正 stages=tender 篩選漏掉 94% 公告的問題
UK tender APIs: the stages= filter that silently drops 94% of Find a Tender notices (and 4 other gotchas)
重點導讀
抓取英國政府採購公告時,兩個 API 看起來相似,篩選和分頁方式卻可能讓程式少抓大量資料。
- 作者實測 Contracts Finder 和 Find a Tender,發現 Find a Tender 加上 stages=tender 後,7 天內只回傳 28 筆。
- 自行翻完所有頁面再看公告標籤,則找到 473 筆招標公告。作者建議不要使用這個篩選,而是逐頁讀取資料,再依標籤保留招標公告,並排除已取消的公告。文章也整理兩個 API 各自使用的日期欄位,以及 Contracts Finder 遇到 HTTP 429 時可用的等待與重試方式。
AI 伴隨問答
針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:
信源出處dev.to
UK tender APIs: the stages= filter that silently drops 94% of Find a Tender notices (and 4 other gotchas)
本文為 888news 精選之重點導讀。若需閱讀作者完整原文、技術細節與官方討論,請前往原始網站。
來源: Dev.to Top Tech (dev.to)
開啟原文