Google Flights API
Pricing
from $0.01 / 1,000 results
Google Flights API
Google Flights API for extracting flight search data. Search one-way, round-trip, and multi-city itineraries. Filter by price, stops, airlines, and passenger counts. Ideal for travel apps, price monitoring, data analytics, and flight comparison. Supports 29+ languages and 39+ countries.
Pricing
from $0.01 / 1,000 results
Rating
4.0
(6)
Developer
John
Maintained by CommunityActor stats
44
Bookmarked
1.9K
Total users
316
Monthly active users
5.8 hours
Issues response
11 hours ago
Last modified
Categories
Share
๐ซ Google Flights Search Scraper
The most powerful, reliable, and feature-rich Google Flights search scraper for Apify
๐ Why Choose Google Flights Scraper?
The Google Flights Search Scraper delivers enterprise-grade flight search capabilities with these advanced features:
Comprehensive Flight Search: Search one-way, round-trip, and complex multi-city itineraries with support for multiple departure/arrival airports. Get real-time flight data directly from Google Flights.
Advanced Filtering & Customization: Filter by price, number of stops, preferred airlines, and passenger counts. Exclude basic economy options. Get precisely the flight data you need.
Intelligent Pagination: Automatic handling of Google Flights pagination with configurable page limits. Process as many or as few results as you need.
Rich, Structured Data: Extract comprehensive flight information including best flights, alternative options, price insights, and airport details. Clean, structured JSON output ready for immediate use.
Cost-Effective Per-Page Billing: Pay only for what you use with transparent per-page pricing. No hidden fees or monthly subscriptions.
Enterprise-Grade Reliability: Built for developers and businesses who demand reliability. Comprehensive error handling, robust logging, and production-ready code.
๐ Features for the Google Flights API
Core Capabilities
- Multiple Trip Types: One-way, round-trip, and multi-city trip support
- Flexible Airport Selection: Single or multiple departure/arrival airports
- Advanced Filters: Price limits, stop limits, airline preferences, basic economy exclusion
- Passenger Configuration: Support for adults, children, and infants
- Intelligent Pagination: Automatic pagination handling with configurable limits
- Global Localization: 29+ languages and 39+ countries supported
Data Quality
- Best Flights: Top recommended flight options with pricing and details
- Alternative Flights: Additional flight options beyond the best matches
- Price Insights: Historical and predictive price information
- Airport Information: Comprehensive airport details and codes
- Per-Page Billing: Results pushed as separate dataset items for accurate billing
๐ Usage Examples
Example 0: Basic One-Way Flight Search
Search for a simple one-way flight with multiple passengers.
{"departure_id": "PEK","arrival_id": "AUS","outbound_date": "2025-12-15","adults": 1,"children": 1,"infants": 1,"currency": "USD","hl": "en","gl": "us","max_pages": 1}
Example 1: Round Trip with Filters
Search for a round-trip flight with price and stop filters.
{"departure_id": "JFK","arrival_id": "LHR","outbound_date": "2025-11-25","return_date": "2025-12-02","adults": 2,"children": 1,"infants": 0,"currency": "USD","hl": "en","gl": "us","max_price": 1500,"max_stops": 1,"max_pages": 2}
Example 2: Direct Flights Only with Specific Airlines
Search for direct flights only from specific airlines.
{"departure_id": "SFO","arrival_id": "NYC","outbound_date": "2025-12-01","adults": 1,"currency": "USD","hl": "en","gl": "us","max_stops": 0,"airlines": "UA,AA","max_pages": 1}
Example 3: International Search with Localization
Search for flights with French localization and EUR currency.
{"departure_id": "CDG","arrival_id": "FCO","outbound_date": "2025-12-01","adults": 1,"currency": "EUR","hl": "fr","gl": "fr","max_pages": 1}
Example 4: Multiple Departure Airports (Round Trip)
Search for round-trip flights from multiple departure airports.
{"departure_id": "CDG,ORY","arrival_id": "LAX","outbound_date": "2025-11-11","return_date": "2025-11-17","adults": 1,"currency": "USD","hl": "en","gl": "us","max_pages": 1}
Example 5: Multi-City Trip
Search for a complex multi-city itinerary with multiple legs.
{"multi_city_json": "[{\"departure_id\":\"CDG\",\"arrival_id\":\"NRT\",\"date\":\"2025-11-17\"},{\"departure_id\":\"NRT\",\"arrival_id\":\"LAX,SEA\",\"date\":\"2025-11-24\"},{\"departure_id\":\"LAX,SEA\",\"arrival_id\":\"AUS\",\"date\":\"2025-12-01\",\"times\":\"8,18,9,23\"}]","adults": 1,"currency": "USD","hl": "en","gl": "us","max_pages": 1}
Example 6: Exclude Basic Economy
Search for flights excluding basic economy options (filters out Economy flights with carry-on bags and free seat selection).
{"departure_id": "LAX","arrival_id": "JFK","outbound_date": "2025-12-15","adults": 1,"currency": "USD","hl": "en","gl": "us","exclude_basic": true,"max_pages": 1}
๐ Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
departure_id | string | โ * | - | Departure airport code(s), comma-separated for multiple (e.g., "LAX", "JFK", "CDG,ORY"). Required for one-way and round-trip searches. Not used for multi-city trips. |
arrival_id | string | โ * | - | Arrival airport code(s), comma-separated for multiple (e.g., "JFK", "SFO", "LAX,SEA"). Required for one-way and round-trip searches. Not used for multi-city trips. |
outbound_date | string | โ * | - | Departure date in YYYY-MM-DD format (e.g., "2025-11-25"). Required for one-way and round-trip searches. Not used for multi-city trips. |
return_date | string | โ | null | Return date in YYYY-MM-DD format (e.g., "2025-11-30"). Optional, used for round-trip searches. |
multi_city_json | string | โ * | - | JSON string for multi-city trips. Format: [{"departure_id":"...","arrival_id":"...","date":"..."},...]. When provided, departure_id, arrival_id, and outbound_date are not required. |
adults | integer | โ | 1 | Number of adult passengers (minimum: 1) |
children | integer | โ | 0 | Number of child passengers (minimum: 0) |
infants | integer | โ | 0 | Number of infant passengers (minimum: 0) |
currency | string | โ | "USD" | Currency code for prices (e.g., "USD", "EUR", "GBP") |
hl | string | โ | "en" | Language code for results. Supported: en, es, fr, de, it, pt, ru, ja, ko, zh, ar, hi, tr, pl, nl, sv, da, no, fi, cs, hu, ro, el, th, vi, id, ms, he, uk |
gl | string | โ | "us" | Country code for results. Supported: us, uk, ca, au, de, fr, es, it, nl, pl, br, ru, jp, kr, cn, tw, in, sa, tr, se, dk, no, fi, cz, hu, ro, mx, ar, ch, at, be, ie, nz, sg, my, th, ph, id, vn |
max_price | integer | โ | null | Maximum price filter in the specified currency |
max_stops | integer | โ | null | Maximum number of stops (0 = direct flights only, 1 = one stop max, null = no limit) |
airlines | string | โ | null | Comma-separated list of preferred airline codes (e.g., "UA,AA,DL") |
exclude_basic | boolean | โ | false | If true, filters out Economy flights that include carry-on bags and free seat selection |
fetch_booking_options | boolean | โ | false | If true, fetches detailed booking options including direct airline/OTA booking links, fare families, and baggage fees. Billed per resolved URL. Only effective for one-way searches: round-trip and multi-city results will return an empty booking_options array. |
max_pages | integer | โ | 1 | Maximum number of pages to fetch (0 = no limit) |
output_file | string | โ | null | Optional filename to save results. If not provided, will auto-generate based on route and parameters |
* Either departure_id/arrival_id/outbound_date OR multi_city_json is required.
๐ Output Format
Understanding Your Results (Read This First)
Each dataset item is one page of results, and each page contains many flights. A typical single-page search returns one dataset item that holds dozens of flights inside it. So if the run summary shows a small item count (for example "1"), that is the number of result pages, not the number of flights. The search still succeeded and every flight is included - the search_metadata.total_flights_found field shows the real count.
To see every flight as its own row, open the Output tab and use the "Flights" view (it is the default). Each row is a single flight with its route, price, airline, departure and arrival times, stops, and duration. Prefer the raw structure? The "Flight Results" view and the JSON tab show the full nested data, including the complete best_flights and other_flights arrays.
Dataset Item Structure
Each page of results is pushed as a separate dataset item with the following structure:
{"search_parameters": {"trip_type": 2,"trip_type_description": "One-way","departure_id": "LAX","arrival_id": "JFK","outbound_date": "2025-11-25","return_date": null,"multi_city_json": null,"exclude_basic": false,"adults": 1,"children": 0,"infants": 0,"currency": "USD","language": "en","language_name": "English","country": "us","country_name": "United States","max_price": null,"max_stops": null,"airlines": null},"search_metadata": {"total_flights_found": 45,"best_flights_count": 10,"other_flights_count": 35,"pages_processed": 2,"max_pages_set": 2,"pagination_limit_reached": false},"search_timestamp": "2025-11-20T10:30:00.123456","page_number": 1,"best_flights": [{"price": 299,"airline": "AA","departure_airport": "LAX","arrival_airport": "JFK","departure_time": "08:00","arrival_time": "16:30","duration": "5h 30m","stops": 0,"legs": [...]}],"other_flights": [...],"price_insights": {"lowest_price": 299,"price_level": "typical","typical_price_range": [299, 450]},"airports": [{"code": "LAX","name": "Los Angeles International Airport","city": "Los Angeles","country": "United States"}]}
Output Fields
search_parameters: Complete search configuration used for the querysearch_metadata: Summary statistics about the search resultssearch_timestamp: ISO timestamp when the search was performedpage_number: Current page number (1-indexed)all_flights: Flat, one-row-per-flight summary of every itinerary on the page (best and other flights combined), with scalar columns (route, price, airline, times, stops, duration). Powers the "Flights" view. The full nested itineraries remain inbest_flightsandother_flights.best_flights: Array of top recommended flight optionsother_flights: Array of additional flight optionsprice_insights: Price analysis and trends (typically on first page only)airports: Airport information and details (typically on first page only)booking_options: High-level booking options extracted directly from search responses (when available)
Fetching Booking Options (Booking Links)
You can optionally fetch detailed booking options, including direct booking links to airline and OTA websites, fare families, and baggage fees, by enabling the fetch_booking_options input.
- Input flag:
fetch_booking_options: true - What it does: For each flight result that has a booking token, makes an additional request to retrieve booking options and resolves each one to a final
booking_urlon the airline or OTA website. - Billing impact: Each resolved booking URL is billed as a
booking_option_processedevent. This can significantly increase your costs, a typical one-way search returns 80โ120 booking options.
Important, availability by trip type:
Booking options are only available for one-way searches. Round-trip and multi-city results do not include the token type required to fetch booking options, so
booking_optionswill be an empty array ([]) for those searches even whenfetch_booking_options: trueis set. You will not be billed for booking options on runs that return none.
Example: Without fetch_booking_options
{"search_parameters": {"trip_type": 2,"trip_type_description": "One-way","departure_id": "LAX","arrival_id": "JFK","outbound_date": "2025-11-25","exclude_basic": false,"adults": 1,"children": 0,"infants": 0,"currency": "USD","language": "en","country": "us"},"search_metadata": {"total_flights_found": 45,"best_flights_count": 10,"other_flights_count": 35,"pages_processed": 2,"max_pages_set": 2,"pagination_limit_reached": false,"booking_options_count": 0},"page_number": 1,"best_flights": [...],"other_flights": [...],"price_insights": {...},"airports": [...],"booking_options": []}
Example: With fetch_booking_options: true
The dataset item shape is the same. The booking_options array is populated with detailed entries, one per booking_token, each containing a booking_url that links directly to the airline or OTA booking page.
{"search_parameters": { "...": "same as above" },"search_metadata": {"total_flights_found": 30,"best_flights_count": 3,"other_flights_count": 27,"pages_processed": 1,"max_pages_set": 1,"pagination_limit_reached": true,"booking_options_count": 107},"page_number": 1,"best_flights": ["..."],"other_flights": ["..."],"price_insights": {"...": "..."},"airports": ["..."],"booking_options": [{"booking_token": "W251bGwsW1siQ0RHIiwi...","selected_flights": [{"flights": [{"departure_airport": { "id": "LAX", "time": "2025-11-25 08:00" },"arrival_airport": { "id": "JFK", "time": "2025-11-25 16:30" },"airline": "JetBlue","travel_class": "Economy","flight_number": "B6 724"}],"total_duration": 330}],"baggage_prices": {"together": ["1 free carry-on", "1st checked bag: $35"]},"booking_options": [{"together": {"book_with": "JetBlue","airline": true,"price": 149,"option_title": "Blue Basic","extensions": ["No changes", "No carry-on"],"baggage_prices": ["1 free carry-on", "1st checked bag: $35"],"booking_url": "https://www.jetblue.com/booking/trip-summary?searchType=NORMAL&journeySpan=OW&origin=LAX&destination=JFK&..."}},{"together": {"book_with": "JetBlue","airline": true,"price": 199,"option_title": "Blue","extensions": ["Changes for a fee"],"baggage_prices": ["1 free carry-on", "1st checked bag: $35"],"booking_url": "https://www.jetblue.com/booking/trip-summary?searchType=NORMAL&journeySpan=OW&origin=LAX&destination=JFK&fareFamily=GN&..."}}]}]}
Note:
booking_urlis a fully resolved direct link to the airline or OTA booking page (e.g.,jetblue.com,delta.com,aa.com). The rawbooking_requestPOST payload is not included in the output.
๐ฏ Use Cases
- Travel Aggregators: Build flight comparison tools and price tracking systems
- Travel Agencies: Automate flight search and booking workflows
- Price Monitoring: Track flight prices over time for specific routes
- Market Research: Analyze flight availability and pricing trends
- Travel Planning: Build custom travel planning applications
- Data Analytics: Collect flight data for business intelligence and analysis
๐ Integrations: Automate Flight Price Monitoring
A single flight search answers one question. The real value of this Scraper comes from running it repeatedly, tracking a route over weeks, catching fare drops, and feeding live flight data into the tools you already use. Thanks to the native Apify platform integrations, you can wire this Actor into your stack in minutes, no servers or cron jobs of your own required.
Tasks + Schedules: register a regular monitoring run
The core pattern for price monitoring is one saved task per route, one schedule across all of them.
- Create a task. A saved task is this Actor plus a saved input, so give each route you care about its own named task, e.g. "JFK-LHR Thanksgiving" with
departure_id: "JFK",arrival_id: "LHR", your dates, and filters. Click Create empty task on the Actor page, fill in the input, and save. - Attach a schedule. Open Schedules in the Apify Console, create a schedule with a standard cron expression, and add your tasks to it. Useful examples:
0 7 * * *(every morning at 7 AM),0 */6 * * *(every 6 hours),0 9 * * 1(Mondays at 9 AM). One schedule can trigger many tasks, so a single "daily fare check" schedule can monitor every route you've saved. - Review the price history. Each run appends a new page of results, with
price_insightsand asearch_timestamp, to the task's dataset list, giving you a fare history you can export as JSON, CSV, or Excel at any time.
See it working end to end in the featured task Track NYC to London flight prices by API.
n8n: build a fare-drop alert workflow
This Actor ships as a dedicated n8n community node, n8n-nodes-google-flights-api, so you don't need raw HTTP requests. In n8n: Settings โ Community Nodes โ install n8n-nodes-google-flights-api, then use it in any workflow (it also works as an AI Agent tool).
A typical fare-alert workflow looks like this:
- Schedule Trigger โ run every morning at 7 AM.
- Google Flights node โ search your route (e.g. JFK โ LHR round trip).
- Filter node โ keep results where the lowest price is below your threshold (e.g.
$500). - Slack / email node โ send yourself the price, airline, and times when a deal appears.
Make & Zapier
Prefer Make or Zapier? Both have native Apify integrations, Apify on Make and Apify on Zapier, with "Run Actor" and "Get Dataset Items" actions. The same fare-alert pattern applies: trigger on a schedule, run this Actor, filter on price, and notify or store the results.
Supabase: store fare history in your own database
Tracking prices over time means storing them somewhere queryable. Supabase (hosted Postgres) is a great fit, and there are two easy paths:
- No code: in n8n, connect the Google Flights node to the built-in Supabase node to insert a row per flight after each scheduled run.
- A few lines of Python: run the Actor and bulk-insert the flat
all_flightsrows into aflight_pricestable.
from apify_client import ApifyClientfrom supabase import create_clientapify = ApifyClient("YOUR_APIFY_TOKEN")supabase = create_client("https://YOUR_PROJECT.supabase.co", "YOUR_SERVICE_ROLE_KEY")run = apify.actor("johnvc/Google-Flights-Data-Scraper-Flight-and-Price-Search").call(run_input={"departure_id": "JFK","arrival_id": "LHR","outbound_date": "2026-11-25","return_date": "2026-12-02","currency": "USD","max_pages": 1,})for page in apify.dataset(run["defaultDatasetId"]).iterate_items():rows = [{"route": f"{flight['departure_airport']}-{flight['arrival_airport']}","price": flight["price"],"airline": flight["airline"],"stops": flight["stops"],"duration": flight["duration"],"searched_at": page["search_timestamp"],}for flight in page.get("all_flights", [])]if rows:supabase.table("flight_prices").insert(rows).execute()
Run this on a schedule (or trigger it from a webhook, below) and you have a growing fare-history database ready for dashboards, trend analysis, or "book now" recommendations.
MCP & AI agents
Apify exposes this Actor through the Apify MCP server, so MCP-compatible AI assistants, Claude, Cursor, and others, can run live Google Flights searches as a tool and answer questions like "what's the cheapest nonstop from JFK to LHR next month?" with real data. The featured task Use Google Flights in Claude via MCP walks through the one-click setup.
Webhooks: connect anything else
For custom setups, attach an Apify webhook to the ACTOR.RUN.SUCCEEDED event. Every time a scheduled run finishes, Apify POSTs the run details (including the dataset ID) to your endpoint, your server, an n8n/Make webhook trigger, or a serverless function, which can then fetch the results and do anything with them: update a Google Sheet, refresh a dashboard, or text you when fares drop.
๐ Notes
- Results are automatically sorted by relevance (Google Flights default)
- Multi-city trips require the
multi_city_jsonparameter - Multiple airports can be specified as comma-separated values
- The
exclude_basicfilter removes Economy flights with carry-on and free seat selection - Price insights and airports are typically only included on the first page
- All dates must be in
YYYY-MM-DDformat
โ Frequently Asked Questions (FAQ)
What is the Google Flights Scraper and what does it do?
The Google Flights Scraper is an Apify Actor that searches Google Flights, the flight metasearch engine described on Wikipedia, and returns the results as clean, structured JSON. Instead of manually browsing Google Flights, you send a simple input (departure airport, arrival airport, dates, passengers, filters) and the Scraper returns best flights, alternative flights, price insights, airport details, and optionally direct booking links. It supports one-way, round-trip, and multi-city itineraries in 29+ languages and 39+ countries.
Should I be using an API or a Web Scraper for Google Flights data?
For Google Flights, a scraper is effectively your only option, because Google does not offer a public flights API (the old QPX Express API was shut down in 2018). This Actor gives you the best of both worlds: under the hood it works like a web scraper, collecting live data directly from Google Flights, but you consume it like an API, with a documented JSON input, a predictable JSON output, and programmatic access from any language via the Apify platform. You get scraper coverage with API ergonomics, and no infrastructure to maintain.
Does the Google Flights Scraper have an API?
Yes. Every run of this Scraper can be started, monitored, and retrieved through the Apify API, a standard REST API with official clients for JavaScript/Node.js and Python. You can trigger a flight search with a single HTTP POST, wait for the run to finish, and download the dataset as JSON, CSV, or Excel. This makes it easy to plug Google Flights data into backends, spreadsheets, dashboards, or workflow tools like n8n, Make, and Zapier.
Can I use the Google Flights Scraper with MCP and AI agents?
Yes. Apify exposes Actors, including this Scraper, through the Model Context Protocol (MCP), the open standard that lets AI assistants call external tools. Connect the Apify MCP server to Claude, Cursor, or any MCP-compatible agent, and the assistant can run live Google Flights searches and answer questions like "what is the cheapest nonstop from JFK to LHR next month?" with real data. See the featured task Use Google Flights in Claude via MCP for a one-click setup.
Can I schedule this Scraper to run automatically?
Yes, and scheduling is one of the most popular ways to use it, especially for price tracking. On the Apify platform, open the Actor, click Actions โ Schedule, and create a schedule using Apify Schedules. Schedules use standard cron expressions, so you can run the Scraper every hour (0 * * * *), every morning at 7 AM (0 7 * * *), or once a week, each run reusing your saved input (route, dates, filters). You can attach multiple Actors or saved tasks to one schedule, set the timezone, and toggle schedules on and off without deleting them. Schedules can also be created programmatically through the Apify API, which is useful when you want to track many routes. Combine a schedule with a webhook or the n8n node to get alerted when a fare drops below your threshold; see the Integrations section above for the full task-per-route monitoring pattern. A worked example is available in the featured task Track NYC to London flight prices by API.
What is the Google Flights search URL format and which query parameters does the Scraper use?
A native Google Flights search URL looks like https://www.google.com/travel/flights?hl=en&gl=us&curr=USD&tfs=..., where hl sets the interface language, gl sets the country edition, curr sets the currency, and tfs is an opaque, Base64-encoded blob that encodes the route, dates, passengers, and filters. Because tfs is not human-readable, this Scraper replaces it with clean, named query parameters. departure_id and arrival_id take IATA airport codes such as JFK or LHR (comma-separate several codes to search multiple airports at once). outbound_date and return_date take YYYY-MM-DD dates; omit return_date for a one-way search, or pass multi_city_json for multi-leg trips. Passengers are set with adults, children, and infants. Localization mirrors Google's own URL parameters: hl (language), gl (country), and currency as an ISO 4217 code like USD or EUR. Finally, filters such as max_price, max_stops (0 for nonstop only), airlines, and exclude_basic narrow the results, and max_pages controls pagination. The full reference is in the Input Parameters table above.
Which airport codes does the Google Flights Scraper accept?
The Scraper accepts standard three-letter IATA airport codes, the same codes shown on Google Flights itself, such as LAX (Los Angeles), JFK (New York), CDG (Paris), and NRT (Tokyo). You can pass a single code or several comma-separated codes for both departure and arrival, for example "CDG,ORY" to search all Paris airports, which is a fast way to compare fares across nearby airports in one run.
How much does the Google Flights Scraper cost to run?
The Scraper uses transparent per-page billing: you pay for each page of results it processes, with no subscription or hidden fees. A typical search that fits on one page costs a single page event, and max_pages lets you cap spend precisely. If you enable fetch_booking_options, each resolved booking URL is billed as a separate event (a one-way search typically returns 80โ120 booking options), so leave it off unless you need direct airline and OTA booking links.
Made with โค๏ธ
Transform your flight search automation with the most reliable and feature-rich Google Flights scraper on Apify.
Featured Tasks
Ready-to-run examples that show this API solving a specific problem. Each opens its own setup so you can run it on your account in one click.
- Track NYC to London flight prices by API - rerun one call on a schedule and chart round-trip fares with price insights.
- Find cheap flights from NYC to Europe by API - query several departure and arrival airports in a single run for fare hunting.
- Use Google Flights in Claude via MCP - let Claude (free trial available) answer route and price questions with live data.
Last Updated: 2026.07.11