<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: K-Data Lab</title>
    <description>The latest articles on DEV Community by K-Data Lab (@kdatalab).</description>
    <link>https://dev.to/kdatalab</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4261254%2F234791f8-b895-4b40-95d3-c371bc652b66.png</url>
      <title>DEV Community: K-Data Lab</title>
      <link>https://dev.to/kdatalab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kdatalab"/>
    <language>en</language>
    <item>
      <title>How I Built 19 Public-Data APIs &amp; Bulk Datasets Without Paying for Hosting</title>
      <dc:creator>K-Data Lab</dc:creator>
      <pubDate>Mon, 23 Nov 2026 19:18:02 +0000</pubDate>
      <link>https://dev.to/kdatalab/how-i-built-19-public-data-apis-bulk-datasets-without-paying-for-hosting-3fha</link>
      <guid>https://dev.to/kdatalab/how-i-built-19-public-data-apis-bulk-datasets-without-paying-for-hosting-3fha</guid>
      <description>&lt;p&gt;Every public dataset has the same first day problem: you find the endpoint, you get&lt;br&gt;
excited, and then you spend an afternoon discovering that the field names are&lt;br&gt;
different, the date formats are different, the pagination is different, and half&lt;br&gt;
the values arrive as HTML entities.&lt;/p&gt;

&lt;p&gt;I ended up normalizing 19 of those sources into a small catalog of JSON APIs and&lt;br&gt;
bulk scrapers. This is a write-up of what actually took the time — not the&lt;br&gt;
deployment, which was the easy part.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is live
&lt;/h2&gt;

&lt;p&gt;22 datasets, 19 of them live:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Area&lt;/th&gt;
&lt;th&gt;Sources&lt;/th&gt;
&lt;th&gt;Why it's annoying upstream&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Government tenders&lt;/td&gt;
&lt;td&gt;EU TED v3, UK Contracts Finder / Find a Tender, AusTender&lt;/td&gt;
&lt;td&gt;TED needs an expert query string, not plain parameters; UK and AU both use OCDS but with different notice IDs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;US city permits&lt;/td&gt;
&lt;td&gt;NYC, Chicago, Austin, Seattle, San Francisco&lt;/td&gt;
&lt;td&gt;Five different Socrata schemas, and only some cities publish contractor or cost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Federal money&lt;/td&gt;
&lt;td&gt;Grants.gov, NIH RePORTER, NSF&lt;/td&gt;
&lt;td&gt;NIH ignores &lt;code&gt;text_search&lt;/code&gt; unless you use &lt;code&gt;advanced_text_search&lt;/code&gt;, and takes &lt;code&gt;include_fields&lt;/code&gt; only as an array&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BioPharma&lt;/td&gt;
&lt;td&gt;ClinicalTrials.gov v2, OpenFDA (recalls, 510(k), Drugs@FDA)&lt;/td&gt;
&lt;td&gt;Four recalls endpoints, four payload shapes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Corporate / compliance&lt;/td&gt;
&lt;td&gt;GLEIF LEI, ProPublica Form 990, Federal Register&lt;/td&gt;
&lt;td&gt;GLEIF legal-name filter matches word by word ("Apple Inc." returns Apple Ford), so results need re-ranking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Consumer finance&lt;/td&gt;
&lt;td&gt;CFPB complaints, FFIEC/CFPB HMDA&lt;/td&gt;
&lt;td&gt;Company names must match exactly, and HMDA lags a year&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disasters&lt;/td&gt;
&lt;td&gt;FEMA declarations, IHP, NFIP claims&lt;/td&gt;
&lt;td&gt;Declaration numbers and county FIPS are separate lookups&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prediction markets&lt;/td&gt;
&lt;td&gt;Kalshi, Polymarket&lt;/td&gt;
&lt;td&gt;Two vocabularies for the same real-world question&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Korea&lt;/td&gt;
&lt;td&gt;Upbit, Bithumb, Kraken, Coinbase + ECB FX (kimchi premium)&lt;/td&gt;
&lt;td&gt;Kraken's altnames (&lt;code&gt;BTC&lt;/code&gt; → &lt;code&gt;XXBTZUSD&lt;/code&gt;) are their own mapping problem&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each one is served as a live JSON API. The tender, US permit, SEC filing and Korea IPO&lt;br&gt;
sources also run as pay-per-record bulk scrapers (9 published so far), for pipelines that&lt;br&gt;
want a dataset instead of a request loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack, honestly
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cloudflare Workers&lt;/strong&gt; for the API layer. Free plan, no server. Each API is a single
ES module with zero npm dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAPI 3.0&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache API&lt;/strong&gt; with a versioned key (&lt;code&gt;/v{VERSION}/...&lt;/code&gt;) so a code change invalidates
cleanly. Upstream TTLs are 15s to 300s depending on the source.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A proxy secret header&lt;/strong&gt; so the Worker rejects anything that did not arrive through
the gateway. &lt;code&gt;/health&lt;/code&gt; stays open; everything else is fail-closed (401).&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;static catalog site&lt;/strong&gt; on Cloudflare Pages that lists every dataset, its schema,
and a sample response.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Total hosting cost so far: &lt;strong&gt;0&lt;/strong&gt;. The real cost is the reading — every upstream has a&lt;br&gt;
quirk that only shows up in the second week.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two examples of the quirks worth writing down
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;ProPublica's &lt;code&gt;ntee[id]&lt;/code&gt; parameter returns HTTP 500.&lt;/strong&gt; Not a deprecation notice, an&lt;br&gt;
error. So the NTEE filter is applied after fetching two pages of 25 and the response&lt;br&gt;
carries &lt;code&gt;meta.warnings&lt;/code&gt; telling you how many rows were scanned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NIH RePORTER ignores &lt;code&gt;criteria.text_search&lt;/code&gt;.&lt;/strong&gt; You get all 76,391 projects back and&lt;br&gt;
a 200, which looks like a working search until you check the result count. The real&lt;br&gt;
parameter is &lt;code&gt;criteria.advanced_text_search&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Neither of those is interesting on its own. Together they are why I stopped treating&lt;br&gt;
"it returned 200" as "it works".&lt;/p&gt;

