Flight Tracker
Track flights in real-time and search flight schedules between airports.
Quick Commands
Live Flight Tracking
Flights over a region (bounding box)
CODEBLOCK0
Track specific flight by callsign
CODEBLOCK1
Get live flight info
CODEBLOCK2
Flight Schedules
Search for scheduled flights between airports:
CODEBLOCK3
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
CODEBLOCK4
Optional parameters:
- -
lamin, lomin, lamax, lomax: Bounding box - INLINECODE4 : Specific aircraft (hex code)
- INLINECODE5 : Unix timestamp (0 = now)
Response Format
Each flight state contains:
CODEBLOCK5
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
航班追踪器
实时追踪航班并搜索机场间的航班时刻表。
快捷指令
实时航班追踪
指定区域航班(边界框)
bash
瑞士(纬度下限、纬度上限、经度下限、经度上限)
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]) | 高度: \(.[7])米 | 速度: \(.[9])米/秒 | 出发地: \(.[5])
按呼号追踪特定航班
bash
curl -s https://opensky-network.org/api/states/all?icao24=<飞机-icao码> | jq .
获取实时航班信息
bash
使用辅助脚本
python3 scripts/track.py --region switzerland
python3 scripts/track.py --callsign SWR123
python3 scripts/track.py --airport LSZH
航班时刻表
搜索机场间的计划航班:
bash
基本用法(显示搜索链接)
python3 scripts/schedule.py HAM ZRH
指定日期
python3 scripts/schedule.py --from HAM --to ZRH --date 2026-01-15
使用API密钥(可选,获取详细结果)
export AVIATIONSTACK
APIKEY=your
keyhere
python3 scripts/schedule.py HAM ZRH
无API密钥: 显示实用搜索链接(Google Flights、FlightRadar24、航空公司网站)
有API密钥: 获取包含出发/到达时间、航站楼、登机口和状态的实时时刻表数据
免费API密钥可在 aviationstack.com 获取(每月100次请求)
区域
脚本中预定义的区域:
- - switzerland:瑞士空域
- europe:欧洲空域(大致范围)
- zurich:苏黎世周边区域
- geneva:日内瓦周边区域
API端点
所有状态
bash
GET https://opensky-network.org/api/states/all
可选参数:
- - lamin、lomin、lamax、lomax:边界框
- icao24:特定飞机(十六进制代码)
- time:Unix时间戳(0表示当前)
响应格式
每个航班状态包含:
[0] icao24 - 飞机ICAO24地址(十六进制)
[1] callsign - 航班呼号(例如SWR123)
[2] origin_country - 国家名称
[5] origin - 出发机场(如有)
[7] baro_altitude - 气压高度(米)
[9] velocity - 速度(米/秒)
[10] heading - 航向(度)
[11] vertical_rate - 爬升/下降率(米/秒)
机场代码
ICAO(用于实时追踪)
- - LSZH - 苏黎世
- LSGG - 日内瓦
- LSZB - 伯尔尼
- LSZA - 卢加诺
- LFSB - 巴塞尔-米卢斯(欧洲机场)
IATA(用于时刻表)
- - ZRH - 苏黎世
- GVA - 日内瓦
- BSL - 巴塞尔
- BRN - 伯尔尼
- LUG - 卢加诺
- HAM - 汉堡
- FRA - 法兰克福
- MUC - 慕尼黑
- BER - 柏林
- LHR - 伦敦希思罗
- CDG - 巴黎戴高乐
- AMS - 阿姆斯特丹
备注
实时追踪(OpenSky Network)
- - 免费API,有速率限制(匿名用户:每天400次)
- 来自全球ADS-B接收器的实时数据
- 无需API密钥
- 每10秒更新一次数据
- 注册账户可获得更高限制和历史数据
航班时刻表(AviationStack)
- - 可选API密钥获取详细时刻表数据
- 免费套餐:每月100次请求
- 无API:提供Google Flights、FlightRadar24等搜索链接
- 支持指定日期查询