API Reference
Flights (deprecated)

Flights DEPRECATEDDEPRECATED

In addition to direct calculation of emissions per passenger-kilometer, passenger-mile, tonne-kilometer or ton-mile, Climatiq makes endpoints available for calculating emissions based on departure and arrival airports. The API will automatically select an appropriate emission factor; a specific ID can be selected to override this.

‚ö†ÔłŹ

The flights endpoint is deprecated and will be removed in a future version. Use the new travel feature instead.

POST Calculate total estimated emissions produced by passenger flights between the specified airports

https://beta4.api.climatiq.io/travel/flights

Request

The following parameters can be defined as JSON-encoded object in a body.

AttributeRequired
legs array
An array of one or more legs in a flight
required

Flight legs are the constituent elements of a given flight from one location to another; e.g. a flight from Berlin to New York JFK might require 2 legs of Berlin to Amsterdam and Amsterdam to New York JFK

Leg AttributesRequiredDefault
from string
Start of flight leg, expressed in an IATA code (opens in a new tab)
required
to string
End of flight leg, expressed in an IATA code (opens in a new tab)
required
passengers int
How many passengers are on the flight?
optional1
class string
Which class the flight was on. Allowed values are unknown, economy, business, first
optionalunknown
year number
The year that the travel took place. Climatiq will pick emission factors that is as close to the supplied year as possible.
optionalThe current year
emission_factor Selector
This endpoint will automatically pick the highest emission factor which is eligible for the flight. If you want to override the automatic emission factor selection you can provide a selector. You are then fully responsible for emission factor selection. The selector must end up selecting an emission factor that supports the PassengerOverDistance unit.
optional
# First class trip from Berlin to Amsterdam for two passengers.
# Followed by a trip from Amsterdam to New York JFK for two passengers in economy class.
curl --request POST \
--url https://beta4.api.climatiq.io/travel/flights \
--header 'Authorization: Bearer API_KEY' \
--data '{
"legs": [
{
"from": "BER",
"to": "AMS",
"passengers": 2,
"class": "first"
},
{
"from": "AMS",
"to": "JFK",
"passengers": 2,
"class": "economy"
}
]
}'

Response

The response includes the total emissions for the trip in kgCO2e, and the emissions for each leg of the trip.

Attribute
co2e number
Total carbon dioxide equivalent for entire trip.
co2e_unit string
The unit in which the co2e field is expressed.
legs [Estimations]
List of estimations, one for each leg in the trip. These are returned in the same order as the flight legs.
wtt_legs [Estimations]
List of estimations for the co2e associated with procuring and transportation the fuel (the well-to-tank emissions) These are returned in the same order as the flight legs. If you supply your own selector for a leg via the emission_factor parameter, this list will contain null for that leg.
{
"co2e": 2120.80911907208,
"co2e_unit": "kg",
"legs": [
{
"co2e": 182.17370336204002,
"co2e_unit": "kg",
"co2e_calculation_method": "ar4",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "International short-haul flight - with RF effect",
"activity_id": "passenger_flight-route_type_international-aircraft_type_na-distance_short_haul_lt_3700km-class_first-rf_included-distance_uplift_included",
"id": "c88babf8-ca77-46d1-82fd-f5e19adad4bc",
"access_type": "public",
"source": "BEIS",
"source_dataset": "Greenhouse gas reporting: conversion factors 2022",
"year": 2022,
"region": "GB",
"category": "Air Travel",
"source_lca_activity": "fuel_combustion",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 182.17370336204002,
"co2e_other": null,
"co2": 181.26004641168004,
"ch4": 0.00047462698720000004,
"n2o": 0.0030257470434000007
},
"activity_data": {
"activity_value": 1186.5674680000002,
"activity_unit": "passenger-km"
},
"audit_trail": "enabled"
},
{
"co2e": 1729.34642481192,
"co2e_unit": "kg",
"co2e_calculation_method": "ar4",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "International long-haul flight economy - with RF effect",
"activity_id": "passenger_flight-route_type_international-aircraft_type_na-distance_long_haul_gt_3700km-class_economy-rf_included-distance_uplift_included",
"id": "db2d3bcf-d56d-4ffa-9d05-188a9c04eecc",
"access_type": "public",
"source": "BEIS",
"source_dataset": "Greenhouse gas reporting: conversion factors 2022",
"year": 2022,
"region": "GB",
"category": "Air Travel",
"source_lca_activity": "fuel_combustion",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 1729.34642481192,
"co2e_other": null,
"co2": 1720.69209090808,
"ch4": 0.0046780183264,
"n2o": 0.0286528622492
},
"activity_data": {
"activity_value": 11695.045816,
"activity_unit": "passenger-km"
},
"audit_trail": "enabled"
}
],
"wtt_legs": [
{
"co2e": 19.94619913708,
"co2e_unit": "kg",
"co2e_calculation_method": "ar4",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "International short-haul flight - with RF effect",
"activity_id": "passenger_flight-route_type_international-aircraft_type_na-distance_short_haul_lt_3700km-class_first-rf_included-distance_uplift_included",
"id": "abaee4b4-d9a3-4adb-8fd0-23eaabe6c61e",
"access_type": "public",
"source": "BEIS",
"source_dataset": "Greenhouse gas reporting: conversion factors 2022",
"year": 2022,
"region": "GB",
"category": "Air Travel",
"source_lca_activity": "well_to_tank",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 19.94619913708,
"co2e_other": null,
"co2": null,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 1186.5674680000002,
"activity_unit": "passenger-km"
},
"audit_trail": "enabled"
},
{
"co2e": 189.34279176104,
"co2e_unit": "kg",
"co2e_calculation_method": "ar4",
"co2e_calculation_origin": "source",
"emission_factor": {
"name": "International long-haul flight economy - with RF effect",
"activity_id": "passenger_flight-route_type_international-aircraft_type_na-distance_long_haul_gt_3700km-class_economy-rf_included-distance_uplift_included",
"id": "9b60af3b-16e8-48b5-99a4-36261d8967fa",
"access_type": "public",
"source": "BEIS",
"source_dataset": "Greenhouse gas reporting: conversion factors 2022",
"year": 2022,
"region": "GB",
"category": "Air Travel",
"source_lca_activity": "well_to_tank",
"data_quality_flags": []
},
"constituent_gases": {
"co2e_total": 189.34279176104,
"co2e_other": null,
"co2": null,
"ch4": null,
"n2o": null
},
"activity_data": {
"activity_value": 11695.045816,
"activity_unit": "passenger-km"
},
"audit_trail": "enabled"
}
]
}