SuperAPI AI Directory

flyclaw (Flight N-in-1 Search Zero Login)

Coding & development

View repository

Updated 10-15 16:43

About this skill

FlyClaw ✈️ - Flight Information Aggregation Tool

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 Chinese and English city names and IATA code input.

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 have full local control; the program does not collect or store any users' 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

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., and it will 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:

  • The user says "all flights"/"including connections"/"including non-nonstop" → --stops any
  • The user says "nonstop"/"no connections" → --stops 0(default)
  • The user says "at most one connection" → --stops 1
  • The user says "at most two connections" → --stops 2
  • The user says "connection no more than N hours" → --layover-max-hours N

Data Sources

  • Fliggy: domestic and international flight prices (the most comprehensive coverage within China, priced in RMB)
  • Google Flights: domestic and international international flight prices, schedules
  • Skiplagged: domestic and international international flight prices, 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 extension—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

  1. Query by flight number: query the status information of a specified flight (status, schedule, delays, aircraft type, etc.)
  2. Search by route: query the list of flights between two places (including price, stops, duration, etc.)
  3. City-level search: entering a city name automatically searches all airports in that city (e.g. "Shanghai"→PVG+SHA)
  4. Advanced search: round-trip search, multi-passenger configuration, cabin selection, sorting, nonstop filtering
  5. Chinese and English input: supports Chinese city names, English names, IATA codes, full coverage of 7912 airports

Important: Output Format & Multi-Day Queries

The default output is JSON(stdout), directly json.loads() can be parsed, example:

[{"flight_number": "CA981", "price": 472.0, "origin_iata": "PVG", "destination_iata": "GVA", ...}]

When there are no results, returns []. Errors and logs are output only to stderr and do not affect JSON parsing.Prices default to RMB (CNY), each record contains currency field to indicate the currency. You can use --currency usd to uniformly convert to USD, or --currency cny(Default). The exchange rate can be configured in config.yaml (default 7.25). Available -o table to switch to a human-readable table.

Segment fields: Search results include segments(flight number/airport/time for each segment),layover_cities(list of transit cities),layover_minutes(layover minutes for each segment),max_layover_minutes. For direct flights, segments has a length of 1,layover_cities is an empty list. For round-trip searches (Fliggy/GF sources), includes return_segments、return_layover_cities、return_layover_minutes。

Multi-day query: The search command only queries one day at a time. For scenarios such as querying the lowest price over a week, you need to split it into multiple dates forconcurrent execution, obtain the JSON results separately, and then merge and compare them yourself.

Usage / 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

Direct flights + sort by price

python flyclaw.py search --from PVG --to SIN --date 2026-04-15 --stops 0 --sort cheapest

Include flights with stops

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 fare lookup

Smart fare lookup is enabled by default and will automatically supplement 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 location
--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=direct/1/2/any=unlimited
--layover-max-hours — — Exclude flights with the longest layover exceeding N hours
--currency — cny Output currency: cny/usd/original

General parameters

  • -o table: Table format output (default is JSON)
  • -v: Verbose mode, displays data source and cabin class

Input Examples / Input Examples

User says Parsed as Description
"Shanghai" PVG + SHA City level: search all Shanghai airports
"PVG" PVG Accurate to Pudong Airport
"Pudong" PVG Alias exact 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 / Installation

pip install requests pyyaml curl_cffi flights cryptography
# 注意:不要安装 mcp、fast-flights、playwright 等调试模块,会增加安装时间且普通使用不需要

File locations: Main program flyclaw.py, configuration config.yaml, airport cache cache/airports.json。

Dependencies:Python 3.11+、requests(Apache-2.0)、pyyaml(MIT)、curl_cffi(MIT)、flights(MIT)。

Security / 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 / Disclaimer

  • This tool is based on a multi-source aggregation architecture and obtains 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 be unavailable in some regions
  • Price data comes from multiple sources; prices from different sources may vary (tax-inclusive/tax-exclusive, cabin class differences, etc.) and are for reference only

Author

Community-driven, open-source, free for everyone.

License:Apache-2.0