Carbon Footprint API: Calculate Emissions at Scale
Turn any activity into CO₂e calculations instantly. Our RESTful API provides real-time carbon footprint estimates for shipping, travel, cloud infrastructure, energy consumption, and more—backed by 50,000+ emission factors and GHG Protocol methodology.
Emission factors from EPA, DEFRA, IEA
Average calculation latency
Countries with localized factors
What is the Carbon Footprint API?
The ZeroCarbon Footprint API is a calculation engine that converts activity data (distance traveled, energy consumed, materials purchased) into standardized CO₂ equivalent emissions. Whether you're building a sustainability dashboard, tracking logistics emissions, or displaying carbon impact to users, our API handles the complex calculations instantly.
Calculate Everything
- ✓ Shipping & logistics (land, air, sea)
- ✓ Flights (passenger & freight)
- ✓ Cloud infrastructure (AWS, Azure, GCP)
- ✓ Energy consumption (electricity, gas, heating)
- ✓ Materials & purchased goods
- ✓ Employee commuting & business travel
GHG Protocol Compliant
- ✓ Scope 1, 2, 3 classification
- ✓ Location-based & market-based methods
- ✓ Regularly updated emission factors
- ✓ Audit-ready calculation logs
- ✓ Multi-jurisdiction support
- ✓ Uncertainty quantification
Quick Start
1. Get your API key from the dashboard
2. Make authenticated requests:
Authorization: Bearer zc_live_sk_1234567890abcdef
Content-Type: application/jsonCore Calculation Endpoints
/v1/calculate/shippingCalculate emissions from package delivery and freight transport.
View Example Request
POST /v1/calculate/shipping
{
"origin": {
"city": "New York",
"country": "US",
"postal_code": "10001"
},
"destination": {
"city": "Los Angeles",
"country": "US",
"postal_code": "90001"
},
"weight_kg": 5.2,
"transport_mode": "truck",
"distance_km": 4500
}
// Response:
{
"emissions_kg_co2e": 1.87,
"calculation_method": "distance_based",
"scope": "scope_3_category_4",
"emission_factor_source": "EPA 2024",
"breakdown": {
"co2": 1.75,
"ch4": 0.08,
"n2o": 0.04
},
"metadata": {
"transport_mode": "truck",
"distance_km": 4500,
"weight_kg": 5.2
}
}/v1/calculate/flightCalculate aviation emissions for passenger or freight flights.
View Example
POST /v1/calculate/flight
{
"departure_airport": "JFK",
"arrival_airport": "LHR",
"cabin_class": "economy",
"num_passengers": 1,
"include_radiative_forcing": true
}
// Response:
{
"emissions_kg_co2e": 987.5,
"emissions_with_rf_kg_co2e": 1778.5, // With radiative forcing multiplier
"distance_km": 5541,
"flight_type": "long_haul_international",
"scope": "scope_3_category_6",
"emission_factor_source": "DEFRA 2024",
"breakdown": {
"cruise_emissions": 820.3,
"landing_takeoff_emissions": 167.2,
"radiative_forcing_multiplier": 1.8
}
}/v1/calculate/energyCalculate Scope 2 emissions from purchased electricity and heating.
View Example
POST /v1/calculate/energy
{
"consumption_kwh": 10000,
"energy_type": "electricity",
"country": "US",
"region": "California",
"calculation_method": "location_based" // or "market_based"
}
// Response:
{
"emissions_kg_co2e": 1980.5,
"scope": "scope_2",
"grid_emission_factor_kg_co2e_per_kwh": 0.198,
"emission_factor_source": "EPA eGRID 2023",
"grid_region": "WECC California",
"renewable_percentage": 33.2
}/v1/calculate/cloudCalculate emissions from cloud computing infrastructure.
View Example
POST /v1/calculate/cloud
{
"provider": "aws",
"services": [
{
"service_type": "compute",
"instance_type": "t3.large",
"region": "us-east-1",
"hours": 730 // 1 month
},
{
"service_type": "storage",
"storage_gb": 5000,
"storage_type": "s3",
"region": "us-east-1"
}
]
}
// Response:
{
"total_emissions_kg_co2e": 125.3,
"scope": "scope_3_category_1",
"services_breakdown": [
{
"service_type": "compute",
"emissions_kg_co2e": 98.7,
"energy_kwh": 547.2,
"pue": 1.10
},
{
"service_type": "storage",
"emissions_kg_co2e": 26.6,
"energy_kwh": 147.5
}
],
"provider_carbon_free_percentage": 65
}/v1/calculate/materialsCalculate embodied emissions from materials and purchased goods.
View Example
POST /v1/calculate/materials
{
"items": [
{
"material": "steel",
"quantity_kg": 1000,
"origin_country": "US"
},
{
"material": "plastic_pet",
"quantity_kg": 50,
"recycled_content_percentage": 30
}
]
}
// Response:
{
"total_emissions_kg_co2e": 2875.5,
"scope": "scope_3_category_1",
"items_breakdown": [
{
"material": "steel",
"emissions_kg_co2e": 2750.0,
"emission_factor_kg_co2e_per_kg": 2.75,
"source": "DEFRA 2024"
},
{
"material": "plastic_pet",
"emissions_kg_co2e": 125.5,
"emission_factor_kg_co2e_per_kg": 3.58,
"recycling_credit_kg_co2e": -53.5
}
]
}Batch Calculations
Process multiple calculations in a single request for efficiency.
/v1/calculate/batchPOST /v1/calculate/batch
{
"calculations": [
{
"id": "shipment_001",
"type": "shipping",
"params": { "distance_km": 500, "weight_kg": 10, "transport_mode": "truck" }
},
{
"id": "flight_001",
"type": "flight",
"params": { "departure_airport": "SFO", "arrival_airport": "LAX", "cabin_class": "economy" }
},
{
"id": "energy_001",
"type": "energy",
"params": { "consumption_kwh": 5000, "country": "US", "region": "California" }
}
]
}
// Response:
{
"results": [
{ "id": "shipment_001", "emissions_kg_co2e": 0.85, "status": "success" },
{ "id": "flight_001", "emissions_kg_co2e": 92.3, "status": "success" },
{ "id": "energy_001", "emissions_kg_co2e": 990.0, "status": "success" }
],
"total_emissions_kg_co2e": 1083.15
}Code Examples
Python
from zerocarbon import CarbonClient
# Initialize client
client = CarbonClient(api_key="zc_live_sk_...")
# Calculate shipping emissions
result = client.calculate_shipping(
origin={"city": "New York", "country": "US"},
destination={"city": "Los Angeles", "country": "US"},
weight_kg=5.2,
transport_mode="truck"
)
print(f"Emissions: {result.emissions_kg_co2e} kg CO₂e")
print(f"Scope: {result.scope}")
# Calculate flight emissions
flight = client.calculate_flight(
departure="JFK",
arrival="LHR",
cabin_class="economy",
passengers=1
)
print(f"Flight emissions: {flight.emissions_kg_co2e} kg CO₂e")Node.js / TypeScript
import { ZeroCarbon } from '@zerocarbon/node';
const zc = new ZeroCarbon('zc_live_sk_...');
// Calculate energy emissions
const energyEmissions = await zc.calculateEnergy({
consumption_kwh: 10000,
energy_type: 'electricity',
country: 'US',
region: 'California',
calculation_method: 'location_based'
});
console.log(`Emissions: ${energyEmissions.emissions_kg_co2e} kg CO₂e`);
console.log(`Grid factor: ${energyEmissions.grid_emission_factor_kg_co2e_per_kwh}`);
// Batch calculation
const batch = await zc.calculateBatch([
{ id: 'ship1', type: 'shipping', params: {...} },
{ id: 'flight1', type: 'flight', params: {...} }
]);
batch.results.forEach(r => {
console.log(`${r.id}: ${r.emissions_kg_co2e} kg CO₂e`);
});Emission Factors Database
Access our comprehensive emission factors library directly:
/v1/emission-factorsGET /v1/emission-factors?category=electricity&country=US®ion=California
// Response:
{
"factors": [
{
"id": "ef_us_ca_elec_2024",
"category": "electricity",
"subcategory": "grid_average",
"region": "California (WECC)",
"value_kg_co2e_per_kwh": 0.198,
"source": "EPA eGRID 2023",
"scope": "scope_2",
"year": 2024,
"renewable_percentage": 33.2
}
]
}50,000+ Factors
Comprehensive coverage across activities and geographies
Quarterly Updates
Latest data from EPA, DEFRA, IEA, IPCC
Version Control
Historical factors for consistent year-over-year tracking
SDKs & Rate Limits
Official SDKs
pip install zerocarbon-pythonnpm i @zerocarbon/nodego get github.com/zerocarbon/goRate Limits
- ✓ Free: 100 calculations/day
- ✓ Starter: 10,000/month
- ✓ Pro: 100,000/month
- ✓ Enterprise: Unlimited
Start Calculating Carbon Footprints
Get instant access to our calculation API. Free tier includes 100 calculations per day. No credit card required to start.
Frequently Asked Questions
How accurate are the calculations?▼
Calculations use peer-reviewed emission factors from authoritative sources (EPA, DEFRA, IEA) and follow GHG Protocol methodology. Accuracy depends on input data quality—direct measurements are more accurate than estimates. We provide uncertainty ranges for each calculation. For regulatory reporting, pair API estimates with primary data where possible.
Can I use this for Scope 3 reporting?▼
Yes! The API supports all 15 Scope 3 categories. We automatically classify calculations into the appropriate GHG Protocol category. For compliance reporting, we provide detailed calculation logs, emission factor provenance, and data quality indicators that meet assurance requirements. Our methodology is compliant with the GHG Protocol Corporate Value Chain (Scope 3) Standard.
What if I need a custom emission factor?▼
Enterprise plans can upload custom emission factors for organization-specific activities. This is useful for proprietary processes, direct supplier data, or region-specific factors not in our database. Custom factors go through validation and can be used alongside standard factors in calculations while maintaining audit trails.
How often are emission factors updated?▼
We update factors quarterly when new datasets are released by EPA, DEFRA, and other sources. All factors are versioned—you can specify a factor vintage for calculations or use "latest" for the most current data. This ensures consistency in year-over-year reporting while incorporating new methodologies as they become available.
Can I self-host the calculation engine?▼
Enterprise plans include on-premise deployment options for organizations with strict data residency or air-gapped requirements. The calculation engine runs in your infrastructure with regular factor database syncs. This is common for financial institutions, healthcare, and government entities.
Published by ZeroCarbon Team
Last updated: February 9, 2026