Open private examples with your own API key
Copy-ready requests (Bash / POSIX shell)
These examples use YOUR_API_KEY. An active, provisioned subscription is required for personalized examples. Manage your subscription and key.
Show example requests
1. Discover factors
curl --request GET 'https://api.carbonnode.co.uk/api/factors?year=latest' \ --header 'Ocp-Apim-Subscription-Key: YOUR_API_KEY' \ --header 'Accept: application/json'
2. Smart Lookup (LLM factor finder)
curl --request POST 'https://api.carbonnode.co.uk/api/factors/smart-lookup' \
--header 'Ocp-Apim-Subscription-Key: YOUR_API_KEY' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{"year":"latest","query":"Mains natural gas heating kWh"}'
3. Calculate an activity
curl --request POST 'https://api.carbonnode.co.uk/api/calculate/emission' \
--header 'Ocp-Apim-Subscription-Key: YOUR_API_KEY' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{"year":"latest","factor_id":"REPLACE_WITH_ID_FROM_FACTORS","quantity":100}'
4. Calculate a batch
curl --request POST 'https://api.carbonnode.co.uk/api/calculate/batch' \
--header 'Ocp-Apim-Subscription-Key: YOUR_API_KEY' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{"year":"latest","line_items":[{"ref":"activity-1","factor_id":"REPLACE_WITH_ID_FROM_FACTORS","quantity":100}]}'
Replace the factor ID with one returned by /factors or /factors/smart-lookup. Quantities must use that factor's published unit. Requests consume your plan's quota.
Four Endpoints. One Auditable Workflow.
Authenticate every request with Ocp-Apim-Subscription-Key against your published APIM gateway (/api).
Never embed your subscription key in browser JavaScript or public repositories.
| Method | Path | Purpose | Tier Availability |
|---|---|---|---|
| GET | /factors?year=latest |
Discover conversion factors, units (uom), and IDs for a pinned year. |
Free (50/day, 1/min · 2026), Pro (150,000/30d, 120/min) & Enterprise |
| POST | /factors/smart-lookup |
LLM-powered natural-language lookup returning the best matching UK factor + alternatives. | Free (2 / 10 min, 5 / 24h API · 10 / 24h web), Pro (30 / min, 2,500 / 24h), Enterprise (120 / min, 15,000 / 24h) |
| POST | /calculate/emission |
Calculate kg_co2e for one activity using an ID from /factors or /factors/smart-lookup. |
Free (50/day, 1/min · 2026), Pro & Enterprise |
| POST | /calculate/batch |
Calculate 1–100 activities in one call with Scope 1/2/3 and total kg_co2e. |
Free (50/day, 1/min · 2026), Pro & Enterprise |
1. Discover Factors — GET /factors
Returns year, source, sandbox, and groups (scope → activity_types → items with id, label, uom, ghgConversionFactor, source).
Free, Pro & Enterprise all see published UK DESNZ Scope 1/2/3, UK SIC 2007, and Market-Based factors (Free is quota restricted to 50 calls/day, 1 call/min, current year).
2. Smart Lookup (AI) — POST /factors/smart-lookup
{ "year": "latest", "query": "Mains natural gas heating kWh", "scope": "Scope 1" }
Returns matched_factor (including id, uom, catalog_id, catalog_url), confidence, reasoning, and alternatives. Enforced per-tier API limits: Free (2/10 min & 5/24h), Pro (30/min & 2,500/24h), Enterprise (120/min & 15,000/24h).
3. Single Calculation — POST /calculate/emission
{ "year": "latest", "factor_id": "REPLACE_WITH_ID_FROM_FACTORS", "quantity": 100 }
Always pass quantity in the factor's published uom—the API does not infer or convert units. Returns kg_co2e = quantity × conversionFactor (6 d.p.).
4. Batch Calculation — POST /calculate/batch
{ "year": "latest", "line_items": [
{ "ref": "activity-1", "factor_id": "REPLACE_WITH_ID_FROM_FACTORS", "quantity": 100 }
] }
Up to 100 lines per call (counts as 1 API call). Check every line's ok flag—failed lines are excluded from Scope totals.
Predictable Limits & Anti-Abuse Quotas
- Free (Sandbox): 1 call/min & 50 calls/day general (2026 factors); REST API Smart Lookup 2 / 10 min & 5 / 24h (10 / 24h on web calculator; non-commercial with attribution).
- Pro (£99/mo): 120 calls/min & 150,000 calls per rolling 30-day window; historical 2020–2026 factors, Smart Lookup 30/min & 2,500/24h, plus full white-label Web Reporting. No automatic overage charges at launch.
- Enterprise: 1,000+ calls/min & 1M+ calls/30d by agreement; Smart Lookup 120/min & 15,000/24h; custom SLA & DPA.
- 429 Throttling: Respect
Retry-After,X-RateLimit-Remaining, andX-SmartLookup-Remaining-Day. - Status Codes:
400invalid input ·401/403key/quota ·404unpublished year/factor ·422overflow/non-numeric ·503service unavailable.
Reporting Responsibly (UK SECR / GHG Protocol)
Every response identifies the exact dataset in source (e.g. UK Government GHG Conversion Factors 2026) and resolved year.
Pin an explicit four-digit year after discovery and retain requests, responses, source references, and your organisational boundary decisions.
Using AI Agents? Connect via Remote MCP Server
Requires an active Pro or Enterprise API key on https://carbonnode.co.uk/mcp (Streamable HTTP) with Claude, Microsoft Copilot Studio, Cursor, VS Code, or Antigravity — including the 5-section UK GHG reporting engine.
Enterprise On-Prem Reporting UI: Self-Host Inside Your VPC
Explore our live UK GHG Reporting Tool (/Calculator) powered by the CarbonNode API backend. On Enterprise (£499+/mo) & Partner plans, license the Reporting Tool source code to customise and deploy inside your own infrastructure.