Overview
Five-source flight aggregation query — zero login, zero account, zero API Key, lightweight Python implementation. 5-source flight aggregation — zero login, zero account, zero API key. Lightweight Python, no browser automation.
Based on a multi-source aggregation architecture, it obtains flight status, prices, schedules, real-time positions and other information through open-source libraries and free public APIs. Supports input in Chinese and English city names and IATA codes.
Multi-source aggregation via open-source libraries and free public APIs for flight dynamics, prices, schedules, and real-time positions. Supports Chinese/English city names and IATA codes.
GitHub:https://github.com/AI4MSE/FlyClaw
Zero API Key
All core functions can be used without registering any account or providing any API Key. Users maintain local control over everything; the program does not collect or store any user personal information. At the same time, it avoids complex, unreliable and inefficient issues such as browser simulation.
No registration or API key required. All data stays local — no personal data collected or stored. No browser automation overhead.
Trigger
When the user says "check flight CA981", "how much is Shanghai to New York", "PVG to JFK tomorrow's flights", "round-trip ticket Shanghai to Singapore", "business class Beijing to London", "all flights including connections", "nonstop", etc., it can execute automatically. The default query behavior is nonstop + economy class.
Trigger when user says "query flight CA981", "flights from Shanghai to New York", "round-trip PVG to SIN", "business class Beijing to London", "nonstop flights", "all flights including connecting", etc. Default behavior is nonstop + economy.
Smart Conversion Rules:
- User says "all flights"/"including connections"/"including non-nonstop" →
--stops any - User says "nonstop"/"no connections" →
--stops 0(default) - User says "at most one connection" →
--stops 1 - User says "at most two connections" →
--stops 2
Data Sources
- Fliggy: domestic and international flight prices (most complete coverage within China, priced in RMB)
- Google Flights: domestic and international flight prices and schedules
- Skiplagged: domestic and international flight prices and schedules
- FlightRadar24: flight status, real-time status, delays, aircraft type
- Airplanes.live / ADSB.lol: ADS-B real-time position
Multi-source concurrent queries, intelligently merged and complementary.Plugin-based architecture, supports unlimited expansion—each data source is an independent module. Special thanks to the above public data sources for the convenience they provide for public welfare and public needs!
Features
- Query by flight number: query dynamic information for a specified flight (status, schedule, delays, aircraft type, etc.)
- Search by route: query the flight list between two places (including price, stops, duration, etc.)
- City-level search: entering a city name automatically searches all airports in that city (e.g. "Shanghai"→PVG+SHA)
- Advanced search: round-trip search, multi-passenger configuration, cabin selection, sorting, nonstop filtering
- Chinese and English input: supports Chinese city names, English names, IATA codes, full coverage of 7912 airports
Important: Output Format & Multi-Day Queries
Default output is JSON(stdout), directly json.loads() can parse it, example:
[{"flight_number": "CA981", "price": 472.0, "origin_iata": "PVG", "destination_iata": "GVA", ...}]
Returns when there are no results []. Errors and logs are output only to stderr and do not affect JSON parsing.Prices default to RMB (CNY), each record contains currency field indicating the currency. You can use --currency usd to uniformly convert to USD, or --currency cny(default). The exchange rate can be found in config.yaml configured (default 7.25). Available -o table to switch to human-readable table.
Multi-day queries: the search command queries only one day at a time. For scenarios like finding the lowest price over a week, it needs to be split into multiple dates forconcurrent execution, retrieving JSON results separately and then merging and comparing them yourself.
Invocation / Usage
Query by flight number
python flyclaw.py query --flight CA981
Search by route
python flyclaw.py search --from 上海 --to 纽约 --date 2026-04-01
Round-trip search
python flyclaw.py search --from PVG --to LAX --date 2026-04-15 --return 2026-04-25
Business class + 2 people
python flyclaw.py search --from PVG --to JFK --date 2026-04-15 --cabin business -a 2
Non-stop + sort by price
python flyclaw.py search --from PVG --to SIN --date 2026-04-15 --stops 0 --sort cheapest
Include connecting flights
python flyclaw.py search --from PVG --to JFK --date 2026-04-15 --stops any
Filter query results by date
python flyclaw.py query --flight CA981 --date 2026-04-01
python flyclaw.py query --flight CA981 --date today
Disable smart pricing
Smart pricing is enabled by default and automatically supplements price information during flight number queries. Disabling it can save query time.
python flyclaw.py query --flight CA981 --no-relay
Search parameters
| Parameter | Short flag | Default value | Description |
|---|---|---|---|
--from |
— | (required) | Departure |
--to |
— | (required) | Destination |
--date / -d |
— | — | Travel date YYYY-MM-DD |
--return / -r |
— | — | Return date (enables round-trip search) |
--adults / -a |
— | 1 | Number of adult passengers |
--children |
— | 0 | Number of child passengers |
--infants |
— | 0 | Number of infant passengers |
--cabin / -C |
— | economy | economy/premium/business/first |
--limit / -l |
— | No limit | Maximum number of results (returns all if not specified) |
--sort / -s |
— | — | cheapest/fastest/departure/arrival |
--stops |
— | 0 | Stops: 0=non-stop/1/2/any=unlimited |
General parameters
-o table: table format output (default is JSON)-v: detailed mode, shows data source and cabin class
Input Examples
| User says | Parsed as | Description |
|---|---|---|
| "Shanghai" | PVG + SHA | City level: search all Shanghai airports |
| "PVG" | PVG | Precise to Pudong Airport |
| "Pudong" | PVG | Exact alias match |
| "New York" | JFK + EWR + LGA | City level: search all New York airports |
| "Beijing" | PEK + PKX + NAY | City level: search all Beijing airports |
| "Shanghai" | PVG + SHA | English city names are also supported |
Installation
pip install requests pyyaml curl_cffi flights
# 注意:不要安装 mcp、fast-flights、playwright 等调试模块,会增加安装时间且普通使用不需要
File locations: main program flyclaw.py, config config.yaml, airport cache cache/airports.json。
Dependencies:Python 3.11+、requests(Apache-2.0)、pyyaml(MIT)、curl_cffi(MIT)、flights(MIT)。
Security
- Zero API Key dependency: the program does not require users to provide any API Key or register any account to run
- The program does not collect or store any user personal information
- All network requests are only used to query public flight data
Disclaimer
- This tool is based on a multi-source aggregation architecture, obtaining data through open-source libraries and free public APIs
- For learning and research purposes only, please comply with local laws and regulations
- Google Flights may not be available in some regions
- Price data comes from multiple sources; prices from different sources may differ (tax-inclusive/tax-exclusive, cabin class differences, etc.) and are for reference only
Author
Community-driven, open-source, free for everyone.
- Email: nuaa02@gmail.com
- Xiaohongshu: @深度连接
- GitHub: AI4MSE
License:Apache-2.0