
Google Flights
- 2.3k installs
- 21 repo stars
- Updated April 13, 2026
- skillhq/flight-search
google-flights is an agent skill that Search Google Flights for flight prices and schedules using browser automation. Use when user asks to search flights, find airfare, compare prices, check flight availabil.
About
The google-flights skill. Search Google Flights for flight prices and schedules using browser automation. Use when user asks to search flights, find airfare, compare prices, check flight availability, or look up routes. Triggers include "search flights", "find flights", "how much is a flight", "flights from X to Y", "cheapest flight", "flight prices", "airfare", "flight schedule", "nonstop flights", "when should I fly". - **Hotels/rental cars**: Use other tools for non-flight travel searches. - **Historical price data**: Google Flights shows current prices, not historical. A flight is **domestic** if both origin and destination are US airports. Common US IATA codes: ATL, BOS, BWI, CLT, DEN, DFW, DTW, EWR, FLL, HNL, IAD, IAH, JFK, LAS, LAX, LGA, MCO, MDW, MIA, MSP, OAK, ORD, PHL, PHX, PDX, SAN, SEA, SFO, SJC, SLC, TPA. Loads results directly - **3 commands total**. Not all economy flights have a business equivalent (budget carriers like ZIPAIR, Air Japan don't offer business).
- User asks to search/find/compare flights or airfare
- User wants to know flight prices between cities
- User asks about flight schedules or availability
- User wants to find the cheapest flight for specific dates
- Completing purchases: This skill finds flights and extracts booking links, but do not attempt to complete a purchase on
Google Flights by the numbers
- 2,288 all-time installs (skills.sh)
- +70 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #177 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
google-flights capabilities & compatibility
- Capabilities
- user asks to search/find/compare flights or airf · user wants to know flight prices between cities · user asks about flight schedules or availability · user wants to find the cheapest flight for speci · completing purchases: this skill finds flights a
- Use cases
- documentation · planning · orchestration
What google-flights says it does
- **Hotels/rental cars**: Use other tools for non-flight travel searches.
- **Historical price data**: Google Flights shows current prices, not historical.
npx skills add https://github.com/skillhq/flight-search --skill google-flightsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2.3k |
|---|---|
| repo stars | ★ 21 |
| Security audit | 1 / 3 scanners passed |
| Last updated | April 13, 2026 |
| Repository | skillhq/flight-search ↗ |
How do I apply google-flights correctly using the SKILL.md workflows and reference files?
Search Google Flights for flight prices and schedules using browser automation. Use when user asks to search flights, find airfare, compare prices, check flight availability, or look up routes. Trigge
Who is it for?
Developers and software engineers working with google-flights patterns from the skill documentation.
Skip if: Skip when cached docs are empty, boilerplate-only, or outside the skill documented scope.
When should I use this skill?
Search Google Flights for flight prices and schedules using browser automation. Use when user asks to search flights, find airfare, compare prices, check flight availability, or look up routes. Triggers include "search f
What you get
Grounded google-flights guidance with highlights, triggers, and evidence quotes from SKILL.md.
- flight price results
- schedule listing
- route availability summary
Files
Google Flights Search
Search Google Flights via agent-browser to find flight prices, schedules, and availability.
When to Use
- User asks to search/find/compare flights or airfare
- User wants to know flight prices between cities
- User asks about flight schedules or availability
- User wants to find the cheapest flight for specific dates
When NOT to Use
- Completing purchases: This skill finds flights and extracts booking links, but do not attempt to complete a purchase on a booking site.
- Hotels/rental cars: Use other tools for non-flight travel searches.
- Historical price data: Google Flights shows current prices, not historical.
Session Convention
- Economy only (default for domestic):
--session flights - Economy + Business comparison (international or user requests):
--session econand--session biz - Interactive fallback:
--session flights
Domestic vs International Detection
Domestic flights default to economy only. Business class on US domestic routes is typically 3-5x the price and rarely worth showing unless asked.
A flight is domestic if both origin and destination are US airports. Common US IATA codes: ATL, BOS, BWI, CLT, DEN, DFW, DTW, EWR, FLL, HNL, IAD, IAH, JFK, LAS, LAX, LGA, MCO, MDW, MIA, MSP, OAK, ORD, PHL, PHX, PDX, SAN, SEA, SFO, SJC, SLC, TPA.
When to show business class:
- International flights (always show economy + business comparison)
- User explicitly asks for "business class" or "business"
- User asks to "compare cabins" or "show all classes"
When to skip business class:
- Domestic US flights (economy only by default)
- User explicitly asks for "economy" or "cheapest"
Fast Path: URL-Based Search (Preferred)
Construct a URL with a natural language ?q= parameter. Loads results directly — 3 commands total.
URL Template
https://www.google.com/travel/flights?q=Flights+from+{ORIGIN}+to+{DEST}+on+{DATE}[+returning+{DATE}][+one+way][+business+class][+N+passengers]Default: Economy Only (Domestic)
For domestic flights, run a single session - 2 tool calls total:
# Open and wait in one call
agent-browser --session flights open "https://www.google.com/travel/flights?q=Flights+from+MIA+to+SFO+on+2026-04-28+returning+2026-04-30" && agent-browser --session flights wait --load networkidle
# Snapshot results
agent-browser --session flights snapshot -i
# Keep session alive for booking linksThen present results in compact list format (see Output Format section below).
Economy + Business Comparison (International)
For international flights, run two parallel sessions to show the price delta:
# Open both and wait in parallel
(agent-browser --session econ open "https://www.google.com/travel/flights?q=Flights+from+BKK+to+NRT+on+2026-03-20+returning+2026-03-27" && agent-browser --session econ wait --load networkidle) &
(agent-browser --session biz open "https://www.google.com/travel/flights?q=Flights+from+BKK+to+NRT+on+2026-03-20+returning+2026-03-27+business+class" && agent-browser --session biz wait --load networkidle) &
wait
# Snapshot both in parallel
agent-browser --session econ snapshot -i &
agent-browser --session biz snapshot -i &
wait
# Close biz (only needed for delta); keep econ alive for booking links
agent-browser --session biz closeMatching logic: Match flights by airline name and departure time. Not all economy flights have a business equivalent (budget carriers like ZIPAIR, Air Japan don't offer business). Show "-" when no business match exists.
Tip: When an airline appears in business results but not economy (e.g., Philippine Airlines), it may operate business-only pricing on that route. Include it with "-" for economy.
One Way
Add +one+way to the URL. For international, run both economy and business in parallel:
# Domestic (economy only)
agent-browser --session flights open "https://www.google.com/travel/flights?q=Flights+from+LAX+to+JFK+on+2026-04-15+one+way" && agent-browser --session flights wait --load networkidle
# International (economy + business comparison)
(agent-browser --session econ open "https://www.google.com/travel/flights?q=Flights+from+LAX+to+LHR+on+2026-04-15+one+way" && agent-browser --session econ wait --load networkidle) &
(agent-browser --session biz open "https://www.google.com/travel/flights?q=Flights+from+LAX+to+LHR+on+2026-04-15+one+way+business+class" && agent-browser --session biz wait --load networkidle) &
waitWhen User Asks for Business Only
If the user specifically asks for business class (not a comparison), run just the business session:
agent-browser --session flights open "https://www.google.com/travel/flights?q=Flights+from+JFK+to+CDG+on+2026-06-01+returning+2026-06-15+business+class"
agent-browser --session flights wait --load networkidle
agent-browser --session flights snapshot -i
# Keep session alive for booking linksFirst Class / Multiple Passengers
agent-browser --session flights open "https://www.google.com/travel/flights?q=Flights+from+JFK+to+CDG+on+2026-06-01+returning+2026-06-15+first+class+2+adults+1+child"
agent-browser --session flights wait --load networkidle
agent-browser --session flights snapshot -i
# Keep session alive for booking linksWhat Works via URL
| Feature | URL syntax | Status |
|---|---|---|
| Round trip | +returning+YYYY-MM-DD | Works |
| One way | +one+way | Works |
| Business class | +business+class | Works |
| First class | +first+class | Works |
| N passengers (adults) | +N+passengers | Works |
| Adults + children | +2+adults+1+child | Works |
| IATA codes | BKK, NRT, LAX | Works |
| City names | Bangkok, Tokyo | Works |
| Dates as YYYY-MM-DD | 2026-03-20 | Works (best) |
| Natural dates | March+20 | Works |
| Premium economy | +premium+economy | Fails |
| Multi-city | N/A | Fails |
What Requires Interactive Fallback
- Premium economy cabin class
- Multi-city trips (3+ legs)
- Infant passengers (seat vs lap distinction)
- URL didn't load results (consent banner, CAPTCHA, locale issue)
Reading Results from Snapshot
Each flight appears as a link element with a full description:
link "From 20508 Thai baht round trip total. Nonstop flight with Air Japan.
Leaves Suvarnabhumi Airport at 12:10 AM on Friday, March 20 and arrives
at Narita International Airport at 8:15 AM on Friday, March 20.
Total duration 6 hr 5 min. Select flight"Parse economy + business snapshots into the compact list format:
1. JAL — Nonstop · 5h 55m
8:05 AM → 4:00 PM
Economy: THB 23,255 · Business: THB 65,915 (+183%)
2. THAI — Nonstop · 5h 50m
10:30 PM → 6:20 AM+1
Economy: THB 28,165 · Business: THB 75,000 (+166%)
3. Air Japan — Nonstop · 6h 05m
12:10 AM → 8:15 AM
Economy: THB 20,515 · Business: —
4. ZIPAIR — Nonstop · 5h 45m
11:45 PM → 7:30 AM+1
Economy: THB 21,425 · Business: —Matching: Pair economy and business results by airline + departure time. Budget carriers without business class show "—". Include "Best"/"Cheapest" labels from Google when present.
Booking Options Handoff
After presenting the results table, always offer booking links: "Want booking links for any of these? Just say which one."
When the user picks a flight, extract booking options by clicking the flight's link element in the snapshot. Google Flights shows a panel with booking providers (airlines, OTAs) each with a price and a "Continue" link to the booking site.
Workflow
# User picks flight #N — click the corresponding link from the results snapshot
# Use --session flights (domestic) or --session econ (international comparison)
agent-browser --session flights click @eN
agent-browser --session flights wait 3000
agent-browser --session flights snapshot -iThe booking panel snapshot will show link elements like:
link "Book with Emirates THB 28,960" → href="https://..."
link "Book with Booking.com THB 29,512" → href="https://..."
link "Book with Teaflight THB 28,171" → href="https://..."Extract the provider name, price, and href URL from each link.
Output Format
📋 Booking Options for JAL BKK→NRT (5h 55m, Nonstop)
| Provider | Price | Book |
|----------|-------|------|
| Emirates | THB 28,960 | [Continue](https://...) |
| Booking.com | THB 29,512 | [Continue](https://...) |
| Teaflight | THB 28,171 | [Continue](https://...) |Notes
- Session lifecycle: Keep the results session (
flightsorecon) alive for booking links. For international comparisons, close--session bizimmediately after extracting prices. Close the results session after the user gets booking links or declines. - If booking panel fails to load: Re-snapshot and wait longer before retrying.
Interactive Workflow (Fallback)
Use for multi-city, premium economy, or when the URL path fails.
Open and Snapshot
agent-browser --session flights open "https://www.google.com/travel/flights"
agent-browser --session flights wait 3000
agent-browser --session flights snapshot -iIf a consent banner appears, click "Accept all" or "Reject all" first.
Set Trip Type (if not Round Trip)
agent-browser --session flights click @eN # Trip type combobox ("Round trip")
agent-browser --session flights snapshot -i
agent-browser --session flights click @eN # "One way" or "Multi-city"
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -iSet Cabin Class / Passengers (if non-default)
Cabin class:
agent-browser --session flights click @eN # Cabin class combobox
agent-browser --session flights snapshot -i
agent-browser --session flights click @eN # Select class
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -iPassengers:
agent-browser --session flights click @eN # Passengers button
agent-browser --session flights snapshot -i
agent-browser --session flights click @eN # "+" for Adults/Children/Infants
agent-browser --session flights snapshot -i
agent-browser --session flights click @eN # "Done"
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -iEnter Airport (Origin or Destination)
agent-browser --session flights click @eN # Combobox field
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
agent-browser --session flights fill @eN "BKK"
agent-browser --session flights wait 2000 # CRITICAL: wait for autocomplete
agent-browser --session flights snapshot -i
agent-browser --session flights click @eN # Click suggestion (NEVER press Enter)
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -iSet Dates
agent-browser --session flights click @eN # Date textbox
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
# Calendar shows dates as buttons: "Friday, March 20, 2026"
agent-browser --session flights click @eN # Click target date
agent-browser --session flights wait 500
agent-browser --session flights snapshot -i
# Click "Done" to close calendar
agent-browser --session flights click @eN # "Done" button
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -iSearch
"Done" only closes the calendar. You MUST click "Search" separately.
agent-browser --session flights click @eN # "Search" button
agent-browser --session flights wait --load networkidle
agent-browser --session flights snapshot -i
# Keep session alive for booking linksMulti-City Specifics
After selecting "Multi-city" trip type, the form shows one row per leg:
- Each leg has: origin combobox, destination combobox, departure date textbox
- Origins auto-fill from the previous leg's destination
- Click "Add flight" to add more legs (default: 2 legs shown)
- Click "Remove flight from X to Y" buttons to remove legs
- Results show flights for the first leg, with prices reflecting the total multi-city cost
Fill each leg's destination + date in order, then click "Search".
Output Format
Always use compact list format — never markdown tables. Output is typically displayed in chatbot interfaces (Telegram, etc.) where tables render poorly.
Economy + Business comparison (default)
1. JAL — Nonstop · 5h 55m
8:05 AM → 4:00 PM
Economy: THB 23,255 · Business: THB 65,915 (+183%)
2. THAI — Nonstop · 5h 50m
10:30 PM → 6:20 AM+1
Economy: THB 28,165 · Business: THB 75,000 (+166%)
3. Air Japan — Nonstop · 6h 05m
12:10 AM → 8:15 AM
Economy: THB 20,515 · Business: —Economy only
1. JAL — Nonstop · 5h 55m
8:05 AM → 4:00 PM · THB 23,255
2. THAI — Nonstop · 5h 50m
10:30 PM → 6:20 AM+1 · THB 28,165Format rules
- One flight per numbered block, blank line between flights
- Line 1: Airline — Stops · Duration
- Line 2: Departure → Arrival times
- Line 3: Prices (economy, business delta if applicable)
- No code blocks around the flight list — plain text reads best
- Keep the "Best value" recommendation as a plain text paragraph after the list
Key Rules
| Rule | Why |
|---|---|
| Prefer URL fast path | 2 tool calls (domestic) or 3 (international) vs 15+ interactive |
Chain open+wait with && | Eliminates a round-trip between tool calls |
| Skip business for domestic | US domestic business is 3-5x price, rarely useful unless asked |
Parallel snapshots with & + wait | Both snapshots run concurrently for international |
wait --load networkidle | Smarter than fixed wait 5000 - returns when network settles |
Use fill not type for airports | Clears existing text first |
| Wait 2s after typing airport codes | Autocomplete needs API roundtrip |
| Always CLICK suggestions, never Enter | Enter is unreliable for autocomplete |
| Re-snapshot after every interaction | DOM changes invalidate refs |
| "Done" ≠ Search | Calendar Done only closes picker |
| After presenting results, offer booking links | Users almost always want to book - prompt them |
Keep results session alive; close biz after results | Results session needed for booking clicks; biz only for delta |
Troubleshooting
Consent popups: Click "Accept all" or "Reject all" in the snapshot.
URL fast path didn't work: Fall back to interactive. Some regions/locales handle ?q= differently.
No results: Verify airports (check combobox labels), dates in the future, or wait longer.
Bot detection / CAPTCHA: Inform user. Do NOT solve CAPTCHAs. Retry after a short wait.
Deep-Dive Reference
See references/interaction-patterns.md for:
- Full annotated walkthrough (every command + expected output)
- Airport autocomplete failure modes and recovery
- Date picker calendar navigation
- Multi-city searches
- Scrolling for more results
name: Publish to ClawHub
on:
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install ClawHub CLI
run: npm install -g clawhub
- name: Authenticate
run: clawhub login --token "$CLAWHUB_TOKEN" --no-browser
env:
CLAWHUB_TOKEN: ${{ secrets.CLAWHUB_TOKEN }}
- name: Get current version and bump patch
id: version
run: |
CURRENT=$(clawhub inspect flight-search-fast 2>/dev/null | grep "^Latest:" | awk '{print $2}' || echo "1.0.0")
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
NEXT="${MAJOR}.${MINOR}.$((PATCH + 1))"
echo "next=$NEXT" >> "$GITHUB_OUTPUT"
- name: Publish
run: |
CHANGELOG=$(git log -1 --pretty=%B)
clawhub publish . \
--slug flight-search-fast \
--name "Google Flights" \
--version "${{ steps.version.outputs.next }}" \
--changelog "${CHANGELOG}" \
--tags latest
MIT License
Copyright (c) 2026 skillhq
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
✈️ flight-search
 
Google Flights search skill for any coding agent — Claude Code, Codex, and more. Find flight prices, compare cabins, and get booking links from your terminal.
Install
npx skills add https://github.com/skillhq/flight-search --skill google-flightsTriggers
- "Find flights from BKK to NRT, March 20-27"
- "How much is a flight from LAX to London?"
- "Cheapest flights from JFK to CDG in June"
- "One-way business class from SFO to Tokyo, April 15"
Example Output
✈️ Flights: BKK → NRT (Mar 20–27, Round Trip)
| # | Airline | Dep | Arr | Duration | Stops | Economy | Business | Biz Delta |
|---|----------|----------|----------|----------|---------|------------|------------|----------------------|
| 1 | JAL | 8:05 AM | 4:00 PM | 5h 55m | Nonstop | THB 23,255 | THB 65,915 | +THB 42,660 (+183%) |
| 2 | THAI | 10:30 PM | 6:20 AM | 5h 50m | Nonstop | THB 28,165 | THB 75,000 | +THB 46,835 (+166%) |
| 3 | Air Japan| 12:10 AM | 8:15 AM | 6h 05m | Nonstop | THB 20,515 | — | — |
| 4 | ZIPAIR | 11:45 PM | 7:30 AM | 5h 45m | Nonstop | THB 21,425 | — | — |
Want booking links for any of these? Just say which one.Economy and business results are fetched in parallel and merged with a delta column so you can see the upgrade cost at a glance.
Booking Options
After picking a flight, the skill extracts booking providers with prices and direct links:
📋 Booking Options for JAL BKK→NRT (5h 55m, Nonstop)
| Provider | Price | Book |
|-------------|------------|-------------------------------|
| Emirates | THB 28,960 | [Continue](https://...) |
| Booking.com | THB 29,512 | [Continue](https://...) |
| Teaflight | THB 28,171 | [Continue](https://...) |Capabilities
| Feature | Method | Support |
|---|---|---|
| Round trip | URL fast path | Direct results in 3 commands |
| One way | URL fast path | Direct results in 3 commands |
| Business / First class | URL fast path | Direct results in 3 commands |
| Multiple passengers | URL fast path | Direct results in 3 commands |
| Adults + children | URL fast path | Direct results in 3 commands |
| Booking links extraction | Click → snapshot | Provider prices + direct URLs |
| Premium economy | Interactive fallback | Form automation |
| Multi-city (3+ legs) | Interactive fallback | Form automation |
Requirements
- agent-browser CLI installed and available in PATH
Files
SKILL.md # Main skill (triggers, workflow, rules)
references/
interaction-patterns.md # Deep-dive cookbook for tricky interactionsLicense
MIT
Google Flights Interaction Patterns
Deep-dive cookbook for automating Google Flights with agent-browser. Covers the tricky interactions that require careful handling.
Related: ../SKILL.md for the main workflow.
Contents
- Full Annotated Walkthrough
- Airport Autocomplete Deep Dive
- Date Picker Calendar Navigation
- Multi-City Searches
- Scrolling for More Results
- Price Graph and Explore Mode
---
Full Annotated Walkthrough
A complete command-by-command walkthrough for: Round trip, BKK to NRT, March 20-27, 1 adult, Economy.
# ── Step 1: Open Google Flights ──
agent-browser --session flights open "https://www.google.com/travel/flights"
agent-browser --session flights wait 3000
# Wait for full page load. Google Flights is a heavy SPA.
agent-browser --session flights snapshot -i
# Expected output: interactive elements including:
# @e1 [combobox] "Where from?" ← origin field
# @e2 [combobox] "Where to?" ← destination field
# @e3 [button] "Departure" ← departure date
# @e4 [button] "Return" ← return date
# @e5 [button] "1 passenger" ← passengers
# @e6 [button] "Round trip" ← trip type
# @e7 [button] "Economy" ← cabin class
# @e8 [button] "Search" ← search button
# NOTE: Actual ref numbers WILL vary. Always read the snapshot.
# ── Step 2: Check for consent banner ──
# If you see a consent/cookie dialog, handle it first:
# agent-browser --session flights click @eN (Accept all / Reject all)
# agent-browser --session flights wait 2000
# agent-browser --session flights snapshot -i
# ── Step 3: Enter Origin ──
agent-browser --session flights click @e1
# Clicking the origin combobox focuses it and may show recent searches.
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
# After clicking, the field expands. Look for an input element.
# The focused input may have a different ref now.
agent-browser --session flights fill @eN "BKK"
# Use fill (clears first) with the IATA code.
agent-browser --session flights wait 2000
# CRITICAL: Must wait for autocomplete dropdown to populate.
# Google Flights queries its backend for matching airports.
agent-browser --session flights snapshot -i
# Expected: dropdown with suggestions like:
# @e15 [listitem] "Bangkok (BKK) Suvarnabhumi Airport"
# @e16 [listitem] "Bangkok (DMK) Don Mueang Airport"
agent-browser --session flights click @e15
# Click the correct suggestion. For BKK, pick Suvarnabhumi.
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
# The origin field now shows "BKK" as a chip/tag.
# ── Step 4: Enter Destination ──
agent-browser --session flights click @eN
# Click the destination combobox (ref changed from step 3).
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
agent-browser --session flights fill @eN "NRT"
agent-browser --session flights wait 2000
agent-browser --session flights snapshot -i
# Expected: dropdown with:
# @eN [listitem] "Tokyo (NRT) Narita International Airport"
# @eN [listitem] "Tokyo (HND) Haneda Airport"
agent-browser --session flights click @eN
# Click the NRT suggestion.
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
# ── Step 5: Set Departure Date ──
agent-browser --session flights click @eN
# Click the departure date button/field.
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
# A calendar overlay appears showing 2 months.
# Look for month headers and individual day numbers.
# Expected: "February 2026" and "March 2026" side by side.
# If March isn't visible yet, navigate forward:
agent-browser --session flights click @eN # ">" / next month arrow
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
# Click day 20 in the March section
agent-browser --session flights click @eN # The "20" element under March
agent-browser --session flights wait 500
agent-browser --session flights snapshot -i
# Departure date is now set. Calendar stays open for return date.
# ── Step 6: Set Return Date ──
# Calendar should still be open. March 27 should be visible.
agent-browser --session flights click @eN # The "27" element under March
agent-browser --session flights wait 500
agent-browser --session flights snapshot -i
# Click "Done" to close the calendar
agent-browser --session flights click @eN # "Done" button
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
# ── Step 7: Search ──
# IMPORTANT: The "Done" button only closes the calendar. You MUST click "Search" separately.
agent-browser --session flights click @eN # "Search" button
agent-browser --session flights wait 5000
# Results load asynchronously. 5 seconds is usually enough.
# ── Step 8: Extract Results ──
agent-browser --session flights get text body
# This returns all visible text on the page, including:
# - "Best departing flights" / "Cheapest" / "Best" labels
# - Airline names, times, durations, stops, prices
# - Carbon emission estimates
# ── Step 9: Close ──
agent-browser --session flights close---
Airport Autocomplete Deep Dive
The airport autocomplete is the #1 source of failures. Here's every failure mode and recovery strategy.
How It Works
Google Flights airport fields are combobox elements. When focused: 1. A text input appears (sometimes replacing the combobox) 2. Typing triggers a debounced API call (~500ms) 3. A dropdown listbox renders with matching airports 4. Each suggestion is a listitem or option with airport name + code
Failure Mode 1: Dropdown Doesn't Appear
Symptom: After typing and waiting 2s, snapshot shows no dropdown.
Recovery:
# Try pressing Escape and starting over
agent-browser --session flights press Escape
agent-browser --session flights wait 500
agent-browser --session flights click @eN # Re-click the field
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
# Clear and retype
agent-browser --session flights fill @eN "BKK"
agent-browser --session flights wait 3000 # Wait longer this time
agent-browser --session flights snapshot -iIf still no dropdown:
# Try the full city name instead of IATA code
agent-browser --session flights fill @eN "Bangkok"
agent-browser --session flights wait 3000
agent-browser --session flights snapshot -iFailure Mode 2: Wrong Airport Selected
Symptom: The chip shows the wrong airport (e.g., DMK instead of BKK).
Recovery:
# Look for an "X" or close button next to the airport chip
agent-browser --session flights snapshot -i
agent-browser --session flights click @eN # The "X" on the chip
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
# Now re-enter the airport codeFailure Mode 3: Input Field Doesn't Accept Text
Symptom: fill command seems to work but snapshot shows field is empty.
Recovery:
# The combobox may need a click to expand into an input
agent-browser --session flights click @eN
agent-browser --session flights wait 500
# Try using type instead of fill
agent-browser --session flights type @eN "BKK"
agent-browser --session flights wait 2000
agent-browser --session flights snapshot -iFailure Mode 4: Multiple Airport Chips
Symptom: Clicking a suggestion adds it alongside an existing airport.
Google Flights supports multiple origin/destination airports. If you see multiple chips:
# Remove the unwanted one by clicking its "X"
agent-browser --session flights click @eN
agent-browser --session flights wait 500
agent-browser --session flights snapshot -iBest Practices Summary
| Practice | Why |
|---|---|
Use fill not type | Clears existing text first |
| Wait 2-3 seconds after typing | Autocomplete needs API roundtrip |
| Always click the suggestion | Enter doesn't reliably select |
| Use IATA codes (3-letter) | Most precise matching |
| Re-snapshot after every interaction | DOM changes invalidate refs |
---
Date Picker Calendar Navigation
Calendar Structure
The Google Flights calendar renders as a long scrollable list of date buttons (not a traditional grid). Each button includes:
- Full date label:
"Friday, March 20, 2026 , 10645 Thai baht" - Near-term dates include estimated round-trip prices
- Far-future dates show just the date (no price)
Key elements:
textbox "Departure"andtextbox "Return"at the topbutton "Reset"to clear selectionsbutton "Done."to confirm and close calendarbutton "Next"to load more distant months- All individual dates as
buttonelements
Navigating to a Far-Future Month
The calendar loads months progressively. If your target date isn't visible:
# Click "Next" to load more months
agent-browser --session flights click @eN # "Next" button
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
# Repeat until target month is visibleTip: Since dates render as buttons with full labels (e.g., "Friday, March 20, 2026"), you can search the snapshot output for your target date string to find the right ref quickly.
Selecting Dates That Span Months
For a trip departing March 28 and returning April 5:
# 1. Navigate so March is visible
# 2. Click departure day (28) in March panel
agent-browser --session flights click @eN # "28" in March
agent-browser --session flights wait 500
agent-browser --session flights snapshot -i
# 3. Calendar may auto-advance. Check if April is now visible.
# If not, click ">" to show April.
agent-browser --session flights click @eN # ">" if needed
agent-browser --session flights wait 500
agent-browser --session flights snapshot -i
# 4. Click return day (5) in April panel
agent-browser --session flights click @eN # "5" in April
agent-browser --session flights wait 500
agent-browser --session flights snapshot -i
# 5. Click "Done"
agent-browser --session flights click @eNCommon Calendar Issues
Issue: Day numbers are ambiguous — The snapshot may show "20" twice (once for each visible month). Solution: Look at surrounding context in the snapshot. Day elements are grouped under their month header. Pick the one under the correct month.
Issue: Calendar doesn't close after selecting dates — Click the "Done" button explicitly.
Issue: Date range highlights the wrong range — The first click sets departure, second sets return. If reversed, click both dates again in the correct order.
---
Multi-City Searches
Setting Up Multi-City
# 1. Change trip type to "Multi-city"
agent-browser --session flights click @eN # Trip type dropdown
agent-browser --session flights snapshot -i
agent-browser --session flights click @eN # "Multi-city" option
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
# The form now shows multiple flight legs (rows), each with:
# - Origin field
# - Destination field
# - Date fieldAdding Flight Legs
# Fill in Leg 1: BKK → NRT on March 20
# (follow standard airport autocomplete + date picker flow)
# Fill in Leg 2: NRT → ICN on March 25
# (the destination of leg 1 may auto-populate as origin of leg 2)
# Add another leg if needed:
agent-browser --session flights click @eN # "Add flight" button
agent-browser --session flights wait 1000
agent-browser --session flights snapshot -i
# Fill in Leg 3: ICN → BKK on March 30Tips for Multi-City
- Each leg has its own origin/destination/date fields — treat them independently
- The "Add flight" button adds a new row
- The "X" next to a leg removes it
- Always re-snapshot after modifying any leg, as refs shift
---
Scrolling for More Results
Google Flights initially shows ~10 results. To see more:
# Check if there's a "Show more flights" button or link
agent-browser --session flights snapshot -i
# Look for "Show more", "View more", or similar
# If found, click it
agent-browser --session flights click @eN # "Show more flights"
agent-browser --session flights wait 3000
agent-browser --session flights snapshot -i
# If no button, try scrolling down
agent-browser --session flights scroll down 1000
agent-browser --session flights wait 2000
agent-browser --session flights snapshot -iTo extract all visible results after expanding:
agent-browser --session flights get text body---
Price Graph and Explore Mode
Note: These are advanced features. The core search workflow above covers most use cases.
Price Graph / Date Grid
Google Flights offers a "Price graph" or date grid view to see prices across multiple dates:
# After searching, look for "Price graph" or "Date grid" tab/toggle
agent-browser --session flights snapshot -i
agent-browser --session flights click @eN # "Price graph" or "Date grid"
agent-browser --session flights wait 3000
agent-browser --session flights snapshot -i
# Extract the pricing data
agent-browser --session flights get text bodyExplore Mode
Google Flights "Explore" lets you search by map/region without a specific destination:
agent-browser --session flights open "https://www.google.com/travel/explore"
agent-browser --session flights wait 3000
agent-browser --session flights snapshot -i
# Shows a map with prices to various destinations from your locationThis is useful when users ask "where can I fly cheaply from X?" but the interaction patterns are less predictable than the standard search flow. Use with caution and rely on get text body for data extraction.
Related skills
How it compares
Choose google-flights for agent-driven UI lookups of public airfare; use airline or GDS APIs when you need booking, refunds, or SLA-backed production integrations.
FAQ
Who is google-flights for?
Developers and software engineers working with google-flights patterns from the skill documentation.
When should I use google-flights?
Search Google Flights for flight prices and schedules using browser automation. Use when user asks to search flights, find airfare, compare prices, check flight availability, or look up routes. Triggers include "search flights", "find flights", "how much is a flight", "flights fr
Is google-flights safe to install?
Review the Security Audits panel on this page before installing in production.