旅遊影響模型 API 會公開根據旅遊影響模型計算的預估排放量。這些排放量估計值也會顯示在 Google 航班/機票上,您也可以透過 Google 試算表外掛程式存取 API。

這個 API 是公開且免費的。

您需要提供 API 金鑰才能進行驗證。

旅遊影響模型是目前最先進的航班碳排放量預估模型。

我們已在 GitHub 上發布這項方法。

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

不支援包機、私人航班和貨機。不支援過去的航班。如有任何問題或功能要求,請與我們聯絡 (請參閱支援頁面)。

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

一般航班排放量是指兩個機場之間航班行程的溫室氣體排放量,以乘客為單位計算。

我們會使用航班排放量預估資料來計算這項指標,並在 GitHub 上發布建立這類資料集的方法。一般航班排放量不應取代航班排放量預估值。

取得航班排放量示例

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": 2025, "month": 12, "day": 2}
      },
      {
        "origin": "CDG",
        "destination": "BOS",
        "operatingCarrierCode": "AF",
        "flightNumber": 334,
        "departureDate": {"year": 2025, "month": 12, "day": 1}
      },
      {
        "origin": "ZRH",
        "destination": "BOS",
        "operatingCarrierCode": "LX",
        "flightNumber": 52,
        "departureDate": {"year": 2025, "month": 11, "day": 1}
      }
    ]
  }'

範例包括航班 ZRH - BOS,在 CDG 轉機,以及航班 ZRH - BOS。

範例指令會使用 curl 呼叫 REST 端點。在指令中,您必須將 $API_KEY 替換成您的 API 金鑰。您可能還需要調整航班詳細資料,以符合現有的即將出發航班。

如要查看此 API 公開資源的完整說明文件,請參閱「參考資料」分頁。同時支援 HTTP 和 RPC 呼叫。

{
  "flightEmissions": [
    {
      "flight": {
        "origin": "ZRH",
        "destination": "CDG",
        "operatingCarrierCode": "AF",
        "flightNumber": 1115,
        "departureDate": {
          "year": 2025,
          "month": 12,
          "day": 2
        }
      },
      "emissionsGramsPerPax": {
        "first": 100349,
        "business": 100349,
        "premiumEconomy": 66900,
        "economy": 66900
      },
      "source": "TIM",
      "contrailsImpactBucket": "CONTRAILS_IMPACT_MODERATE"
    },
    {
      "flight": {
        "origin": "CDG",
        "destination": "BOS",
        "operatingCarrierCode": "AF",
        "flightNumber": 334,
        "departureDate": {
          "year": 2025,
          "month": 12,
          "day": 1
        }
      },
      "emissionsGramsPerPax": {
        "first": 1650750,
        "business": 1320600,
        "premiumEconomy": 495224,
        "economy": 330150
      },
      "source": "TIM",
      "contrailsImpactBucket": "CONTRAILS_IMPACT_MODERATE"
    },
    {
      "flight": {
        "origin": "ZRH",
        "destination": "BOS",
        "operatingCarrierCode": "LX",
        "flightNumber": 52,
        "departureDate": {
          "year": 2025,
          "month": 11,
          "day": 1
        }
      },
      "emissionsGramsPerPax": {
        "first": 1557805,
        "business": 1246244,
        "premiumEconomy": 467341,
        "economy": 311561
      },
      "source": "TIM",
      "contrailsImpactBucket": "CONTRAILS_IMPACT_MODERATE"
    }
  ],
  "modelVersion": {
    "major": 3,
    "minor": 0,
    "patch": 0,
    "dated": "20250627"
  }
}

回應範例。

取得航班排放量一般範例

curl https://travelimpactmodel.googleapis.com/v1/flights:computeTypicalFlightEmissions?key=$API_KEY \
-H "Content-Type: application/json" -d \
'{
  "markets": [
    {
      "origin": "ZRH",
      "destination": "BOS"
    },
    {
      "origin": "BOS",
      "destination": "ZRH"
    },
  ]
}'

這個範例包含兩個市場:ZRH-BOS 和 BOS-ZRH。

範例指令會使用 curl 呼叫 REST 端點。在指令中,您必須將 $API_KEY 替換成您的 API 金鑰

如要查看此 API 公開資源的完整說明文件,請參閱「參考資料」分頁。同時支援 HTTP 和 RPC 呼叫。

{
  "typicalFlightEmissions": [
    {
      "market": {
        "origin": "ZRH",
        "destination": "BOS"
      },
      "emissionsGramsPerPax": {
        "first": 1721684,
        "business": 1411005,
        "premiumEconomy": 566775,
        "economy": 406535
      }
    },
    {
      "market": {
        "origin": "BOS",
        "destination": "ZRH"
      },
      "emissionsGramsPerPax": {
        "first": 2149656,
        "business": 1737021,
        "premiumEconomy": 688646,
        "economy": 488115
      }
    }
  ],
  "modelVersion": {
    "major": 2,
    "minor": 0,
    "patch": 0,
    "dated": "20250131"
  }
}

回應範例。