CO2 Emissions
This feature can be enabled in the API request by including:
"control": {
"features": [
"co2_emissions"
]
}
The CO2 emissions feature leverages IATA's CO2 Connect data to enrich the Routehappy API's response with the real-time data of individual airlines and deliver an accurate calculation of the CO2 emissions volume for all parts of the itinerary - individually for each segment, per leg, and for the entire itinerary.
CO2 emissions are calculated for all itineraries in the API's request in real time, taking into consideration all of the individual itineraries' necessary details, such as operating carrier, equipment, date of departure, cabin, etc.
Once the feature is enabled in the API request, the CO2 emissions values on all of the itinerary's levels (per segment, per leg, or for the entire itinerary) will appear in the response. They are represented as the calculation of the total duration (in minutes) of the specific level, multiplied by the calculated emissions per minute for the specific level of the itinerary. CO2 emission values are always represented as floating-point numbers (truncated to the second decimal placement) in kilograms (kg) for a single passenger.
Missing IATA records
It is important to note that for segments with an equipment type which doesn't exist in IATA's file, no CO2 Connect records will be matched, and the resulting emissions value in the API response will be 0
.
This is an example response for a single itinerary with 4 segments and 2 legs:
{
"data": {
...
},
"itineraries": [
{
"data": {
"co2_emissions": 1616.22, // The CO2 emissions for the entire itinerary in Kg
"legs": [
{
"co2_emissions": 780.09, // The CO2 emissions for the first leg in Kg
"fares": [
{
"segments": [
{
"co2_emissions": 404.28, // The CO2 emissions for the first segment in Kg
"id": "MEL-SIN-XX-35-20231102-ECON",
...
},
{
"co2_emissions": 375.81, // The CO2 emissions for the second segment in Kg
"id": "SIN-BKK-XX-39-20231102-ECON",
...
}
]
}
],
...
},
{
"co2_emissions": 836.13, // The CO2 emissions for the second leg in Kg
"fares": [
{
"segments": [
{
"co2_emissions": 367.17, // The CO2 emissions for the third segment in Kg
"id": "BKK-SIN-XX-38-20231115-ECON",
...
},
{
"co2_emissions": 468.96, // The CO2 emissions for the fourth segment in Kg
"id": "SIN-MEL-XX-36-20231115-ECON",
...
}
]
}
],
...
}
]
},
"valid": true,
...
}
],
...
}