I'm turning 49 CFR (the federal hazardous materials regulations) into clean REST endpoints. UN number lookups, lithium battery classification, limited-quantity checks, print-ready shipping descriptions!
The data is already in the public domain, but it's trapped in government XML and a 3,687-row table with 14 columns and footnotes (I wouldn’t want to deal with that). The current options are free lookup sites with no API, or enterprise software that needs a sales call to buy. This sits in the nice middle ground. I've parsed it just once, properly. You get an API key and a credit card form instead!
This calls the live API (ground highway/rail logic from §173.185). Change the numbers as you wish...
What you see is the actual endpoint response: status, citations, packaging conditions, marking specs. Neat! Docs at dgdataapi.com/docs.
Fun fact: Lots of people think anything over 100 Wh is fully regulated, but by ground, it isn't, up to 300 Wh, with the right package marking. That's §173.185(c)(1)(iv), and it's exactly the kind of answer buried in the regs that this API surfaces.
GET /materials/{un_number}GET /materials/search?q=GET /materials/{un}/limited-quantityGET /materials/{un}/shipping-descriptionGET /lithium-batteries/classifyGET /special-provisions/{code}Accuracy is the whole product, so, naturally, this is the part I spent the most on. The pipeline: parse the eCFR XML directly (all 3,687 rows, currently tracking the Aug 2026 amendments), then encode the derived logic with the regulatory citation attached to every branch, then test it against hundreds of thousands of generated input combinations, then cross-check every scenario in PHMSA's own Lithium Battery Guide for Shippers (Rev. Oct 2024). Full agreement.
Every API response includes the paragraph chain that produced it (say, 173.185(c)(1)(iv)) so you can cross-check any answer against the regulation yourself. When the regs change, a diff against the eCFR flags it and Pro subscribers get a webhook.
To be clear about what this is: reference data, not legal or compliance advice. You (or your users) stay responsible for verification. Every response carries a disclaimer_url saying the same.
Shipping software, Shopify apps, 3PL tools, marketplace integrations, really anywhere hazmat data needs to flow through code. If a customer asked why their battery shipment got rejected, this is for you.
Free while in launch. Paid tiers from $49/mo (higher limits, regulation-change webhooks) are coming; there's also a flat-file license if you'd rather host the dataset yourself.
Things I've written up while building this, with citations:
The API is live and free while in launch: https://api.dgdataapi.com/v1 — no key needed, rate-limited per IP. Leave your email and I'll let you know when higher limits, keys, and the change-webhook land. Expect at most one email a month.
Got it, thanks. I'll email you when the beta opens.
Hm, that didn't go through. Mind trying again? Or just email me directly.
Building something specific with hazmat data? Please let me know at dgdataapi@gmail.com!! The roadmap is soft right now, and real use cases would really help shape it.