Zum Inhalt springen
GET /v1/flight

Air travel emissions

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/carbonfootprint-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/carbonfootprint-api/v1/flight" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/carbonfootprint-api/v1/flight", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/carbonfootprint-api/v1/flight");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/carbonfootprint-api/v1/flight",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "data": {
        "input": {
            "to": "JFK",
            "band": "long_haul",
            "from": "LHR",
            "class": "economy",
            "passengers": 1,
            "round_trip": true,
            "distance_km": 5539.7
        },
        "co2e_g": 1639738,
        "co2e_kg": 1639.738,
        "co2e_tonnes": 1.639738,
        "per_passenger": {
            "co2e_g": 1639738,
            "co2e_kg": 1639.738,
            "co2e_tonnes": 1.639738
        },
        "class_multiplier": 1,
        "factor_kg_per_km": 0.148
    },
    "meta": {
        "timestamp": "2026-05-30T22:48:32.291Z",
        "request_id": "ea6f307a-6f49-4db9-8e3c-cdf9e3e7450e"
    },
    "status": "ok",
    "message": "Flight emissions estimated",
    "success": true
}