CARBON ACCOUNTING API
programmatic emissions calculation & factor library
Send activity data, get CO2e back with the published emission factor, its source and the exact formula. Built on GHG Protocol Scope 1, 2 and 3 with India CEA, UK DESNZ and US EPA factors.
Scope 2 electricity emissions in one call
Paste this into a terminal. The response below is the real one: India's grid factor for FY 2025-26 from CEA's CO2 Baseline Database v22, and the multiplication that produced the number.
curl -X POST https://zerocarbon.org.in/api/v1/calculate/electricity \
-H "Content-Type: application/json" \
-d '{"kwh": 145000, "country_code": "IN"}'
// 200 OK
{
"success": true,
"data": {
"emissions_kg_co2e": 97875,
"emission_factor": 0.675,
"emission_factor_source": "CEA_CO2_Baseline_v22_FY2025-26",
"scope": "scope_2",
"formula": "145000 kWh × 0.675 kgCO2e/kWh = 97875.0000 kgCO2e",
"details": {
"methodology": "Location-based Scope 2 (GHG Protocol), national grid average"
}
}
}Endpoints
| Endpoint | Scope | You send | API key |
|---|---|---|---|
| POST /api/v1/calculate/electricity | Scope 2 | kwh, country_code (ISO-2) | Optional |
| POST /api/v1/calculate/fuel | Scope 1 | fuel_type (diesel, petrol, natural_gas, lpg, coal, cng, furnace_oil, kerosene), amount, unit (L, liters, kg, m3), country | Optional |
| POST /api/v1/calculate/flight | Scope 3, business travel | distance_km, passengers, cabin_class, country | Optional |
| POST /api/v1/calculate/spend | Scope 3, spend-based | amount, currency, category | Required |
Without a key, requests run in a rate-limited test mode. With a key (Authorization: Bearer zc_..., created in the dashboard) each workspace gets 120 requests a minute per endpoint.
Numbers an auditor can trace
Published, dated factors
4,367 factors from India's CEA CO2 Baseline Database, UK DESNZ 2025 and 2026, and the US EPA GHG Emission Factors Hub 2025. Grid factors are picked by the year of the activity, not today's date.
The formula comes back too
Every response names the factor, its source dataset and the multiplication performed, so a reviewer can redo the number by hand.
It refuses instead of guessing
No factor for that country or fuel? The API says so with a reason and how to fix it. It never borrows another country's factor or estimates a flight distance.
Emissions API questions
Is there a free emissions API I can try?
Yes. The electricity, fuel and flight endpoints answer without an API key in a rate-limited test mode, so you can check the numbers before signing up. Spend-based calculations need a key.
Which emission factors does the API use?
Published government datasets: India's CEA CO2 Baseline Database (v22 for FY 2025-26 grid electricity), the UK DESNZ conversion factors (the 2026 set for 2026 activity, 2025 for earlier) and the US EPA GHG Emission Factors Hub 2025. Each response names the dataset it used.
How is the CO2e calculated?
Activity quantity times the published factor, after converting your unit to the factor's unit. The response includes that multiplication as a formula, so the result can be checked by hand. No AI model computes the number.
What happens if there is no factor for my country or fuel?
The API refuses with a reason code and what to send instead. It does not fall back to another country's factor, and it does not estimate flight distances from airport codes.
Can I use it for BRSR, CBAM or GHG Protocol reporting?
The figures follow the GHG Protocol (location-based Scope 2, Scope 1 combustion, Scope 3 travel and spend). For a filed report, the ZeroCarbon workspace adds the records, evidence and approvals that BRSR Core assurance and CBAM verification ask for.