&lt;h2&gt;
  
  
  Trying it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Catalog and samples: &lt;a href="https://k-data-lab.pages.dev" rel="noopener noreferrer"&gt;https://k-data-lab.pages.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Runnable examples (plain &lt;code&gt;urllib&lt;/code&gt; / &lt;code&gt;fetch&lt;/code&gt;, zero dependencies, &lt;code&gt;--demo&lt;/code&gt; mode that
renders a bundled sample response): &lt;a href="https://github.com/dhy05109-rgb/kdatalab-public-data-examples" rel="noopener noreferrer"&gt;https://github.com/dhy05109-rgb/kdatalab-public-data-examples&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The free tier is 100 requests per month per API, which is enough to evaluate the shape&lt;br&gt;
of the data before you decide anything. Every script in the repo runs in &lt;code&gt;--demo&lt;/code&gt; mode&lt;br&gt;
with no key at all, so you can look at the payloads first.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would like feedback on
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Schema choices.&lt;/strong&gt; 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?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bulk vs API.&lt;/strong&gt; For your pipelines, does pay-per-record bulk export beat a monthly
API quota? I genuinely do not know which is more useful.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Which source next.&lt;/strong&gt; The candidates I keep coming back to are cyber threat feeds
(CISA KEV + NVD + EPSS) and non-US procurement (Canada, Singapore, Japan).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you run into a 503 or a field that looks wrong, tell me the endpoint — I would rather&lt;br&gt;
fix a bad field than add another dataset.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: this is my own side project. The APIs are paid above the free tier; the&lt;br&gt;
catalog, specs and example code are free.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>data</category>
    </item>
  </channel>
</rss>
