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

Multi-source flight aggregation — tickets, nonstop, round-trip, cabin. 航班机票/零登录/零API, zero login, zero account, zero API key. Pure Python, no browser. 机票价格/航班动态/直飞筛选.

3,891 stars

Best use case

flyclaw (Flight N-in-1 Search Zero Login) is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Multi-source flight aggregation — tickets, nonstop, round-trip, cabin. 航班机票/零登录/零API, zero login, zero account, zero API key. Pure Python, no browser. 机票价格/航班动态/直飞筛选.

Teams using flyclaw (Flight N-in-1 Search Zero Login) should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/flyclaw/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/ai4mse/flyclaw/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/flyclaw/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

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

Feature / Agentflyclaw (Flight N-in-1 Search Zero Login)Standard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Multi-source flight aggregation — tickets, nonstop, round-trip, cabin. 航班机票/零登录/零API, zero login, zero account, zero API key. Pure Python, no browser. 机票价格/航班动态/直飞筛选.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# FlyClaw ✈️ - 航班信息聚合查询工具 / Flight Information Aggregation Tool

## 概述 / Overview

**五源航班聚合查询 — 零登录、零账号、零 API Key,轻量 Python 实现。**
**5-source flight aggregation — zero login, zero account, zero API key. Lightweight Python, no browser automation.**

