API Reference
Getting Started

Getting Started

The Climatiq API is designed to help developers build tools to automate calculation of the environmental impact of any business or organization's activity.

The API is organized around REST. It has predictable resource-oriented URLs; accepts JSON-encoded request bodies; returns JSON-encoded responses; and uses standard HTTP response codes, authentication, and verbs. To help maintain security, all requests must be made over HTTPS. Calls made over plain HTTP will fail.

Base URL

https://beta4.api.climatiq.io

What is an Emission Factor?

An emission factor is a value that estimates the quantity of a gas with a global warming potential (GWP) released into the atmosphere, per some unit related to a particular activity.

Activity IDs could look like this:

  • electricity-supply_grid-source_production_mix: Energy consumed from grid electricity, measured in kWh.
  • passenger_flight-route_type_domestic-aircraft_type_jet-distance_na-class_na-rf_included: Domestic airplane flight, calculated using distance or airport codes.
  • freight_vehicle-vehicle_type_hgv-fuel_source_cng-vehicle_weight_gt_3.5t_lt_7.5t-percentage_load_na: Transportation of goods on a heavy goods vehicle, measured using weight in kilograms, tonnes (metric tons) or tons (US short tons) and distance in kilometers or miles.

Errors

The Climatiq API uses conventional HTTP response codes to indicate the success or failure of an API request, such as 200 for "OK", and 400 for "Bad Request". The full list of status codes used, and errors returned can be found here.

Authentication

Authenticate the app using API keys as bearer tokens. Always provide the Authorization header containing your API KEY as bearer token:

Authorization: Bearer <API_KEY>

Note: Your API keys carry many privileges, so be sure to keep them secure. Do not share your API keys in publicly accessible areas such as GitHub or through client-side code. When possible, encrypt API keys when you store them.

(opens in a new tab)

Having trouble? Find out how to get API keys here or follow our quickstart guide here.

Compression

To enable compression, define an Accept-Encoding header with the value gzip for gzip compression or br for brotli compression.

Accept-Encoding: gzip