SerpApi Flights (Google Flights)

Query Google Flights via SerpApi for flight schedules, prices, and cabin class info. Use when user asks about flight/机票/航班 prices, schedules, or comparisons.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
1 · 354 · 3 current installs · 3 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description say 'query Google Flights via SerpApi'; the skill requires node and a SERPAPI_KEY and contains a Node script that calls https://serpapi.com/search.json. All requested resources are appropriate for that purpose.
Instruction Scope
SKILL.md only instructs setting SERPAPI_KEY and running the included Node script with origin/destination/date options. The script only reads the API key (and an alternative env var), builds a SerpApi URL, and prints results — it does not read arbitrary user files or call other endpoints.
Install Mechanism
There is no install spec (instruction-only + single script). The only runtime requirement is the 'node' binary, which is declared. No downloads or archive extraction are present.
Credentials
The only required environment variable is SERPAPI_KEY (with a fallback name SERPAPI_API_KEY used in code). That single API key is proportional and expected for a third-party search API client.
Persistence & Privilege
Skill is user-invocable, not always: true, and does not request persistent system-level privileges or modify other skills/config. It does not attempt to persist credentials beyond reading the provided env var.
Assessment
This skill appears coherent and limited to calling SerpApi. Before installing: (1) Treat SERPAPI_KEY as a secret — the script sends it in the query string to serpapi.com; do not share keys in public prompts. (2) Confirm you trust SerpApi and understand its billing/rate limits (free tier ~100 searches/month). (3) Ensure your node version supports global fetch and node:util parseArgs (Node 18+ recommended). (4) Review the included script yourself if you want to confirm no additional logging of sensitive context; the code prints query info and results to the console. (5) If you need tighter security, run the script in a restricted environment and rotate the API key if it is exposed.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk974rcvpn1e2zrn9t9eyskax6x81q0jd

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

✈️ Clawdis
Binsnode
EnvSERPAPI_KEY

SKILL.md

SerpApi Flights (Google Flights)

Query real-time flight data from Google Flights via SerpApi. Returns airline, flight number, times, prices, aircraft type, and cabin class info.

Setup

export SERPAPI_KEY=your_api_key

Free tier: 100 searches/month at serpapi.com

Query Flights

node {baseDir}/scripts/query.mjs <FROM> <TO> [-d YYYY-MM-DD] [options]

FROM/TO can be IATA codes (HKG, PVG) or Chinese city names (香港, 上海).

Examples

# Basic query
node {baseDir}/scripts/query.mjs HKG PVG -d 2026-02-25

# Business class
node {baseDir}/scripts/query.mjs HKG PVG -d 2026-02-25 -c 3

# All cabin classes (economy + business)
node {baseDir}/scripts/query.mjs HKG PVG -d 2026-02-25 --all

# Direct flights only
node {baseDir}/scripts/query.mjs 香港 上海 -d 2026-02-25 --direct

# Round trip
node {baseDir}/scripts/query.mjs HKG PVG -d 2026-02-25 -r 2026-03-01

# JSON output
node {baseDir}/scripts/query.mjs HKG PVG -d 2026-02-25 --json

Options

  • -d, --date <YYYY-MM-DD>: Departure date (default: today)
  • -r, --return <YYYY-MM-DD>: Return date (makes it round-trip)
  • -c, --class <1-4>: 1=economy, 2=premium economy, 3=business, 4=first
  • --all: Query economy + business together
  • -a, --adults <n>: Passengers (default: 1)
  • --direct: Non-stop flights only
  • --currency <code>: Currency (default: CNY)
  • --json: Raw JSON output

Output Columns

ColumnMeaning
航空公司Airline name
航班号Flight number
出发→到达Departure → arrival time (+1 = next day)
飞行时间Total duration
经停Non-stop or number of stops
价格Price in specified currency
机型Aircraft type
延误⚠️ = often delayed >30min

Supported Cities (Chinese)

北京 上海 广州 深圳 成都 重庆 杭州 南京 武汉 西安 长沙 昆明 厦门 青岛 大连 天津 郑州 沈阳 哈尔滨 海口 三亚 贵阳 南宁 福州 济南 合肥 太原 乌鲁木齐 兰州 珠海 温州 宁波 无锡 揭阳/潮汕/汕头 香港 澳门 台北

Notes

  • Prices from Google Flights, may differ from airline direct prices
  • No seat availability/remaining tickets (Google Flights limitation)
  • Some flights show "待查" price when Google doesn't have pricing
  • ⚠️ delay indicator based on historical data

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…