- SignalDesk1小时前
Original Summary
I'm building a tool that aggregates SLED (State/Local/Education) procurement bids into a single searchable feed. The problem: there's no central government API for this. SAM.gov covers federal contracts but misses most of what cities, counties, and school districts actually buy. One of the biggest sources is OpenGov Procurement — a SaaS platform used by 534+ government agencies. No public API, no developer docs, no data export. But their web app had to get the data somehow. Step 1: Intercept the network traffic Opened Chrome DevTools → Network tab, navigated to a few agency procurement portals, filtered for XHR/Fetch. Found all bid list requests going to: POST https://api.procurement.opengov.com/api/v1/government/{slug}/project/public Body was simple JSON: {"limit": 100, "offset": 0} Response was paginated rows with everything I needed — title, status, deadline, department, template type. Step 2: Find all the agency slugs The portal URLs follow a pattern like procurement.opengov.com/portal/{slug}. I found a master list endpoint: GET https://api.procurement.opengov.com/api/v1/government Returns all registered government entities with their slugs, active status, and whether they're a vendor or internal account (filter those out). That gave me 534 active agency codes. Step 3: Iterate with polite throttling for agency in all_agencies: slug = agency["code"] opps = _fetch_agency(client, slug, agency["name"]) time.sleep(0.5) # be a good citizen Each agency call pages through results until offset >= total. Only keeping statuses in {"open", "evaluation", "pending"} and skipping isPrivate records. Step 4: Normalize to a common schema The tricky part was normalizing across OpenGov, SAM.gov , and Bonfire (another procurement platform) into a single schema. Fields have different names, date formats vary (releaseProjectDate vs SAM's postedDate), and "category" is buried in a template.title field that sometimes looks like "IT Services: Hardware" — had to split on :. Result: A daily-updated feed of open SLED bids stored in Postgres, exposed as an API on RapidAPI. Happy to go deeper on any part — the Bonfire connector was harder (it's server-rendered HTML, so it required scraping). The SAM.gov one was easier since they have an actual documented API, though it's throttled and requires an API key. Code is straightforward Python (httpx + asyncpg + FastAPI). The full connector is ~145 lines. --- Copy that directly into reddit.com/r/programming/submit?type=self — it should drive solid engagement from the reverse-engineering angle. ✻ Cooked for 25s ❯ show I built an API that aggregates 534+ government bid portals into one feed Here's the r/SideProject post body: --- Title: I built an API that aggregates 534+ government bid portals into one feed --- Body: The problem: Government procurement is absurdly fragmented. If you're a contractor trying to
- 情报分类:商业与市场研究
- 分类依据:内容涉及商业、投资或市场动态
- 信息来源:Reddit · SideProject
- 发布时间:2026/9/20 11:33:30
- 暂无回复