Get the FREE Ultimate OpenClaw Setup Guide →
x

A simple Flight Tracker

Verified

@xenofex7

npx machina-cli add skill @xenofex7/flight-tracker --openclaw
Files (1)
SKILL.md
3.5 KB

Flight Tracker

Track flights in real-time and search flight schedules between airports.

Quick Commands

Live Flight Tracking

Flights over a region (bounding box)

# Switzerland (lat_min, lat_max, lon_min, lon_max)
curl -s "https://opensky-network.org/api/states/all?lamin=45.8&lomin=5.9&lamax=47.8&lomax=10.5" | \
  jq -r '.states[] | "\(.[1]) - \(.[2]) | Alt: \(.[7])m | Speed: \(.[9])m/s | From: \(.[5])"'

Track specific flight by callsign

curl -s "https://opensky-network.org/api/states/all?icao24=<aircraft-icao>" | jq .

Get live flight info

# Use helper script
python3 scripts/track.py --region switzerland
python3 scripts/track.py --callsign SWR123
python3 scripts/track.py --airport LSZH

Flight Schedules

Search for scheduled flights between airports:

# Basic usage (shows search links)
python3 scripts/schedule.py HAM ZRH

# With specific date
python3 scripts/schedule.py --from HAM --to ZRH --date 2026-01-15

# With API key (optional, for detailed results)
export AVIATIONSTACK_API_KEY='your_key_here'
python3 scripts/schedule.py HAM ZRH

Without API key: Shows helpful search links (Google Flights, FlightRadar24, airline websites)

With API key: Fetches live schedule data with departure/arrival times, terminals, gates, and status

Free API key available at aviationstack.com (100 requests/month)

Regions

Pre-defined regions in the script:

  • switzerland: Swiss airspace
  • europe: European airspace (rough bounds)
  • zurich: Area around Zurich
  • geneva: Area around Geneva

API Endpoints

All states

GET https://opensky-network.org/api/states/all

Optional parameters:

  • lamin, lomin, lamax, lomax: Bounding box
  • icao24: Specific aircraft (hex code)
  • time: Unix timestamp (0 = now)

Response Format

Each flight state contains:

[0]  icao24      - Aircraft ICAO24 address (hex)
[1]  callsign    - Flight callsign (e.g., "SWR123")
[2]  origin_country - Country name
[5]  origin      - Origin airport (if available)
[7]  baro_altitude - Altitude in meters
[9]  velocity    - Speed in m/s
[10] heading     - Direction in degrees
[11] vertical_rate - Climb/descent rate in m/s

Airport Codes

ICAO (for live tracking)

  • LSZH - Zurich
  • LSGG - Geneva
  • LSZB - Bern
  • LSZA - Lugano
  • LFSB - Basel-Mulhouse (EuroAirport)

IATA (for schedules)

  • ZRH - Zurich
  • GVA - Geneva
  • BSL - Basel
  • BRN - Bern
  • LUG - Lugano
  • HAM - Hamburg
  • FRA - Frankfurt
  • MUC - Munich
  • BER - Berlin
  • LHR - London Heathrow
  • CDG - Paris CDG
  • AMS - Amsterdam

Notes

Live Tracking (OpenSky Network)

  • Free API with rate limits (anonymous: 400/day)
  • Real-time data from ADS-B receivers worldwide
  • No API key required
  • Data updated every 10 seconds
  • Create account for higher limits and historical data

Flight Schedules (AviationStack)

  • Optional API key for detailed schedule data
  • Free tier: 100 requests/month
  • Without API: provides search links to Google Flights, FlightRadar24, etc.
  • Supports date-specific queries

Source

git clone https://clawhub.ai/xenofex7/flight-trackerView on GitHub

Overview

Flight Tracker lets you monitor live flights in real time by region, callsign, or airport via OpenSky Network, and search schedules between airports. It supports live state retrieval and schedule lookups, with optional API key for richer results.

How This Skill Works

The tool uses the OpenSky Network API to fetch live flight states by bounding box, specific aircraft, or callsign. You can run Python scripts track.py and schedule.py to retrieve region, callsign, or airport data and to search schedules between airports; for detailed schedule results, an AviationStack API key can be used. Live OpenSky data updates roughly every 10 seconds and is free with rate limits.

When to Use It

  • You want to see what flights are over a region like Switzerland.
  • You need to track a specific flight by its callsign, such as SWR123.
  • You want live information for an airport like LSZH (Zurich) including arriving and departing flights.
  • You want to search schedules between two airports, e.g., HAM to ZRH, possibly on a specific date.
  • You require detailed schedule data by using an AviationStack API key for richer results.

Quick Start

  1. Step 1: Choose a target (region, callsign, or airport).
  2. Step 2: Run the live tracker, e.g. python3 scripts/track.py --region switzerland or --callsign SWR123 or --airport LSZH.
  3. Step 3: Run the scheduler, e.g. python3 scripts/schedule.py HAM ZRH, optionally with --date and AVIATIONSTACK_API_KEY for detailed results.

Best Practices

  • Start with a clear target: region, specific callsign, or a single airport (e.g., switzerland or LSZH).
  • Use the appropriate script flag (region, --callsign, or --airport) in track.py to fetch precise data.
  • Be mindful of OpenSky rate limits and the 10-second data refresh cadence for live tracking.
  • For richer schedule data, enable AviationStack API key; remember the free tier offers 100 requests/month.
  • Use accurate airport codes (ICAO for live tracking, IATA for schedules) to avoid mismatches.

Example Use Cases

  • Live region query: track flights over Switzerland using the region switzerland.
  • Track a specific flight: python3 scripts/track.py --callsign SWR123.
  • Live airport data: python3 scripts/track.py --airport LSZH.
  • Schedules between airports: python3 scripts/schedule.py HAM ZRH.
  • Date-specific or detailed schedules: python3 scripts/schedule.py HAM ZRH --date 2026-01-15 (with AVIATIONSTACK_API_KEY set).

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers