API v1

Carbon Emissions API

Send an activity (kWh of electricity, litres of fuel, a flight, a purchase) and get back the emissions in kg CO2e, with the factor, its source and the formula. Electricity, fuel and flight work without a key.

What you get

Sourced factors

Every result names its emission factor and the dataset it comes from, such as CEA v22 for the Indian grid or DESNZ 2026 for the UK.

Checkable arithmetic

Each response includes the formula, so any figure can be recomputed by hand or by an auditor.

Refuses instead of guessing

If no published factor covers an input, the API says so with a reason code and what to send instead.

Same numbers as the ledger

The API prices activities with the same factor resolver the ZeroCarbon ledger uses, so a quoted figure matches what the ledger would record with default factors.

Endpoints

  • POST /calculate/electricity - Scope 2, national grid average, no key needed
  • POST /calculate/fuel - Scope 1 fuel combustion, no key needed
  • POST /calculate/flight - Scope 3 business travel, no key needed
  • POST /calculate/spend - Scope 3 spend-based estimate, API key required

Quick Example

terminalbash
curl -X POST https://zerocarbon.org.in/api/v1/calculate/electricity \
  -H "Content-Type: application/json" \
  -d '{"kwh": 1000, "country_code": "IN"}'

Returns 675 kg CO2e with the factor 0.675 kgCO2e/kWh from CEA_CO2_Baseline_v22_FY2025-26.

Base URL

https://zerocarbon.org.in/api/v1

Next Steps