Every public dataset has the same first day problem: you find the endpoint, you get
excited, and then you spend an afternoon discovering that the field names are
different, the date formats are different, the pagination is different, and half
the values arrive as HTML entities.
I ended up normalizing 19 of those sources into a small catalog of JSON APIs and
bulk scrapers. This is a write-up of what actually took the time — not the
deployment, which was the easy part.
What is live
22 datasets, 19 of them live:
| Area | Sources | Why it's annoying upstream |
|---|---|---|
| Government tenders | EU TED v3, UK Contracts Finder / Find a Tender, AusTender | TED needs an expert query string, not plain parameters; UK and AU both use OCDS but with different notice IDs |
| US city permits | NYC, Chicago, Austin, Seattle, San Francisco | Five different Socrata schemas, and only some cities publish contractor or cost |
| Federal money | Grants.gov, NIH RePORTER, NSF | NIH ignores text_search unless you use advanced_text_search, and takes include_fields only as an array |
| BioPharma | ClinicalTrials.gov v2, OpenFDA (recalls, 510(k), Drugs@FDA) | Four recalls endpoints, four payload shapes |
| Corporate / compliance | GLEIF LEI, ProPublica Form 990, Federal Register | GLEIF legal-name filter matches word by word ("Apple Inc." returns Apple Ford), so results need re-ranking |
| Consumer finance | CFPB complaints, FFIEC/CFPB HMDA | Company names must match exactly, and HMDA lags a year |
| Disasters | FEMA declarations, IHP, NFIP claims | Declaration numbers and county FIPS are separate lookups |
| Prediction markets | Kalshi, Polymarket | Two vocabularies for the same real-world question |
| Korea | Upbit, Bithumb, Kraken, Coinbase + ECB FX (kimchi premium) | Kraken's altnames (BTC → XXBTZUSD) are their own mapping problem |
Each one is served as a live JSON API. The tender, US permit, SEC filing and Korea IPO
sources also run as pay-per-record bulk scrapers (9 published so far), for pipelines that
want a dataset instead of a request loop.
The stack, honestly
- Cloudflare Workers for the API layer. Free plan, no server. Each API is a single ES module with zero npm dependencies.
- OpenAPI 3.0 specs per API. That is what gets imported into the marketplace listing, and it forces you to write down the contract instead of discovering it later.
- Cache API with a versioned key (
/v{VERSION}/...) so a code change invalidates cleanly. Upstream TTLs are 15s to 300s depending on the source. - A proxy secret header so the Worker rejects anything that did not arrive through the gateway.
/healthstays open; everything else is fail-closed (401). - A static catalog site on Cloudflare Pages that lists every dataset, its schema, and a sample response.
Total hosting cost so far: 0. The real cost is the reading — every upstream has a
quirk that only shows up in the second week.
Two examples of the quirks worth writing down
ProPublica's ntee[id] parameter returns HTTP 500. Not a deprecation notice, an
error. So the NTEE filter is applied after fetching two pages of 25 and the response
carries meta.warnings telling you how many rows were scanned.
NIH RePORTER ignores criteria.text_search. You get all 76,391 projects back and
a 200, which looks like a working search until you check the result count. The real
parameter is criteria.advanced_text_search.
Neither of those is interesting on its own. Together they are why I stopped treating
"it returned 200" as "it works".
Trying it
- Catalog and samples: https://k-data-lab.pages.dev
- Runnable examples (plain
urllib/fetch, zero dependencies,--demomode that renders a bundled sample response): https://github.com/dhy05109-rgb/kdatalab-public-data-examples
The free tier is 100 requests per month per API, which is enough to evaluate the shape
of the data before you decide anything. Every script in the repo runs in --demo mode
with no key at all, so you can look at the payloads first.
What I would like feedback on
- Schema choices. I flatten records to a fixed field set per dataset and drop anything that looks like personal data (owner names, emails, unit numbers). Is that the right default for permit and tender data, or do you want a raw passthrough mode?
- Bulk vs API. For your pipelines, does pay-per-record bulk export beat a monthly API quota? I genuinely do not know which is more useful.
- Which source next. The candidates I keep coming back to are cyber threat feeds (CISA KEV + NVD + EPSS) and non-US procurement (Canada, Singapore, Japan).
If you run into a 503 or a field that looks wrong, tell me the endpoint — I would rather
fix a bad field than add another dataset.
Disclosure: this is my own side project. The APIs are paid above the free tier; the
catalog, specs and example code are free.