基于多源聚合架构,通过开源库及免费公开 API 获取航班动态、价格、时刻、实时位置等信息。支持中英文城市名和 IATA 代码输入。

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](https://github.com/AI4MSE/FlyClaw)

## 零 API Key 依赖 / Zero API Key

无需注册任何账号或提供任何 API Key 即可使用全部核心功能。用户本地化掌控所有,程序不收集、不存储任何用户个人信息。同时规避浏览器模拟等复杂、不可靠和低效问题。

No registration or API key required. All data stays local — no personal data collected or stored. No browser automation overhead.

## 触发方式 / Trigger

用户说"查航班 CA981"、"上海飞纽约多少钱"、"PVG 到 JFK 明天的航班"、"往返机票 上海到新加坡"、"商务舱 北京到伦敦"、"所有航班包括转机"、"直飞" 等即可自动执行。默认查询行为是直飞+经济舱。

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**:
- 用户说"所有航班"/"包括转机"/"包括非直飞" → `--stops any`
- 用户说"直飞"/"不要转机" → `--stops 0`(默认)
- 用户说"最多一次中转" → `--stops 1`
- 用户说"最多两次中转" → `--stops 2`
- 用户说"中转不超过 N 小时" → `--layover-max-hours N`

## 数据来源 / Data Sources

- **飞猪 (Fliggy)**:国内外航班价格(中国国内覆盖最全,人民币计价)
- **Google Flights**:国内外国际航班价格、时刻
- **Skiplagged**:国内外国际航班价格、时刻
- **FlightRadar24**:航班动态、实时状态、延误、机型
- **Airplanes.live / ADSB.lol**:ADS-B 实时位置

多源并发查询,智能合并互补。**插件式架构,支持无限扩展**——每个数据源为独立模块。特别感谢以上公开数据源为公益和大众需求提供的便利!

## 功能 / Features

1. **按航班号查询**:查询指定航班的动态信息(状态、时刻、延误、机型等)
2. **按航线搜索**:查询两地之间的航班列表(含价格、经停、时长等)
3. **城市级搜索**:输入城市名自动搜索该城市所有机场(如"上海"→PVG+SHA)
4. **高级搜索**:往返搜索、多旅客配置、舱位选择、排序、直飞过滤
5. **中英文输入**:支持中文城市名、英文名、IATA 代码,7912 机场全覆盖

## 重要:输出格式与多日查询 / Output Format & Multi-Day Queries

**默认输出为 JSON**(stdout),直接 `json.loads()` 即可解析,示例:
```json
[{"flight_number": "CA981", "price": 472.0, "origin_iata": "PVG", "destination_iata": "GVA", ...}]
```
无结果时返回 `[]`。错误和日志仅输出到 stderr,不影响 JSON 解析。**价格默认为人民币(CNY)**,每条记录含 `currency` 字段标注货币。可用 `--currency usd` 统一转换为美元,或 `--currency cny`(默认)。汇率可在 `config.yaml` 中配置(默认 7.25)。可用 `-o table` 切换为人类可读表格。

**经停段字段**:搜索结果含 `segments`(各段航班号/机场/时间)、`layover_cities`(中转城市列表)、`layover_minutes`(各段停留分钟数)、`max_layover_minutes`。直飞时 `segments` 长度为 1,`layover_cities` 为空列表。往返搜索时(飞猪/GF 来源)含 `return_segments`、`return_layover_cities`、`return_layover_minutes`。

**多日查询**:search 命令每次只查一天。查询一周最低价等场景,需拆成多个日期**并发执行**,分别获取 JSON 结果后自行合并比较。

## 调用方式 / Usage

### 按航班号查询

```bash
python flyclaw.py query --flight CA981
```

### 按航线搜索

```bash
python flyclaw.py search --from 上海 --to 纽约 --date 2026-04-01
```

### 往返搜索

```bash
python flyclaw.py search --from PVG --to LAX --date 2026-04-15 --return 2026-04-25
```

### 商务舱 + 2 人

```bash
python flyclaw.py search --from PVG --to JFK --date 2026-04-15 --cabin business -a 2
```

### 直飞 + 按价格排序

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

### 包含经停航班

```bash
python flyclaw.py search --from PVG --to JFK --date 2026-04-15 --stops any
```

### 按日期过滤查询结果

```bash
python flyclaw.py query --flight CA981 --date 2026-04-01
python flyclaw.py query --flight CA981 --date today
```

### 关闭智能查价

默认启用智能查价,会自动在航班号查询时补充价格信息。关闭后可节约查询时间。

```bash
python flyclaw.py query --flight CA981 --no-relay
```

### 搜索参数

| 参数 | 短标志 | 默认值 | 说明 |
|------|--------|-------|------|
| `--from` | — | (必填) | 出发地 |
| `--to` | — | (必填) | 目的地 |
| `--date` / `-d` | — | — | 出行日期 YYYY-MM-DD |
| `--return` / `-r` | — | — | 返程日期(启用往返搜索) |
| `--adults` / `-a` | — | 1 | 成人旅客数 |
| `--children` | — | 0 | 儿童旅客数 |
| `--infants` | — | 0 | 婴儿旅客数 |
| `--cabin` / `-C` | — | economy | economy/premium/business/first |
| `--limit` / `-l` | — | 不限制 | 最大结果数(不指定则返回全部) |
| `--sort` / `-s` | — | — | cheapest/fastest/departure/arrival |
| `--stops` | — | 0 | 经停:0=直飞/1/2/any=不限 |
| `--layover-max-hours` | — | — | 排除最长中转超过 N 小时的航班 |
| `--currency` | — | cny | 输出货币:cny/usd/original |

### 通用参数

- `-o table`:表格格式输出(默认为 JSON)
- `-v`:详细模式,显示数据来源和舱位

## 输入示例 / Input Examples

| 用户说 | 解析为 | 说明 |
|--------|--------|------|
| "上海" | PVG + SHA | 城市级:搜索所有上海机场 |
| "PVG" | PVG | 精确到浦东机场 |
| "浦东" | PVG | 别名精确匹配 |
| "纽约" | JFK + EWR + LGA | 城市级:搜索所有纽约机场 |
| "北京" | PEK + PKX + NAY | 城市级:搜索所有北京机场 |
| "Shanghai" | PVG + SHA | 英文城市名同样支持 |

## 安装配置 / Installation

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

**文件位置**:主程序 `flyclaw.py`,配置 `config.yaml`,机场缓存 `cache/airports.json`。

**依赖**:Python 3.11+、`requests`(Apache-2.0)、`pyyaml`(MIT)、`curl_cffi`(MIT)、`flights`(MIT)。

## 安全性 / Security

- **零 API Key 依赖**:程序运行不需要用户提供任何 API Key 或注册任何账号
- 程序不收集、不存储任何用户个人信息
- 所有网络请求仅用于查询公开航班数据

## 免责声明 / Disclaimer

- 本工具基于多源聚合架构,通过开源库及免费公开 API 获取数据
- 仅供学习研究用途,请遵守当地法律法规
- Google Flights 在部分地区可能不可用
- 价格数据来自多个数据源,不同来源的价格可能存在差异(含税/不含税、舱位差异等),仅供参考

---

## 作者 / Author

公益技能,免费开源。 / Community-driven, open-source, free for everyone.

- **Email**: nuaa02@gmail.com
- **小红书 / Xiaohongshu**: @深度连接
- **GitHub**: [AI4MSE](https://github.com/AI4MSE)

**许可证 / License**:[Apache-2.0](LICENSE)

Related Skills

tavily-search

3891
from openclaw/skills

Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.

Data & Research

baidu-search

3891
from openclaw/skills

Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.

Data & Research

Twitter Command Center (Search + Post)

3891
from openclaw/skills

Searches and reads X (Twitter): profiles, timelines, mentions, followers, tweet search, trends, lists, communities, and Spaces. Publishes posts after the user completes OAuth in the browser. Use when the user asks about Twitter/X data, social listening, or posting without sharing account passwords.

Social Media

openclaw-search

3891
from openclaw/skills

Intelligent search for agents. Multi-source retrieval with confidence scoring - web, academic, and Tavily in one unified API.

Data & Research

search-for-service

3891
from openclaw/skills

Search and browse the x402 bazaar marketplace for paid API services. Use when you or the user want to find available services, see what's available, discover APIs, or need an external service to accomplish a task. Also use as a fallback when no other skill clearly matches — search the bazaar to see if a paid service exists. Covers "what can I do?", "find me an API for...", "what services are available?", "search for...", "browse the bazaar".

API Discovery & Integration

search-cluster

3891
from openclaw/skills

Aggregated search aggregator using Google CSE, GNews RSS, Wikipedia, Reddit, and Scrapling.

Data & Research

alphashop-sel-product-search

3891
from openclaw/skills

商品搜索API SKILL:通过关键词搜索发现Amazon/TikTok平台商品。 支持价格、销量、评分、上架时间等多维度筛选条件。 通过 AlphaShop REST API 调用遨虾AI选品系统的商品搜索服务。

E-commerce & Product Sourcing

1688-product-search

3891
from openclaw/skills

1688商品搜索SKILL:提供完整的1688商品搜索能力,包括类目查询、关键词搜索、图片搜索、商品详情、相关性商品、拉取货盘底池等9个核心接口。 支持多语言搜索和商品推荐,使用1688开放平台官方API,统一鉴权,Token全局缓存共享。

E-commerce Sourcing

exa-web-search-free

3891
from openclaw/skills

Free AI search via Exa MCP. Web search for news/info, code search for docs/examples from GitHub/StackOverflow, company research for business intel. No API key needed.

Data & Research

duckduckgo-search

3891
from openclaw/skills

Performs web searches using DuckDuckGo to retrieve real-time information from the internet. Use when the user needs to search for current events, documentation, tutorials, or any information that requires web search capabilities.

Data & Research

youtube-search

3891
from openclaw/skills

YouTube Search API via AIsa unified endpoint. Search YouTube videos, channels, and playlists with a single AIsa API key — no Google API key or OAuth required. Use this skill when users want to search YouTube content. For other AIsa capabilities (LLM, financial data, Twitter, web search), see the aisa-core skill.

Data & Research

autoresearch-pro

3891
from openclaw/skills

Automatically improve OpenClaw skills, prompts, or articles through iterative mutation-testing loops. Inspired by Karpathy's autoresearch. Use when user says 'optimize [skill]', 'autoresearch [skill]', 'improve my skill', 'optimize this prompt', 'improve my prompt', 'polish this article', 'improve this article', or explicitly requests quality improvement for any text-based content. Supports three modes: skill (SKILL.md files), prompt (any prompt text), and article (any document).

Workflow & Productivity