Our REST API estimates per-passenger flight carbon emissions. We serve ground-truth values from an ICAO reference dataset where available, and fall back to a calibrated distance regression everywhere else — consistent with ICAO and IATA methodologies.
One POST and we return emissions, the offset in trees, and the cost to offset.
We run exact and reverse lookups against an ICAO emissions reference table for covered routes and cabin classes.
For routes outside the dataset we use a piecewise log-linear regression segmented by distance band and aircraft category (~15.5% MAPE).
We weight economy, premium economy, business, and first by ICAO Yseat factors (1.00 → 7.97).
Every result we return includes trees required and offset cost, using EPA's 21 kg CO₂/tree/year over a 40-year lifespan.
We run every POST /calculate through this priority chain.
(origin, destination, cabin_class). ~0% error.CO₂ = exp(b) × distance_corrected_kma, segmented by distance band × aircraft category. ~15.5% MAPE.Our compute and history endpoints may require an X-API-Key header. Use the interactive Swagger UI to send authenticated requests.
POST /api/v1/carbon-calculator/calculate
Content-Type: application/json
X-API-Key: <your-key>
{
"origin": "JFK",
"destination": "LHR",
"cabin_class": "economy"
}201 Created
{
"origin": "JFK",
"destination": "LHR",
"cabin_class": "economy",
"distance_km": 5554.0,
"co2_kg_per_passenger": 302.4,
"trees_required": 1,
"offset_amount": 10.0,
"emissions_on_icao": { ... }
}The figures we use, from ICAO Methodology v13.1 and EPA offset data.
| Constant | Value |
|---|---|
| CO₂ conversion factor | 3.16 kg CO₂ / kg fuel |
| Yseat — Economy / Premium / Business / First | 1.00 / 1.52 / 5.20 / 7.97 |
| CO₂ absorbed per tree | 21 kg / year (EPA) |
| Tree lifespan · cost | 40 years · $10 |