← 返回
数据分析 中文

Google Flights

Search Google Flights for prices, availability, and deals. Use when user asks about flight prices, searching for flights, comparing airfares, finding the che...
搜索Google航班价格、余票及优惠。适用于查询机票价格、搜索航班、比较票价或寻找特价机票。
kris-hansen
数据分析 clawhub v2.0.0 2 版本 99850.8 Key: 无需
★ 3
Stars
📥 1,948
下载
💾 41
安装
2
版本
#latest

概述

Google Flights

Flight search with flexible dates, smart filters, connection scoring, and price tracking.

Quick Start

cd ~/clawd/skills/google-flights
source .venv/bin/activate

# Basic search
./scripts/search.py LAX JFK tomorrow

# Flexible dates — find cheapest day
./scripts/search.py LAX JFK "apr 15" --flex 3

# Nonstop under $500
./scripts/search.py SFO ORD "next friday" --nonstop --max-price 500

# Watch a route for price drops
./scripts/watch-route.py add LAX JFK --alert-below 350
./scripts/watch-route.py watch

Search

Basic Usage

./scripts/search.py <from> <to> <date> [options]

Date Formats

Natural language supported:

  • tomorrow, today
  • next friday, next week
  • mar 15, March 15, 3/15
  • 2026-04-15 (ISO format)

Filters

FlagShortDescription
--------------------------
--flex N-fSearch ±N days around date
--nonstop-nNonstop flights only
--max-price-mMaximum price
--depart-afterDepart after time (8am, 14:00)
--arrive-beforeArrive before time (6pm, 18:00)
--seat-seconomy, premium-economy, business, first
--adults-aNumber of adults (default: 1)
--children-cNumber of children
--return-rReturn date for round-trip

Output

FlagDescription
-------------------
--top NShow top N results (default: 5)
--sortSort by: price (default), score, duration
--show-scoresShow connection quality breakdown
--jsonJSON output

Examples

# Find cheapest day in a week window
./scripts/search.py LAX JFK "apr 10" --flex 7 --nonstop

# Morning departure, business class
./scripts/search.py SFO LHR "may 1" --seat business --depart-after 8am

# Family trip sorted by connection quality
./scripts/search.py DEN MCO "jun 15" -a 2 -c 2 --sort score --show-scores

# Round-trip under $800
./scripts/search.py SEA LAX "apr 1" --return "apr 8" --max-price 800

Price Tracking

Track specific flights and get alerts on price changes.

# Track a specific flight
./scripts/track.py add LAX JFK "2026-05-15" --alert-below 400

# Track round-trip
./scripts/track.py add LAX JFK "may 1" --return "may 8" -a 350

# Check all tracked flights
./scripts/track.py check

# View price history
./scripts/track.py history LAX-JFK-2026-05-15

# List / remove
./scripts/track.py list
./scripts/track.py remove LAX-JFK-2026-05-15

Route Watching

Monitor regular routes (e.g., commute between two cities).

# Add a route to watch
./scripts/watch-route.py add LAX JFK --alert-below 400

# Check all watched routes
./scripts/watch-route.py watch

# List watched routes
./scripts/watch-route.py list

# Remove a route
./scripts/watch-route.py remove LAX-JFK

Cron Integration

Set up daily price checks:

openclaw cron add \
  --name "Flight Price Watch" \
  --cron "0 9 * * *" \
  --tz "America/New_York" \
  --session isolated \
  --message "cd ~/clawd/skills/google-flights && source .venv/bin/activate && ./scripts/watch-route.py watch. Alert user only if prices drop below threshold."

Connection Quality Scoring

Flights scored 0-100 based on:

FactorImpact
----------------
Nonstop flight+15
Preferred airline+10
Tight connection (<45min)-30
Long layover (>4hr)-5 to -25
Problematic connection airport-10 to -20
Winter weather risk (ORD, EWR, etc.)-15
Red-eye (depart after 10pm)-15
Early departure (<6am)-10
Avoided airline-25

Use --show-scores to see breakdown or --sort score to prioritize quality.

Configuration

Copy config.example.json to config.json and customize:

{
  "preferred_airlines": ["United", "Delta"],
  "avoid_airlines": ["Spirit"],
  "prefer_nonstop": true,
  "max_layover_hours": 4,
  "min_layover_minutes": 45,
  "home_airports": ["LAX", "JFK"],
  "loyalty_programs": {
    "united_mileageplus": "gold"
  }
}

Setup

cd ~/clawd/skills/google-flights
uv venv && source .venv/bin/activate && uv pip install fast-flights
chmod +x scripts/*.py
cp config.example.json config.json  # then edit

Data Files

  • ~/clawd/memory/flight-tracking.json — Tracked flights
  • ~/clawd/memory/flight-prices.jsonl — Price history
  • ~/clawd/memory/route-watch-state.json — Watched routes

版本历史

共 2 个版本

  • v2.0.0 当前
    2026-03-28 21:24 安全 安全
  • v1.0.0
    2026-03-26 21:23

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 65,144
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 165 📥 60,044
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,510