Travel Impact Model API 會顯示根據 Travel Impact 模型計算而估算的排放量。Google 航班/機票也會顯示這些預估排放量。

這個 API 是免費的,而且完全免費。

您必須有 API 金鑰才能進行驗證。

「旅遊影響」模型是最先進的航班排放量估算模型。

該方法發布於 GitHub

這個 API 支援未來 11 個月內出發的全球商務航班。

不支援包機航班、私人航班和貨物運送。不支援過往航班。如有疑問或提出功能要求,請與我們聯絡 (請參閱支援網頁)。

這個 API 公開的資料受到 CC BY-SA 4.0 授權。

呼叫 API 範例

curl https://travelimpactmodel.googleapis.com/v1/flights:computeFlightEmissions?key=$API_KEY \
  -H "Content-Type: application/json" -d \
  '{
    "flights": [
      {
        "origin": "ZRH",
        "destination": "CDG",
        "operatingCarrierCode": "AF",
        "flightNumber": 1115,
        "departureDate": {"year": 2024, "month": 12, "day": 2}
      },
      {
        "origin": "CDG",
        "destination": "BOS",
        "operatingCarrierCode": "AF",
        "flightNumber": 334,
        "departureDate": {"year": 2024, "month": 12, "day": 1}
      },
      {
        "origin": "ZRH",
        "destination": "BOS",
        "operatingCarrierCode": "LX",
        "flightNumber": 52,
        "departureDate": {"year": 2024, "month": 11, "day": 1}
      }
    ]
  }'

例如 ZRH - BOS 航班。

範例指令使用 curl 呼叫 REST 端點。在指令中,您必須將 $API_KEY 替換為您的 API 金鑰。此外,你可能需要調整航班詳細資料,以符合現有的近期航班。

如需這個 API 公開資源的完整說明文件,請參閱參考資料分頁。支援 HTTP 和 RPC 呼叫。

{
  "flightEmissions": [
    {
      "flight": {
        "origin": "ZRH",
        "destination": "CDG",
        "operatingCarrierCode": "AF",
        "flightNumber": 1115,
        "departureDate": {
          "year": 2024,
          "month": 12,
          "day": 2
        }
      },
      "emissionsGramsPerPax": {
        "first": 97116,
        "business": 97116,
        "premiumEconomy": 64744,
        "economy": 64744,
      }
    },
    {
      "flight": {
        "origin": "CDG",
        "destination": "BOS",
        "operatingCarrierCode": "AF",
        "flightNumber": 334,
        "departureDate": {
          "year": 2024,
          "month": 12,
          "day": 1
        }
      },
      "emissionsGramsPerPax": {
        "first": 2290480,
        "business": 1832384,
        "premiumEconomy": 687143,
        "economy": 458096
      }
    },
    {
      "flight": {
        "origin": "ZRH",
        "destination": "BOS",
        "operatingCarrierCode": "LX",
        "flightNumber": 52,
        "departureDate": {
          "year": 2024,
          "month": 11,
          "day": 1
        }
      },
      "emissionsGramsPerPax": {
        "first": 2220460,
        "business": 1776368,
        "premiumEconomy": 666137,
        "economy": 444092
      }
    }
  ],
  "modelVersion": {
    "major": 1,
    "minor": 9,
    "patch": 0,
    "dated": "20240312"
  }
}

回應範例。