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://api.climatiq.io/travel/flights
Request
This endpoint accepts the following parameters:
Attribute | Required |
---|---|
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 Attributes | Required | Default |
---|---|---|
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? | optional | 1 |
class string Which class the flight was on. Allowed values are average , economy , business , first | optional | average |
year integer The year that the travel took place. Climatiq will pick emission factors that is as close to the supplied year as possible. | optional | The 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://api.climatiq.io/travel/flights \ --header "Authorization: Bearer $CLIMATIQ_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 float 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": 2994, "co2e_unit": "kg", "legs": [ { "co2e": 325.5, "co2e_unit": "kg", "co2e_calculation_method": "ar5", "co2e_calculation_origin": "source", "emission_factor": { "name": "International short-haul flight business - with RF effect", "activity_id": "passenger_flight-route_type_international-aircraft_type_na-distance_short_haul_lt_3700km-class_business-rf_included-distance_uplift_included", "id": "c20c56a4-fb10-48c7-9321-49a22e44887a", "access_type": "public", "source": "BEIS", "source_dataset": "Greenhouse gas reporting: conversion factors 2023", "year": 2023, "region": "GB", "category": "Air Travel", "source_lca_activity": "fuel_combustion", "data_quality_flags": [] }, "constituent_gases": { "co2e_total": 325.5, "co2e_other": null, "co2": 323.9, "ch4": 0.0004236, "n2o": 0.00604 }, "activity_data": { "activity_value": 1187, "activity_unit": "passenger-km" }, "audit_trail": "enabled" }, { "co2e": 2340, "co2e_unit": "kg", "co2e_calculation_method": "ar5", "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": "14f882a3-9f0a-40ef-9994-63890307d6ca", "access_type": "public", "source": "BEIS", "source_dataset": "Greenhouse gas reporting: conversion factors 2023", "year": 2023, "region": "GB", "category": "Air Travel", "source_lca_activity": "fuel_combustion", "data_quality_flags": [] }, "constituent_gases": { "co2e_total": 2340, "co2e_other": null, "co2": 2329, "ch4": 0.004175, "n2o": 0.04374 }, "activity_data": { "activity_value": 11695, "activity_unit": "passenger-km" }, "audit_trail": "enabled" } ], "wtt_legs": [ { "co2e": 40.02, "co2e_unit": "kg", "co2e_calculation_method": "ar5", "co2e_calculation_origin": "source", "emission_factor": { "name": "International short-haul flight business - with RF effect", "activity_id": "passenger_flight-route_type_international-aircraft_type_na-distance_short_haul_lt_3700km-class_business-rf_included-distance_uplift_included", "id": "3c93dc21-fcf7-4307-a356-9c20befa0873", "access_type": "public", "source": "BEIS", "source_dataset": "Greenhouse gas reporting: conversion factors 2023", "year": 2023, "region": "GB", "category": "Air Travel", "source_lca_activity": "well_to_tank", "data_quality_flags": [] }, "constituent_gases": { "co2e_total": 40.02, "co2e_other": null, "co2": null, "ch4": null, "n2o": null }, "activity_data": { "activity_value": 1187, "activity_unit": "passenger-km" }, "audit_trail": "enabled" }, { "co2e": 287.8, "co2e_unit": "kg", "co2e_calculation_method": "ar5", "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": "78cd0b4f-0644-4e94-aa2f-3788f71699da", "access_type": "public", "source": "BEIS", "source_dataset": "Greenhouse gas reporting: conversion factors 2023", "year": 2023, "region": "GB", "category": "Air Travel", "source_lca_activity": "well_to_tank", "data_quality_flags": [] }, "constituent_gases": { "co2e_total": 287.8, "co2e_other": null, "co2": null, "ch4": null, "n2o": null }, "activity_data": { "activity_value": 11695, "activity_unit": "passenger-km" }, "audit_trail": "enabled" } ]}