Live calculator
Runs entirely in your browser using this project's reference data — no request leaves the page.
Call the API
curl -s -X POST https://apis.allanninal.dev/cbam/v1/calculate \
-H "content-type: application/json" \
-d '{"cnCode":"72071110","originCountry":"IN","tonnes":120}'
Optional Authorization: Bearer <key> unlocks a higher rate budget and
retained calculation history. Bulk: POST /cbam/v1/declarations/calculate with
{ "lines": [ … ] }.
Reference data (static, no auth)
- /api/v1/index.json — endpoint catalogue
- /api/v1/meta.json — regulation, dates, dataset versions
- /api/v1/sectors.json — the six in-scope sectors
- /api/v1/cn-codes.json — CN code → CBAM good
- /api/v1/default-values.json — default values (tCO2e/t)
- /api/v1/country-factors.json — country factors
- /api/v1/carbon-price.json — cached EU ETS price
- openapi.yaml — OpenAPI 3.1
Not technical? Here's the whole idea in simple words
Imagine a restaurant 🍽️. You don't march into the kitchen and start cooking. You tell the waiter what you'd like, and a few minutes later your dish arrives. An API is that waiter — but for software. One app asks for something, the API goes and gets it, and hands back a tidy answer. Nobody has to touch the messy kitchen.
1 What an API actually is
API stands for "Application Programming Interface," but you can forget those words. The useful idea is this: it's a polite, reliable messenger that sits between two systems so they can work together without knowing each other's secrets.
Maps in an app
A ride app asks a maps API "where is this address?"
Card payments
A shop asks a payment API "is this card good?"
Weather widget
A site asks a weather API "what's it like today?"
"Log in with…"
One app asks another "is this really them?"
2 Why it matters for your business
Most businesses lose time and money in the gaps between tools — someone exports a spreadsheet here, retypes numbers there, emails a file to a partner, and hopes nobody made a typo. An API closes those gaps.
⏱️ Save time
Work that took hours by hand happens in a blink, on its own.
✅ Fewer mistakes
No more typos from copying numbers between apps.
📈 Grow easily
Ten customers or ten thousand — it keeps up without extra staff.
💶 New income
You can even sell access — partners pay to use your API.
🌙 Always on
It answers day and night, weekends and holidays included.
🤝 Better partnerships
Give partners a clean, safe door instead of raw access.
3 The parts that make one
A door
A clear, documented place to ask for things.
A guard
Keys and limits so only allowed callers get in.
A brain
The rules and logic that do the real work.
A memory
Where your data safely lives and is looked up.
4 The process, step by step
- 1
💬 Talk
You describe the problem in everyday words. No spec, no tech vocabulary required.
- 2
✏️ Plan
I sketch a simple plan and agree on what "done" looks like, so there are no surprises.
- 3
🔨 Build
I build a small, working slice quickly — something you can actually see and try.
- 4
🧪 Test
I check it against real cases so it behaves correctly, safely, and fast.
- 5
🚀 Live
I ship it, keep it running, and it's ready for your apps and partners.
5 What you actually get
6 Built to a secure, professional standard
A public API is part of your brand — it's a front door the whole internet can knock on. So it's built the way a bank builds a vault, not the way a hobby project throws something online. Every API in this family is shipped to the same standard:
🔒 Encrypted by default
HTTPS everywhere with automatic certificates and HSTS — data is never sent in the clear.
🚦 Abuse-resistant
Per-caller rate limits at the gateway stop floods and keep it fair and available for everyone.
🧰 Standards-based
A documented OpenAPI contract, predictable JSON, and clear status codes — the conventions every developer already expects.
🛡️ Hardened surface
Locked-down servers, no version banners to probe, input validated, and no secrets in the code.
🧾 Provable & auditable
Versioned data and reproducible results, so an answer can be traced back to its source and defended.
✅ Tested & monitored
Automated tests prove behaviour before release, and health checks keep it honest in production.
Why that's good for your brand online
A clean, reliable, well-documented API is a quiet but powerful marketing asset. It tells partners and customers you're serious — and it earns trust that spreads on its own:
🏭 A real example: this CBAM API
This isn't theory — the page you're on is served by a real API I built. It tackles a concrete problem from the EU Carbon Border Adjustment Mechanism (CBAM): from 1 January 2026, importers of iron & steel, aluminium, cement, fertilisers, hydrogen and electricity must report embedded emissions and surrender certificates.
The question your app asks:
POST /v1/calculate
{ "cnCode": "72071110", "originCountry": "IN", "tonnes": 120 }
The clean answer it hands back: the embedded emissions, the CBAM certificates owed and their cost — with a per-line audit trail citing every default value, country factor and dataset version used.
The same building blocks — a guard, a brain, a memory — pointed at one real problem. The same kit can become an API for your idea.
👋 Want an API for your idea?
This API was designed and built by Allan Niñal, an AI & software engineer who ships friendly, well-made, developer-first APIs and data products. Tell me the problem in plain words — CBAM, compliance, carbon, or anything else — and I'll turn it into something that works.