Carbon API reference

Estimate what the EU Carbon Border Adjustment Mechanism costs for an import line, check whether a CN code is covered, and read the default values, certificate prices and dataset versions behind each answer. The rules are Reg (EU) 2023/956 as amended; the EUDR endpoint follows Reg (EU) 2023/1115.

The base URL is https://carbonapi.eu. Every endpoint is a GET and returns JSON.

Quickstart

You need no account to try it. This call prices 40 t of hot-rolled steel from Türkiye for 2027:

curl "https://carbonapi.eu/v1/resolve?cn=72083900&origin=TR&tonnes=40&year=2027"

The answer, cut to its main fields, at the 2026-Q3 certificate price:

{
  "data": {
    "inScope": true,
    "cn": "72083900",
    "sector": "iron_steel",
    "origin": "TR",
    "route": "C",
    "source": "default",
    "perTonne": { "direct": 2.9136, "indirect": 0, "total": 2.9136 },
    "totalEmissions": 116.544,
    "benchmark": { "cn": "72083900", "route": "C", "value": 1.37, "unit": "tCO2e/t" },
    "cbamFactor": 0.95,
    "crossSectoralCorrection": 1,
    "freeAllocationAdjustment": 52.06,
    "emissionsSubjectToCbam": 64.484,
    "certificates": 65,
    "price": { "period": "2026-Q3", "price": 82.32, "currency": "EUR" },
    "cost": 5350.8,
    "thresholdApplies": true,
    "thresholdTonnes": 50,
    "declarationDeadline": "2028-09-30"
  },
  "meta": { "dataVersion": "2026-10-19.451099948819", "pricePeriod": "2026-Q3" }
}

The same answer is also available from the command line and from an AI agent. See CLI and MCP server.

Authentication

Send your API key as a Bearer token:

Authorization: Bearer cbam_live_…

To get a key, choose the Developer plan on /pricing, then create the key in your dashboard. The Importer plan is the web app and has no API access.

Without a key, only /v1/resolve and /v1/eudr/resolve answer, inside the daily free limit below; every other data endpoint returns 401 UNAUTHORIZED. A malformed, invalid or revoked key also returns 401 UNAUTHORIZED. A key with no active Developer plan returns 403 PLAN_REQUIRED.

Rate limits

Without a key, each IP address gets 3 calls a day to /v1/resolve and /v1/eudr/resolve together. /v1/status and /openapi.json are free. The count clears at 00:00 UTC.

With a key, every call counts against your account: 50,000 a month on Developer, shared by all your keys. The month is the UTC calendar month.

Each counted answer carries x-ratelimit-limit and x-ratelimit-remaining. Past the limit you get 429 RATE_LIMITED and a retry-after header in seconds.

Errors

Error body: { "error": { "code", "message", "details"? } }. Branch on code; the message can change.

Code Status When
INVALID_INPUT 400 A parameter is missing, invalid or unknown
UNAUTHORIZED 401 No key on a keyed endpoint, or key malformed, invalid or revoked
PLAN_REQUIRED 403 Key has no active Developer plan
OUT_OF_SCOPE 404 CN code outside Annex I
NOT_FOUND 404 Unknown path
RATE_LIMITED 429 Daily or monthly limit spent
INTERNAL 500 Unexpected server failure
NO_DEFAULT 503 No default value matches
DATASET_UNAVAILABLE 503 Dataset or change feed missing
PRICE_UNAVAILABLE 503 No certificate price bundled

Data versions

Each deploy bundles one dataset version, and every answer comes from it. meta.dataVersion names that version, for example 2026-10-19.451099948819: the publication date and a content hash. meta.pricePeriod names the latest bundled certificate price, or null.

A new dataset version ships as a new deploy. /v1/changes lists one entry per version, and /v1/status returns the current one. Store dataVersion with each answer you keep, so you can tell which data produced it.

Versioning

The major version is in the path: /v1. A breaking change ships as /v2. New fields and new endpoints can arrive in /v1 at any time, so ignore fields you do not know.

Before we remove a /v1 endpoint, its answers carry a Deprecation header (RFC 9745) and a Sunset header with the removal date. The Sunset date is at least 90 days after the first Deprecation header. No /v1 endpoint is deprecated today.

CLI

@cbamdata/cli gives you the same calculations as one cbam command. It prints a one-line summary, or the full JSON answer with --json.

npx -y @cbamdata/cli resolve --cn 72083900 --origin TR --tonnes 40 --year 2027

Commands: resolve, scope, defaults, changes, certificate-price, status. Set your key with CBAM_API_KEY and the base URL with CBAM_API_URL, or pass --api-key and --api-url on each call. cbam --help lists every flag.

MCP server

An AI agent in Claude, Cursor, Windsurf or ChatGPT can call the same calculations through the Model Context Protocol.

Remote server https://carbonapi.eu/mcp, Streamable HTTP
Protocol version 2025-11-25
Local stdio server npx -y @cbamdata/mcp
Registry manifest /server.json
Server card /.well-known/mcp/server-card.json

In Claude, open Carbon API in the connector directory and press Connect. Signed in, /connect has the same buttons for Claude and ChatGPT.

Both transports expose the same tools: cbam_resolve, cbam_scope, cbam_certificate_price, cbam_defaults, cbam_changes and cbam_status. The remote server needs a sign-in. ChatGPT and Claude connect through OAuth with your Carbon API account: a free account gets cbam_resolve (3 calculations a day) and cbam_status, and the Developer plan gets all 6 tools on its monthly allowance. Any other client can send a Developer plan API key as a Bearer token. The local stdio server calls /v1, so without a key it answers cbam_resolve inside the daily free limit.

Calculate

Turn a CN code and an origin into certificates, cost or due-diligence duties.

Reference data

Read the scope, default values and certificate prices the calculations use.

Dataset

Find out which dataset version answers and what changed between versions.

The full request and response schema for each endpoint needs JavaScript. The same document is at /openapi.json.