Save up to 17% with yearly billing

See pricing

Fehlerbehandlung

TTLs für den Produktivbetrieb: Caching & Monitoring. Plattformweite Fehler: Fehlerbehandlung.

NOTAMs

GET /notams/{icao} liefert 200 mit notams: [], wenn keine aktiven Meldungen vorliegen — das ist kein Fehler. Dreistellige US-Codes werden normalisiert (JFK → KJFK).

Filtern Sie clientseitig nach scope und type; die API liefert alle aktiven Meldungen für den Standort.

FAA-Verspätungen

total_alerts: 0 mit einem optionalen message-String ist eine gültige Antwort im Sinne von „keine aktiven Programme“. Die Abdeckung umfasst ausschließlich das US-amerikanische FAA NAS — internationale Flughäfen erscheinen hier nicht.

import os

import requests

HEADERS = {
    "X-RapidAPI-Key": os.getenv("RAPIDAPI_KEY", "YOUR_RAPIDAPI_KEY"),
    "X-RapidAPI-Host": "skylink-api.p.rapidapi.com",
}
BASE = "https://skylink-api.p.rapidapi.com"


def fetch_notams(icao: str) -> list[dict]:
    r = requests.get(f"{BASE}/notams/{icao}", headers=HEADERS, timeout=(10, 15))
    r.raise_for_status()
    return r.json().get("notams") or []


def fetch_faa_delays() -> dict:
    r = requests.get(f"{BASE}/delays/faa", headers=HEADERS, timeout=(10, 15))
    r.raise_for_status()
    return r.json()


if __name__ == "__main__":
    notams = fetch_notams("KJFK")
    print(f"KJFK NOTAMs: {len(notams)} active")

    delays = fetch_faa_delays()
    total = delays.get("total_alerts", 0)
    if total == 0:
        print("No active FAA delay programs nationwide.")
    else:
        print(f"Active FAA alerts: {total}")

Siehe auch: NOTAMs · FAA-Verspätungen · Caching & Monitoring

Auf dieser Seite