{
"airQualityHealthIndex": 2,
"success": true
}
curl --location --request POST 'https://zylalabs.com/api/2/carbon+footprint+calculator+api/36388/air+quality+health+index?o3=10&no2=10&pm=10' --header 'Authorization: Bearer YOUR_API_KEY'
{
"numberOfTrees": 2.4,
"success": true
}
curl --location --request POST 'https://zylalabs.com/api/2/carbon+footprint+calculator+api/36389/tree+equivalent?weight=100&unit=kg' --header 'Authorization: Bearer YOUR_API_KEY'
{
"carbon": "38.44 kg co2",
"location": "United States",
"factor_year": 2025,
"success": true
}
curl --location --request POST 'https://zylalabs.com/api/2/carbon+footprint+calculator+api/36390/traditional+energy?consumption=100&location=USA' --header 'Authorization: Bearer YOUR_API_KEY'
{
"carbon": "1 kg co2",
"success": true
}
curl --location --request POST 'https://zylalabs.com/api/2/carbon+footprint+calculator+api/36391/clean+energy?energy=HydroElectric&consumption=100' --header 'Authorization: Bearer YOUR_API_KEY'
{
"carbon": "2353.72 kg co2",
"factor_year": 2026,
"success": true
}
curl --location --request POST 'https://zylalabs.com/api/2/carbon+footprint+calculator+api/36392/fuel+to+carbon?type=Petrol&litres=1000' --header 'Authorization: Bearer YOUR_API_KEY'
{
"carbon": "14.327 kg co2",
"factor_year": 2026,
"success": true
}
curl --location --request POST 'https://zylalabs.com/api/2/carbon+footprint+calculator+api/36393/car+travel?distance=100&vehicle=SmallDieselCar' --header 'Authorization: Bearer YOUR_API_KEY'
{
"carbon": "22.928 kg co2",
"factor_year": 2026,
"success": true
}
curl --location --request POST 'https://zylalabs.com/api/2/carbon+footprint+calculator+api/36394/flight?distance=100&type=DomesticFlight' --header 'Authorization: Bearer YOUR_API_KEY'
{
"carbon": "8.319 kg co2",
"factor_year": 2026,
"success": true
}
curl --location --request POST 'https://zylalabs.com/api/2/carbon+footprint+calculator+api/36395/motorbike?distance=100&type=SmallMotorBike' --header 'Authorization: Bearer YOUR_API_KEY'
{
"carbon": "29.722 kg co2",
"factor_year": 2026,
"success": true
}
curl --location --request POST 'https://zylalabs.com/api/2/carbon+footprint+calculator+api/36396/public+transit?distance=200&type=Taxi' --header 'Authorization: Bearer YOUR_API_KEY'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Carbon Footprint Calculator API simply include your bearer token in the Authorization header.
| Header | Description |
|---|---|
Authorization
|
Required
Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.
|
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
(Save 2 months with annual billing 🎉)
This API estimates the carbon footprint of everyday activities and returns the result in kilograms of carbon dioxide equivalent. It covers electricity from the conventional grid and from cleaner sources such as solar, wind, hydro, biomass, geothermal and tidal power. It converts petrol, diesel and liquefied petroleum gas into emissions from the volume used. Road travel includes cars, vans and motorbikes, so a trip can be measured by distance and by the kind of vehicle. Flights are measured per passenger across domestic and international journeys, and across economy and premium cabins. Public transit includes taxis, buses, coaches, trains, trams, the underground and ferries. A separate calculation turns a weight of paper, in kilograms or pounds, into the number of trees needed to produce it. The air quality health index combines ground level ozone, nitrogen dioxide and fine particles into a single risk figure, from low to very high. Results are meant for product screens, reports and internal tracking, where a team needs a consistent number for an activity rather than an environmental audit. Each call answers one question, such as a journey, a fuel purchase, a power bill or a paper weight, and the response states whether the calculation succeeded.
The API can estimate the carbon footprint for electricity (from conventional and cleaner sources like solar, wind, hydro, biomass, geothermal, and tidal), fuel (petrol, diesel, LPG based on volume), road travel (cars, vans, motorbikes based on distance and vehicle type), flights (per passenger for domestic and international, economy and premium cabins), public transit (taxis, buses, coaches, trains, trams, underground, ferries), and paper (converted from weight to the number of trees needed).
The API returns the estimated carbon footprint in kilograms of carbon dioxide equivalent (kg CO2e). The response also indicates whether the calculation was successful.
In addition to carbon footprint calculations, the API can also provide the local air quality index. This index combines ground-level ozone, nitrogen dioxide, and fine particles into a single risk figure, ranging from low to very high.
This API is ideal for product screens, reports, and internal tracking. It provides consistent carbon footprint numbers for everyday activities like journeys, fuel purchases, or electricity usage, which can be used for user engagement, environmental reporting, or team performance tracking without requiring a full environmental audit.
For electricity, you provide details about grid vs. cleaner sources. For fuel, you input the volume used. Road travel requires distance and vehicle type. Flights need passenger count, journey type (domestic/international), and cabin class. Public transit calculations consider the mode of transport. Paper calculations require the weight of the paper.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund