CBAM Embedded Emissions API

Take a CN code, an origin country and a tonnage, and get back the embedded emissions, the CBAM certificates owed and what they cost — with a defensible audit trail per line.

Definitive regime · from 1 Jan 2026 Free Commission data $0 lookup + arithmetic Public & free

Not legal advice. Not the official EU CBAM registry. Figures use published default values and are estimates for the declarant's own use. Verified actual emissions require an accredited verifier. The declarant is responsible for the CBAM declaration.

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)

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

5 What you actually get

✅ A live, working API 📖 Plain docs anyone can follow 🔐 Keys & safe access control 🚦 Limits so it can't be abused 🧪 Tests that prove it works 🌐 A demo page to show it off 📦 Everything owned by you

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:

🤝 Partners integrate faster and trust you more 🔎 Public docs get found and shared ⭐ "It just works" becomes your reputation 🧩 Developers recommend tools they enjoy using 🌍 A branded endpoint (your domain) reinforces who built it

🏭 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.

Spreadsheet by hand
Error-prone 😩
With the API
A split second ⚡
Every figure
Traceable to source 📑

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.