Skip to content

j0nl1/airfetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

airfetch

Fast Google Flights CLI for humans and LLM agents.

airfetch builds Google Flights queries internally, fetches results using pluggable providers, parses flight data, and returns either:

  • human-readable text (default)
  • structured JSON (--output json)

Features

  • Human-first UX by default (text output)
  • LLM/tool-friendly JSON mode (--output json)
  • Multi-leg support (--leg repeated)
  • Quick command for simpler manual usage (quick)
  • Embedded skill install command (install-skill)
  • Result limiting (--limit)
  • Provider adapters:
    • direct
    • brightdata
    • zenrows
  • Health checks for provider readiness (health)

Install

From source

cd airfetch
cargo build --release
./target/release/airfetch --help

Local install into cargo bin

cd airfetch
cargo install --path .
airfetch --help

Commands

search

Advanced mode with explicit legs.

airfetch search \
  --leg 2026-04-10:JFK:LAX \
  --trip one-way \
  --seat economy \
  --adults 1

Round trip example:

airfetch search \
  --leg 2026-04-10:JFK:LAX \
  --leg 2026-04-17:LAX:JFK \
  --trip round-trip \
  --output text

quick

Simple shortcut for manual use.

airfetch quick JFK LAX 2026-04-10

Round-trip shortcut:

airfetch quick JFK LAX 2026-04-10 --return 2026-04-17

health

Provider readiness overview.

airfetch health
airfetch health --output json

install-skill

Installs the embedded .skill payload (no source path required).

airfetch install-skill

Output modes

Human text (default)

airfetch search --leg 2026-04-10:JFK:LAX --limit 3

JSON (for LLM/tooling)

airfetch search --leg 2026-04-10:JFK:LAX --output json --limit 3

JSON envelope format:

{
  "ok": true,
  "data": {},
  "error": null,
  "meta": {
    "provider": "direct",
    "elapsed_ms": 1234,
    "version": "0.1.0"
  }
}

Providers

Direct (default)

airfetch search --leg 2026-04-10:JFK:LAX --provider direct

BrightData

Environment variables:

  • BRIGHT_DATA_API_KEY (required)
  • BRIGHT_DATA_API_URL (optional, default: https://api.brightdata.com/request)
  • BRIGHT_DATA_SERP_ZONE (optional, default: serp_api1)
export BRIGHT_DATA_API_KEY="..."
airfetch search --leg 2026-04-10:JFK:LAX --provider brightdata

ZenRows

Environment variables:

  • ZENROWS_API_KEY (required)
  • ZENROWS_API_URL (optional, default: https://api.zenrows.com/v1/)
export ZENROWS_API_KEY="..."
airfetch search --leg 2026-04-10:JFK:LAX --provider zenrows

Common flags

  • --output text|json (default: text)
  • --limit <N>
  • --proxy <url>
  • --timeout-ms <ms>
  • --language <hl>
  • --currency <ISO4217>
  • --airline <IATA> (repeatable)
  • --max-stops <N>

Exit codes

  • 0: success
  • 2: input validation error
  • 3: provider/network error
  • 4: parser error
  • 5: internal error

Deploy

See DEPLOYMENT.md for production deployment options (single binary, Docker, systemd, CI release).

Legal and operational note

Google Flights can change HTML/data structure at any time. Treat parsing as best effort and monitor failures in production.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages