- [HTTP request](https://developers.google.com/travel/impact-model/docs/reference/rest/v1/flights/computeScope3DetailedFlightEmissions.md.txt#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/travel/impact-model/docs/reference/rest/v1/flights/computeScope3DetailedFlightEmissions.md.txt#body.request_body)
  - [JSON representation](https://developers.google.com/travel/impact-model/docs/reference/rest/v1/flights/computeScope3DetailedFlightEmissions.md.txt#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/travel/impact-model/docs/reference/rest/v1/flights/computeScope3DetailedFlightEmissions.md.txt#body.response_body)
  - [JSON representation](https://developers.google.com/travel/impact-model/docs/reference/rest/v1/flights/computeScope3DetailedFlightEmissions.md.txt#body.ComputeScope3DetailedFlightEmissionsResponse.SCHEMA_REPRESENTATION)
- [Scope3FlightWithDetailedEmissions](https://developers.google.com/travel/impact-model/docs/reference/rest/v1/flights/computeScope3DetailedFlightEmissions.md.txt#Scope3FlightWithDetailedEmissions)
  - [JSON representation](https://developers.google.com/travel/impact-model/docs/reference/rest/v1/flights/computeScope3DetailedFlightEmissions.md.txt#Scope3FlightWithDetailedEmissions.SCHEMA_REPRESENTATION)
- [Scope3EmissionsMetadata](https://developers.google.com/travel/impact-model/docs/reference/rest/v1/flights/computeScope3DetailedFlightEmissions.md.txt#Scope3EmissionsMetadata)
  - [JSON representation](https://developers.google.com/travel/impact-model/docs/reference/rest/v1/flights/computeScope3DetailedFlightEmissions.md.txt#Scope3EmissionsMetadata.SCHEMA_REPRESENTATION)
- [Try it!](https://developers.google.com/travel/impact-model/docs/reference/rest/v1/flights/computeScope3DetailedFlightEmissions.md.txt#try-it)

Retrieves detailed GHG emissions estimates for a set of flight segments for Scope 3 reporting.

The response will contain all entries that match the input `Scope3FlightSegment` flight segments, in the same order provided. For each flight segment, the estimates will be computed using the following cascading logic (using the first one that is available):

1. TIM-based emissions given `origin`, `destination`, `carrier`, `flightNumber`, `departureDate`, and `cabinClass` (Tier 1).
2. Typical flight emissions given `origin`, `destination`, year in `departureDate`, and `cabinClass` (Tier 2).
3. Distance-based emissions calculated using `distanceKm`, year in `departureDate`, and `cabinClass` (Tier 3). Note that `distanceKm` must be explicitly provided to allow fallback to Tier 3 (it is not computed from `origin` and `destination`).

Detailed Flight Emissions are transparent per-passenger greenhouse gas emission estimates supplemented by comprehensive metadata detailing the calculation methodology, emissions breakdown, and data provenance. They are available only for Tier 1 emissions (TIM-based).

Details on how emission estimates are computed are available on [GitHub](https://github.com/google/travel-impact-model).

If there is a future flight requested in this calendar year, we do not support Tier 1 emissions and will fallback to Tier 2 or 3 emissions. If the requested future flight is not in this calendar year, we will return an empty response. We recommend that for future flights, `computeDetailedFlightEmissions` API is used instead.

If there are no estimates available for a certain flight with any of the three methods, the response will return a `Scope3FlightWithDetailedEmissions` object with empty emission fields. The request will still be considered successful. Generally, missing emissions estimates occur when the flight is unknown to the server (e.g. no specific flight exists, or typical flight emissions are not available for the requested origin/destination pair).

The request will fail with an `INVALID_ARGUMENT` error with a message describing the issue if:

- The request contains more than 100 flight segments.
- The input flight segment is missing one or more identifiers. For example, missing origin/destination without a valid distance for `TIM_EMISSIONS` or `TYPICAL_FLIGHT_EMISSIONS` type matching, or missing distance for a `DISTANCE_BASED_EMISSIONS` type matching (if you want to fallback to distance-based emissions or want a distance-based emissions estimate, you need to specify a distance).
- The flight date is before 2019 (Scope 3 data is only available for 2019 and after).
- The flight distance is 0 or lower.
- Missing cabin class.

Because the request is processed with fallback logic, it is possible that misconfigured requests return valid emissions estimates using fallback methods. Consequently, one should check the source of the returned emissions (`source`) to confirm the results are as expected.

### HTTP request

`POST https://travelimpactmodel.googleapis.com/v1/flights:computeScope3DetailedFlightEmissions`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "flights": [ { object (`Scope3FlightSegment`) } ], "modelVersion": { object (`ModelVersion`) } } ``` |

| Fields ||
|---|---|
| `flights[]` | ``object (`Scope3FlightSegment`)`` Required. Flights to return detailed emission estimates for. |
| `modelVersion` | ``object (`ModelVersion`)`` Optional. The model version under which emission estimates for all flights in this request were computed. If not specified, the latest supported Scope 3 model version is used. Only the `major` version is used to match the Scope 3 model version (e.g. `{"major": 2}`); `minor`, `patch`, and `dated` fields are ignored. See [TIM versioning](https://github.com/google/travel-impact-model/blob/main/projects/scope3_cat6_flight_emissions.md#tim-versioning) for available Scope 3 model versions. |

### Response body

Output definition for the `flights.computeScope3DetailedFlightEmissions` response.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "flightsDetailedEmissions": [ { object (`Scope3FlightWithDetailedEmissions`) } ], "modelVersion": { object (`ModelVersion`) } } ``` |

| Fields ||
|---|---|
| `flightsDetailedEmissions[]` | ``object (`Scope3FlightWithDetailedEmissions`)`` List of flight segments with detailed emission estimates. |
| `modelVersion` | ``object (`ModelVersion`)`` The model version under which emission estimates for all flights in this response were computed. |

## Scope3FlightWithDetailedEmissions

Scope 3 flight segment with detailed emission estimates.

| JSON representation |
|---|
| ``` { "flightEmissions": { object (`Scope3FlightEmissions`) }, "emissionsMetadata": { object (`Scope3EmissionsMetadata`) } } ``` |

| Fields ||
|---|---|
| `flightEmissions` | ``object (`Scope3FlightEmissions`)`` All the flight emissions data. |
| `emissionsMetadata` | ``object (`Scope3EmissionsMetadata`)`` Additional metadata about the flight emissions calculation, including data provenance and external references. |

## Scope3EmissionsMetadata

Additional metadata about the Scope 3 flight emissions calculation.

| JSON representation |
|---|
| ``` { "emissionsProvenance": { object (`EmissionsProvenance`) }, "timWebsiteEmissionsCalculatorUrl": string } ``` |

| Fields ||
|---|---|
| `emissionsProvenance` | ``object (`EmissionsProvenance`)`` Details about the provenance of data used to calculate the emissions data, including the contributing factors with their data sources. |
| `timWebsiteEmissionsCalculatorUrl` | `string` Output only. Link to the `travelimpactmodel.org` Emissions Calculator website. Example: <https://travelimpactmodel.org/lookup/scope3-flight?itinerary=ZRH-BOS-LX-52-20241225-1>. |