Guides
Tutorials
Quickstart

Quickstart

This guide will walk you through making your first estimation with the Climatiq API using a real-life example.

Prerequisites

Introduction to Emission Factors

Climatiq API estimates how much greenhouse gases your activities emit using validated conversion factors known as emission factors. An emission factor is a way to convert different human activities into greenhouse gases in terms of CO2 equivalent (opens in a new tab) (CO2e), usually expressed in kilograms. Climatiq can answer questions like:

  1. How much CO2e is emitted taking the train from Paris to Berlin?
  2. How much CO2e is emitted spending $1,000 on soft drinks in the US?
  3. How much CO2e is emitted staying a night at a hotel in China?

Your First Estimate

Let's estimate the greenhouse gas emissions of an average UK household based on electricity consumption (4,200 kWh per year) using the emission factor for the activity electricity-energy_source_grid_mix. This factor represents the average emission for the electricity grid.

Request

Use curl (opens in a new tab) to make an API call:

  • Replace $CLIMATIQ_API_KEY with your API key and run the command in your terminal.
  • The API endpoint that's used to estimate how carbon intensive an activity is, is located at: https://api.climatiq.io/data/v1/estimate

An API call to this endpoint looks like the block below.

curl --request POST \
--url https://api.climatiq.io/data/v1/estimate \
--header "Authorization: Bearer $CLIMATIQ_API_KEY" \
--data '{
"emission_factor": {
"activity_id": "electricity-supply_grid-source_residual_mix",
"data_version": "^6"
},
"parameters":
{
"energy": 4200,
"energy_unit": "kWh"
}
}'

In this example, we provide the parameters argument for the calculations and they indicate that we'd like it to calculate the emissions for 4.200 kWh.

Response

You should get a response from the API back that looks like this:

{
"co2e": 4061,
"co2e_unit": "kg",
"co2e_calculation_method": "ar4",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "Electricity supplied from grid - residual mix",
"activity_id": "electricity-supply_grid-source_residual_mix",
"id": "6b6c4683-f649-48f8-b402-7eb96eecbfe2",
"access_type": "public",
"source": "AIB",
"source_dataset": "European Residual Mix",
"year": 2023,
"region": "RS",
"category": "Electricity",
"source_lca_activity": "electricity_generation",
"data_quality_flags": [
"partial_factor",
"notable_methodological_variance"
]
},
"constituent_gases": {
"co2e_total": 4061,
"co2e_other": null,
"co2": 4061,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 4200,
"activity_unit": "kWh"
},
"audit_trail": "selector"
}

The API returns quite a few values but the most relevant values are co2e and co2e_unit, which together describe how much CO2e is emitted by the given activity. In this case, yearly energy consumption emits approximately 4381 kg of CO2e.

(Check out this table to see a description of every attribute in the response)

If you've made it this far you've made your first API call and seen the results in your terminal!

Next Steps