Package google.travel.sustainability.travelimpactmodel.v1

Stay organized with collections Save and categorize content based on your preferences.

Index

TravelImpactModelService

API to provide carbon emission estimates.

ComputeFlightEmissions

rpc ComputeFlightEmissions(ComputeFlightEmissionsRequest) returns (ComputeFlightEmissionsResponse)

Stateless method to retrieve emission estimates. Details on how emission estimates are computed: https://github.com/google/travel-impact-model

The response will contain all entries that match the input flight legs, in the same order. If there are no estimates available for a certain flight leg, the response will return the flight leg object with empty emission fields. The request will still be considered successful. Reasons for missing emission estimates include:

  • The flight is unknown to the server.
  • The input flight leg is missing one or more identifiers.
  • The flight date is in the past.
  • The aircraft type is not supported by the model.
  • Missing seat configuration.

The request can contain up to 1000 flight legs. If the request has more than 1000 direct flights, if will fail with an INVALID_ARGUMENT error.

ComputeFlightEmissionsRequest

Input definition for the [ComputeFlightEmissions][google.travel.sustainability.travelimpactmodel.v1.ComputeFlightEmissions] request.

Fields
flights[]

Flight

Required. Direct flights to return emission estimates for.

ComputeFlightEmissionsResponse

Output definition for the [ComputeFlightEmissions][google.travel.sustainability.travelimpactmodel.v1.ComputeFlightEmissions] response.

Fields
flight_emissions[]

FlightWithEmissions

List of flight legs with emission estimates.

model_version

ModelVersion

The model version under which emission estimates for all flights in this response were computed.

EmissionsGramsPerPax

Grouped emissions per seating class results.

Fields
first

int32

Emissions for one passenger in first class in grams. This field is always computed and populated, regardless of whether the aircraft has first class seats or not.

business

int32

Emissions for one passenger in business class in grams. This field is always computed and populated, regardless of whether the aircraft has business class seats or not.

premium_economy

int32

Emissions for one passenger in premium economy class in grams. This field is always computed and populated, regardless of whether the aircraft has premium economy class seats or not.

economy

int32

Emissions for one passenger in economy class in grams. This field is always computed and populated, regardless of whether the aircraft has economy class seats or not.

Flight

All details related to a single request item for a direct flight emission estimates.

Fields
origin

string

Required. IATA airport code for flight origin, e.g. "LHR".

destination

string

Required. IATA airport code for flight destination, e.g. "JFK".

operating_carrier_code

string

Required. IATA carrier code, e.g. "AA".

flight_number

int32

Required. Flight number, e.g. 324.

departure_date

Date

Required. Date of the flight in the time zone of the origin airport. Must be a date in the present or future.

FlightWithEmissions

Direct flight with emission estimates.

Fields
flight

Flight

Required. Matches the flight identifiers in the request. Note: all IATA codes are capitalized.

emissions_grams_per_pax

EmissionsGramsPerPax

Optional. Per-passenger emission estimate numbers. Will not be present if emissions could not be computed. For the list of reasons why emissions could not be computed, see [ComputeFlightEmissions][google.travel.sustainability.travelimpactmodel.v1.ComputeFlightEmissions].

ModelVersion

Travel Impact Model version. For more information about the model versioning see https://github.com/google/travel-impact-model/#versioning.

Fields
major

int32

Major versions: Major changes to methodology (e.g. adding new data sources to the model that lead to major output changes). Such changes will be infrequent and announced well in advance. Might involve API version changes, which will respect guidelines in https://cloud.google.com/endpoints/docs/openapi/versioning-an-api#backwards-incompatible

minor

int32

Minor versions: Changes to the model that, while being consistent across schema versions, change the model parameters or implementation.

patch

int32

Patch versions: Implementation changes meant to address bugs or inaccuracies in the model implementation.

dated

string

Dated versions: Model datasets are recreated with refreshed input data but no change to the algorithms regularly.