Google Flights API: Structured Flight Search Results
Use Google Flights as an API. There is no official Google Flights API, so developers scrape it; this Actor does that as a hosted service. Route and dates in, structured JSON out: one row per flight with price, airlines, times, stops, and duration, plus route-level price insights.
When to use this skill
- The user wants a "Google Flights API" (none exists officially; the predecessor QPX Express shut down in 2018).
- They want to scrape Google Flights results for a route into JSON or CSV.
- They want airfare data by API or from Python for a travel app, dataset, or analysis.
- They ask for a "Google Flights scraper" or "how to scrape Google Flights".
Not for: live aircraft tracking or flight status (this is a fare and search scraper, not a radar), creating reservations (it returns booking links, not tickets), or hotel searches (use the Google Hotels Actor).
What you get (one dataset item per page, flights nested in all_flights)
Each dataset item is one page of results holding an all_flights array (about 30 flights per page). Per flight: price, currency, route, airlines, airline_logo, departure_airport, departure_time, arrival_airport, arrival_time, stops, stops_label, layover_airports, duration, duration_minutes, travel_class, flight_numbers, overnight, often_delayed, carbon_emissions_g, booking_token, category. The item also carries best_flights and other_flights groupings, airports info, search_metadata, and price_insights (lowest_price, price_level, typical_price_range, plus a price_history series when Google shows one). With fetch_booking_options true (one-way only, billed per option), booking_options adds direct booking links and baggage prices.
Prerequisites
The Actor
Run it with the Apify CLI
One-way search:
apify actors call "johnvc/Google-Flights-Data-Scraper-Flight-and-Price-Search" -i '{"departure_id":"LAX","arrival_id":"JFK","outbound_date":"2026-08-14","max_pages":1}' \
--json \
--user-agent apify-awesome-skills/apify-google-flights-api \
2>/dev/null
Round trip, nonstop only, under a price cap:
apify actors call "johnvc/Google-Flights-Data-Scraper-Flight-and-Price-Search" -i '{"departure_id":"SFO","arrival_id":"CDG","outbound_date":"2026-09-10","return_date":"2026-09-20","max_stops":0,"max_price":900,"currency":"USD"}' \
--json \
--user-agent apify-awesome-skills/apify-google-flights-api \
2>/dev/null
Every call carries the three flags this repo expects: --json, --user-agent apify-awesome-skills/apify-google-flights-api, and 2>/dev/null.
Run it from Claude or another AI agent (MCP)
The Actor is MCP-ready. Add the hosted server URL:
https://mcp.apify.com/?tools=actors,docs,johnvc/Google-Flights-Data-Scraper-Flight-and-Price-Search
Then ask, for example: "Find nonstop flights from LAX to JFK on August 14 under $400 and list them by price." MCP setup docs: https://docs.apify.com/platform/integrations/mcp
Workflow
- Build the route.
departure_id and arrival_id take IATA codes, comma-separated for multi-airport searches (for example "CDG,ORY"). Add outbound_date (YYYY-MM-DD); add return_date for a round trip, or pass multi_city_json instead for complex itineraries.
- Set passengers and market.
adults, children, infants; currency, hl (29 languages), gl (39 countries) for localized fares.
- Filter.
max_price, max_stops (0 = nonstop), airlines (comma-separated codes), exclude_basic.
- Bound the volume.
max_pages (default 1) is the cost driver; leave fetch_booking_options off unless the user needs direct booking links (it bills per option, one-way only).
- Estimate cost, then confirm with the user if the run is large. See
references/gotchas.md.
- Run the Actor and read the dataset. Read each page item's
all_flights array, then sort or filter by price, stops, or duration_minutes; flatten to rows for CSV.
Inputs
departure_id / arrival_id (IATA codes, comma-separated allowed) and outbound_date; return_date optional
multi_city_json (array of route legs) for multi-city trips
adults (default 1), children, infants
currency (default USD), hl (enum, 29), gl (enum, 39)
max_price, max_stops, airlines, exclude_basic (filters)
fetch_booking_options (boolean, extra billing, one-way only), max_pages (default 1)
Cost
Billing is a small setup fee per run plus a per-page fee; a default one-page search costs a few cents. Booking options bill separately per option returned. Live prices and thresholds are in references/gotchas.md.
Honest limits
- Fares are search results at crawl time; airlines reprice constantly, so treat prices as current quotes, not guarantees.
price_insights gives the current price level, a typical range, and, when Google shows one, a recent price_history series for the route. It is not a fare forecast.
- No reservations:
booking_options returns direct links to airlines and travel sites; ticketing happens there.
- Not a flight tracker: no live aircraft position, delay feed, or gate information.
Troubleshooting
- Empty results: check the IATA codes and date format (YYYY-MM-DD); very thin routes can legitimately return few flights.
- Prices look off for the market: set
currency, gl, and hl together.
- Booking options missing:
fetch_booking_options must be true, and it applies to one-way searches only.
See references/gotchas.md for cost guardrails and error recovery, and references/actor-index.md for the Actor routing table.
Related travel Actors
1---2name: apify-google-flights-api3description: Use Google Flights as an API with the Apify Google Flights Actor (johnvc/Google-Flights-Data-Scraper-Flight-and-Price-Search). There is no official google flights api, so this skill fills the gap. Give departure and arrival airport codes plus dates, and get structured flight results as JSON, one row per flight with price, currency, airlines, departure and arrival times, stops, layover airports, duration, travel class, and flight numbers, plus price insights for the route. Supports one-way, round-trip, and multi-city itineraries, 29 languages, 39 countries, and filters for price, stops, and airlines. Use when the user wants a google flights api, to scrape google flights, a google flights scraper, flight results as JSON or CSV, or airfare data for a route by API or Python. Pay-per-page billing, MCP-ready for Claude and other AI agents.4license: MIT5---67# Google Flights API: Structured Flight Search Results89Use Google Flights as an API. There is no official Google Flights API, so developers scrape it; this Actor does that as a hosted service. Route and dates in, structured JSON out: one row per flight with price, airlines, times, stops, and duration, plus route-level price insights.1011## When to use this skill1213- The user wants a "Google Flights API" (none exists officially; the predecessor QPX Express shut down in 2018).14- They want to scrape Google Flights results for a route into JSON or CSV.15- They want airfare data by API or from Python for a travel app, dataset, or analysis.16- They ask for a "Google Flights scraper" or "how to scrape Google Flights".1718Not for: live aircraft tracking or flight status (this is a fare and search scraper, not a radar), creating reservations (it returns booking links, not tickets), or hotel searches (use the Google Hotels Actor).1920## What you get (one dataset item per page, flights nested in `all_flights`)2122Each dataset item is one page of results holding an `all_flights` array (about 30 flights per page). Per flight: `price`, `currency`, `route`, `airlines`, `airline_logo`, `departure_airport`, `departure_time`, `arrival_airport`, `arrival_time`, `stops`, `stops_label`, `layover_airports`, `duration`, `duration_minutes`, `travel_class`, `flight_numbers`, `overnight`, `often_delayed`, `carbon_emissions_g`, `booking_token`, `category`. The item also carries `best_flights` and `other_flights` groupings, `airports` info, `search_metadata`, and `price_insights` (`lowest_price`, `price_level`, `typical_price_range`, plus a `price_history` series when Google shows one). With `fetch_booking_options` true (one-way only, billed per option), `booking_options` adds direct booking links and baggage prices.2324## Prerequisites2526- Apify account (sign up at https://apify.com?fpr=9n7kx3&fp_sid=skillrepo).27- Authentication via `apify login`, or an `APIFY_TOKEN` environment variable (Apify Console, Settings, Integrations).2829## The Actor3031- Store page: https://apify.com/johnvc/Google-Flights-Data-Scraper-Flight-and-Price-Search?fpr=9n7kx3&fp_sid=skillrepo32- Actor ID: `johnvc/Google-Flights-Data-Scraper-Flight-and-Price-Search`33- Pricing: a small per-run setup fee plus a per-page fee (see `references/gotchas.md`).3435## Run it with the Apify CLI3637One-way search:3839```bash40apify actors call "johnvc/Google-Flights-Data-Scraper-Flight-and-Price-Search" -i '{"departure_id":"LAX","arrival_id":"JFK","outbound_date":"2026-08-14","max_pages":1}' \41 --json \42 --user-agent apify-awesome-skills/apify-google-flights-api \43 2>/dev/null44```4546Round trip, nonstop only, under a price cap:4748```bash49apify actors call "johnvc/Google-Flights-Data-Scraper-Flight-and-Price-Search" -i '{"departure_id":"SFO","arrival_id":"CDG","outbound_date":"2026-09-10","return_date":"2026-09-20","max_stops":0,"max_price":900,"currency":"USD"}' \50 --json \51 --user-agent apify-awesome-skills/apify-google-flights-api \52 2>/dev/null53```5455Every call carries the three flags this repo expects: `--json`, `--user-agent apify-awesome-skills/apify-google-flights-api`, and `2>/dev/null`.5657## Run it from Claude or another AI agent (MCP)5859The Actor is MCP-ready. Add the hosted server URL:6061`https://mcp.apify.com/?tools=actors,docs,johnvc/Google-Flights-Data-Scraper-Flight-and-Price-Search`6263Then ask, for example: "Find nonstop flights from LAX to JFK on August 14 under $400 and list them by price." MCP setup docs: https://docs.apify.com/platform/integrations/mcp6465## Workflow66671. Build the route. `departure_id` and `arrival_id` take IATA codes, comma-separated for multi-airport searches (for example "CDG,ORY"). Add `outbound_date` (YYYY-MM-DD); add `return_date` for a round trip, or pass `multi_city_json` instead for complex itineraries.682. Set passengers and market. `adults`, `children`, `infants`; `currency`, `hl` (29 languages), `gl` (39 countries) for localized fares.693. Filter. `max_price`, `max_stops` (0 = nonstop), `airlines` (comma-separated codes), `exclude_basic`.704. Bound the volume. `max_pages` (default 1) is the cost driver; leave `fetch_booking_options` off unless the user needs direct booking links (it bills per option, one-way only).715. Estimate cost, then confirm with the user if the run is large. See `references/gotchas.md`.726. Run the Actor and read the dataset. Read each page item's `all_flights` array, then sort or filter by `price`, `stops`, or `duration_minutes`; flatten to rows for CSV.7374## Inputs7576- `departure_id` / `arrival_id` (IATA codes, comma-separated allowed) and `outbound_date`; `return_date` optional77- `multi_city_json` (array of route legs) for multi-city trips78- `adults` (default 1), `children`, `infants`79- `currency` (default USD), `hl` (enum, 29), `gl` (enum, 39)80- `max_price`, `max_stops`, `airlines`, `exclude_basic` (filters)81- `fetch_booking_options` (boolean, extra billing, one-way only), `max_pages` (default 1)8283## Cost8485Billing is a small setup fee per run plus a per-page fee; a default one-page search costs a few cents. Booking options bill separately per option returned. Live prices and thresholds are in `references/gotchas.md`.8687## Honest limits8889- Fares are search results at crawl time; airlines reprice constantly, so treat prices as current quotes, not guarantees.90- `price_insights` gives the current price level, a typical range, and, when Google shows one, a recent `price_history` series for the route. It is not a fare forecast.91- No reservations: `booking_options` returns direct links to airlines and travel sites; ticketing happens there.92- Not a flight tracker: no live aircraft position, delay feed, or gate information.9394## Troubleshooting9596- Empty results: check the IATA codes and date format (YYYY-MM-DD); very thin routes can legitimately return few flights.97- Prices look off for the market: set `currency`, `gl`, and `hl` together.98- Booking options missing: `fetch_booking_options` must be true, and it applies to one-way searches only.99100See `references/gotchas.md` for cost guardrails and error recovery, and `references/actor-index.md` for the Actor routing table.101102## Related travel Actors103104- Google Hotels Search Scraper: https://apify.com/johnvc/google-hotels-search-scraper?fpr=9n7kx3&fp_sid=skillrepo105- Google Travel Explore API: https://apify.com/johnvc/google-travel-explore-api?fpr=9n7kx3&fp_sid=skillrepo106- Google Maps Directions API: https://apify.com/johnvc/google-maps-directions-api?fpr=9n7kx3&fp_sid=skillrepo