Google Flights
Pricing
from $4.00 / 1,000 flight-searches
Google Flights
Search Google Flights routes and return structured, deduplicated flight options.
Google Flights
Pricing
from $4.00 / 1,000 flight-searches
Search Google Flights routes and return structured, deduplicated flight options.
You can access the Google Flights programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in API & Integrations in Apify Console.
{ "openapi": "3.0.1", "info": { "version": "1.0", "x-build-id": "wY6kup4bZmQ0FKU7f" }, "servers": [ { "url": "https://api.apify.com/v2" } ], "paths": { "/acts/datasaurus~google-flights/run-sync-get-dataset-items": { "post": { "operationId": "run-sync-get-dataset-items-datasaurus-google-flights", "x-openai-isConsequential": false, "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.", "tags": [ "Run Actor" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/inputSchema" } } } }, "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Enter your Apify token here" } ], "responses": { "200": { "description": "OK" } } } }, "/acts/datasaurus~google-flights/runs": { "post": { "operationId": "runs-sync-datasaurus-google-flights", "x-openai-isConsequential": false, "summary": "Executes an Actor and returns information about the initiated run in response.", "tags": [ "Run Actor" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/inputSchema" } } } }, "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Enter your Apify token here" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/runsResponseSchema" } } } } } } }, "/acts/datasaurus~google-flights/run-sync": { "post": { "operationId": "run-sync-datasaurus-google-flights", "x-openai-isConsequential": false, "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.", "tags": [ "Run Actor" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/inputSchema" } } } }, "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Enter your Apify token here" } ], "responses": { "200": { "description": "OK" } } } } }, "components": { "schemas": { "inputSchema": { "type": "object", "properties": { "startUrls": { "title": "Google Flights URLs (optional — overrides search inputs)", "type": "array", "description": "Paste one or more Google Flights search URLs. When this field is populated, the other search inputs are ignored: routes, dates, queries, passengers, cabin, filters, currency, language and country come from each URL. You do not need to clear the form. Result limits, optional output lookups and raw-response storage still apply. Accepts copied tfs links or q search links; HTTPS google.com/www.google.com only.", "items": { "type": "object", "required": [ "url" ], "properties": { "url": { "type": "string", "title": "URL of a web page", "format": "uri" } } } }, "origin": { "title": "From (airport group, city or country)", "type": "string", "description": "One IATA code, a comma-separated airport group, or a complete city/country name. Separate several names with semicolons. Ignored when Google Flights URLs are populated." }, "destination": { "title": "To (airport group, city or country)", "type": "string", "description": "One IATA code, a comma-separated airport group, or a complete city/country name. Separate several names with semicolons. Ignored when Google Flights URLs are populated." }, "departureDate": { "title": "Departure date", "type": "string", "description": "Outbound date in YYYY-MM-DD format. Ignored when Google Flights URLs are populated." }, "returnDate": { "title": "Return date (optional)", "type": "string", "description": "Return date in YYYY-MM-DD; omit for one-way. Ignored when Google Flights URLs are populated." }, "multiCityLegs": { "title": "Multi-city legs", "type": "array", "description": "Ordered journey, 2–6 legs, one ORIGIN-DESTINATION-YYYY-MM-DD per line. Overrides From/To/dates; the runtime also accepts leg objects in JSON. Ignored when Google Flights URLs are populated.", "items": { "type": "string" } }, "queries": { "title": "Multiple searches (advanced)", "type": "array", "description": "Independent searches inheriting shared route and filter defaults. Each entry overrides only its own fields. Up to 100 searches after flexible-date expansion. Ignored when Google Flights URLs are populated.", "items": { "type": "object" } }, "flexDays": { "title": "Flexible dates", "minimum": 0, "maximum": 7, "type": "integer", "description": "Search this many days either side of departureDate; shift returnDate by the same amount to preserve trip length. Makes additional searches. Ignored when Google Flights URLs are populated.", "default": 0 }, "adults": { "title": "Adults", "minimum": 1, "maximum": 9, "type": "integer", "description": "Adults. Ignored when Google Flights URLs are populated.", "default": 1 }, "children": { "title": "Children", "minimum": 0, "maximum": 8, "type": "integer", "description": "Children. Ignored when Google Flights URLs are populated.", "default": 0 }, "infantsInSeat": { "title": "Infants in seat", "minimum": 0, "maximum": 8, "type": "integer", "description": "Infants in seat. Ignored when Google Flights URLs are populated.", "default": 0 }, "infantsOnLap": { "title": "Infants on lap", "minimum": 0, "maximum": 8, "type": "integer", "description": "Infants on lap. Ignored when Google Flights URLs are populated.", "default": 0 }, "cabinClass": { "title": "Cabin class", "enum": [ "economy", "premium economy", "business", "first" ], "type": "string", "description": "Requested travel class. Ignored when Google Flights URLs are populated.", "default": "economy" }, "stops": { "title": "Stops", "enum": [ "any", "nonstop", "one", "two" ], "type": "string", "description": "Maximum number of stops. Ignored when Google Flights URLs are populated.", "default": "any" }, "airlines": { "title": "Airlines", "type": "array", "description": "Keep itineraries containing at least one listed airline name or IATA airline code. Applied after fetching. Ignored when Google Flights URLs are populated.", "items": { "type": "string" }, "default": [] }, "alliances": { "title": "Include airline alliances", "type": "array", "description": "ONEWORLD, SKYTEAM or STAR_ALLIANCE. Combines with Airlines using either-match logic. Ignored when Google Flights URLs are populated.", "items": { "type": "string" }, "default": [] }, "excludeAirlines": { "title": "Exclude airlines or alliances", "type": "array", "description": "Airline IATA codes, exact carrier names, or alliance names to exclude. Ignored when Google Flights URLs are populated.", "items": { "type": "string" }, "default": [] }, "maxPrice": { "title": "Maximum price", "minimum": 1, "maximum": 10000000, "type": "integer", "description": "Keep only fares at or below this total in the requested currency. Applied after fetching. Ignored when Google Flights URLs are populated." }, "outboundDepartureTime": { "title": "Outbound departure time window", "type": "string", "description": "Airport-local hours or HH:MM, for example 6-12, 18:30-23:00 or 22-6 across midnight. Ignored when Google Flights URLs are populated." }, "outboundArrivalTime": { "title": "Outbound arrival time window", "type": "string", "description": "Airport-local window, such as 8-20 or 08:30-20:00. Ignored when Google Flights URLs are populated." }, "returnDepartureTime": { "title": "Return departure time window", "type": "string", "description": "Airport-local departure window for the return direction. Ignored when Google Flights URLs are populated." }, "returnArrivalTime": { "title": "Return arrival time window", "type": "string", "description": "Airport-local arrival window for the return direction. Ignored when Google Flights URLs are populated." }, "maxDurationHours": { "title": "Maximum journey duration (hours)", "minimum": 0.01, "maximum": 1000, "type": "number", "description": "Maximum duration per direction including layovers. Ignored when Google Flights URLs are populated." }, "connectOnlyVia": { "title": "Connect only via these airports", "type": "array", "description": "Only use these IATA airports for connections. Nonstop options still qualify. Ignored when Google Flights URLs are populated.", "items": { "type": "string" }, "default": [] }, "neverConnectVia": { "title": "Never connect via these airports", "type": "array", "description": "Exclude connections at these IATA airports. Ignored when Google Flights URLs are populated.", "items": { "type": "string" }, "default": [] }, "minLayoverHours": { "title": "Minimum layover (hours)", "minimum": 0, "maximum": 72, "type": "number", "description": "Minimum connection time; fractional hours such as 1.5 are accepted. Ignored when Google Flights URLs are populated." }, "maxLayoverHours": { "title": "Maximum layover (hours)", "minimum": 0, "maximum": 72, "type": "number", "description": "Maximum connection time; fractional hours are accepted. Ignored when Google Flights URLs are populated." }, "checkedBags": { "title": "Checked bags for the party", "minimum": 0, "maximum": 9, "type": "integer", "description": "Ask Google to include known checked-bag fees. Capped at one per seated passenger. Ignored when Google Flights URLs are populated.", "default": 0 }, "carryOnBags": { "title": "Carry-on bags for the party", "minimum": 0, "maximum": 9, "type": "integer", "description": "Ask Google to include known carry-on fees. Capped at one per seated passenger. Ignored when Google Flights URLs are populated.", "default": 0 }, "excludeBasicEconomy": { "title": "Exclude basic economy", "type": "boolean", "description": "Ask Google to exclude basic-economy fares. Ignored when Google Flights URLs are populated.", "default": false }, "lessEmissionsOnly": { "title": "Lower emissions only", "type": "boolean", "description": "Keep only flights with lower-than-typical reported emissions. Ignored when Google Flights URLs are populated.", "default": false }, "sortBy": { "title": "Sort results", "enum": [ "top", "price", "departure", "arrival", "duration", "emissions" ], "type": "string", "description": "Sort before the per-search result limit. Top preserves Google ordering. Ignored when Google Flights URLs are populated.", "default": "top" }, "currency": { "title": "Currency", "type": "string", "description": "Three-letter output currency. Ignored when Google Flights URLs are populated.", "default": "USD" }, "country": { "title": "Country", "type": "string", "description": "Two-letter search context country. Ignored when Google Flights URLs are populated.", "default": "us" }, "language": { "title": "Language", "type": "string", "description": "Language or locale tag, such as en, en-GB, de or fr. Ignored when Google Flights URLs are populated.", "default": "en" }, "exploreDestinations": { "title": "Explore cheapest destinations", "type": "boolean", "description": "Discover destinations from From, price their suggested or requested dates, and return explore-destination records. To is ignored. Ignored when Google Flights URLs are populated.", "default": false }, "maxExploreDestinations": { "title": "Maximum Explore destinations to price", "minimum": 1, "maximum": 30, "type": "integer", "description": "Maximum number of discovered destinations to price per Explore search. The run also has a shared cap of 500 additional fare checks.", "default": 10 }, "exploreRegion": { "title": "Explore region", "enum": [ "anywhere", "europe", "asia", "middle_east", "africa", "north_america", "central_america_caribbean", "south_america", "oceania" ], "type": "string", "description": "Limit discovered destinations to this region. Ignored when Google Flights URLs are populated.", "default": "anywhere" }, "exploreMonth": { "title": "Explore month", "enum": [ "next_6_months", "january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december" ], "type": "string", "description": "Without departureDate: use Google suggested dates in the next six months, or compare prices in the selected calendar month. Ignored when Google Flights URLs are populated.", "default": "next_6_months" }, "exploreTripLength": { "title": "Explore trip length", "enum": [ "weekend", "1_week", "2_weeks", "one_way" ], "type": "string", "description": "Without returnDate: one-way, weekend (3 days), one week or two weeks. Ignored when Google Flights URLs are populated.", "default": "1_week" }, "maxResults": { "title": "Maximum saved flights per search", "minimum": 1, "maximum": 1000, "type": "integer", "description": "Maximum unique primary flight rows saved from one search. Each input URL and each route/date created by flexDays is a separate search, so this is not a limit for the whole run. Example: flexDays=1 (search one day either side) creates up to 3 date searches; with maxResults=5, up to 15 primary flight rows can be saved. The row count does not set the charge: each date search is charged as a flight-search event. Calendar prices, return-flight searches and booking lookups have separate limits and charges.", "default": 100 }, "showAllResults": { "title": "Fetch expanded search results", "type": "boolean", "description": "Request the full result set Google supplies before filtering and limiting. Adds an HTTP lookup; availability is still source-dependent.", "default": false }, "includeBookingDetails": { "title": "Include booking providers and fares", "type": "boolean", "description": "Fetch airline/OTA fares, fare names, booking links, booking forms and available baggage fees for selected results. Round-trip lookups first select complete return itineraries. Failed lookups retain the flight with bookingStatus. Chargable Event: each lookup is an additional HTTP request. A run-wide hard cap allows at most 500 lookups total.", "default": false }, "maxBookingDetails": { "title": "Maximum booking lookups per search", "minimum": 0, "maximum": 20, "type": "integer", "description": "Only the first N eligible returned itineraries per search receive booking lookups. Default 10, maximum 20; zero disables them. A run-wide hard cap also allows at most 20 lookups total.", "default": 10 }, "returnFlightsTop": { "title": "Return flights for top N outbounds", "minimum": 0, "maximum": 100, "type": "integer", "description": "Round trips: price return alternatives for these leading outbound flights. One additional fare check is charged per outbound searched, regardless of alternatives returned; shared run cap is 500 checks.", "default": 0 }, "returnFlightsPerOutbound": { "title": "Return alternatives per outbound", "minimum": 1, "maximum": 100, "type": "integer", "description": "Maximum alternatives saved per selected outbound.", "default": 5 }, "includeCalendarPrices": { "title": "Include calendar prices", "type": "boolean", "description": "Fetch cheapest available fares for nearby dates or departure/return pairs. Each priced date/pair is an additional fare check; a shared cap allows up to 500 per run. Calendar failures retain flight results and appear in the run summary.", "default": false }, "calendarMode": { "title": "Calendar mode", "enum": [ "graph", "grid", "picker" ], "type": "string", "description": "Graph varies departure dates and keeps trip length; grid independently varies both dates; picker emits fixed-length date pairs. Multi-city calendars cover the first route.", "default": "graph" }, "calendarDays": { "title": "Calendar window (days)", "minimum": 1, "maximum": 90, "type": "integer", "description": "Graph/picker: number of dates (maximum 90). Grid: odd centered window per direction (maximum 15), up to 225 date pairs. All optional fare checks share a 500-per-run cap. Smaller windows reduce work and cost.", "default": 7 }, "priceGraphDays": { "title": "Forward price graph (advanced)", "minimum": 0, "maximum": 330, "type": "integer", "description": "Alternative graph window up to 330 dates, split into chunks. Priced dates share the 500 additional fare-check cap per run. Used when Include calendar prices is off. Zero disables it.", "default": 0 }, "includeLccFares": { "title": "Include direct Ryanair fare supplement", "type": "boolean", "description": "Append separately labelled Ryanair fares for a single adult in economy on one airport pair, without bag-price filters. Other passenger/cabin configurations receive a summary warning. Does not fabricate group fares.", "default": false }, "includeRawData": { "title": "Preserve full response", "type": "boolean", "description": "Save full Google responses separately in the key-value store. Dataset rows include a rawDataKey reference, never the raw flight array.", "default": false }, "searchMode": { "title": "Search URL mode", "enum": [ "structured", "natural" ], "type": "string", "description": "Structured encodes airports, dates, cabin, stops and passengers into the Google Flights tfs URL. Natural uses the legacy text query. Ignored when Google Flights URLs are populated.", "default": "structured" } } }, "runsResponseSchema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "actId": { "type": "string" }, "userId": { "type": "string" }, "startedAt": { "type": "string", "format": "date-time", "example": "2025-01-08T00:00:00.000Z" }, "finishedAt": { "type": "string", "format": "date-time", "example": "2025-01-08T00:00:00.000Z" }, "status": { "type": "string", "example": "READY" }, "meta": { "type": "object", "properties": { "origin": { "type": "string", "example": "API" }, "userAgent": { "type": "string" } } }, "stats": { "type": "object", "properties": { "inputBodyLen": { "type": "integer", "example": 2000 }, "rebootCount": { "type": "integer", "example": 0 }, "restartCount": { "type": "integer", "example": 0 }, "resurrectCount": { "type": "integer", "example": 0 }, "computeUnits": { "type": "integer", "example": 0 } } }, "options": { "type": "object", "properties": { "build": { "type": "string", "example": "latest" }, "timeoutSecs": { "type": "integer", "example": 300 }, "memoryMbytes": { "type": "integer", "example": 1024 }, "diskMbytes": { "type": "integer", "example": 2048 } } }, "buildId": { "type": "string" }, "defaultKeyValueStoreId": { "type": "string" }, "defaultDatasetId": { "type": "string" }, "defaultRequestQueueId": { "type": "string" }, "buildNumber": { "type": "string", "example": "1.0.0" }, "containerUrl": { "type": "string" }, "usage": { "type": "object", "properties": { "ACTOR_COMPUTE_UNITS": { "type": "integer", "example": 0 }, "DATASET_READS": { "type": "integer", "example": 0 }, "DATASET_WRITES": { "type": "integer", "example": 0 }, "KEY_VALUE_STORE_READS": { "type": "integer", "example": 0 }, "KEY_VALUE_STORE_WRITES": { "type": "integer", "example": 1 }, "KEY_VALUE_STORE_LISTS": { "type": "integer", "example": 0 }, "REQUEST_QUEUE_READS": { "type": "integer", "example": 0 }, "REQUEST_QUEUE_WRITES": { "type": "integer", "example": 0 }, "DATA_TRANSFER_INTERNAL_GBYTES": { "type": "integer", "example": 0 }, "DATA_TRANSFER_EXTERNAL_GBYTES": { "type": "integer", "example": 0 }, "PROXY_RESIDENTIAL_TRANSFER_GBYTES": { "type": "integer", "example": 0 }, "PROXY_SERPS": { "type": "integer", "example": 0 }, "PROXY_UNBLOCKER_UNITS": { "type": "integer", "example": 0 } } }, "usageTotalUsd": { "type": "number", "example": 0.00005 }, "usageUsd": { "type": "object", "properties": { "ACTOR_COMPUTE_UNITS": { "type": "integer", "example": 0 }, "DATASET_READS": { "type": "integer", "example": 0 }, "DATASET_WRITES": { "type": "integer", "example": 0 }, "KEY_VALUE_STORE_READS": { "type": "integer", "example": 0 }, "KEY_VALUE_STORE_WRITES": { "type": "number", "example": 0.00005 }, "KEY_VALUE_STORE_LISTS": { "type": "integer", "example": 0 }, "REQUEST_QUEUE_READS": { "type": "integer", "example": 0 }, "REQUEST_QUEUE_WRITES": { "type": "integer", "example": 0 }, "DATA_TRANSFER_INTERNAL_GBYTES": { "type": "integer", "example": 0 }, "DATA_TRANSFER_EXTERNAL_GBYTES": { "type": "integer", "example": 0 }, "PROXY_RESIDENTIAL_TRANSFER_GBYTES": { "type": "integer", "example": 0 }, "PROXY_SERPS": { "type": "integer", "example": 0 }, "PROXY_UNBLOCKER_UNITS": { "type": "integer", "example": 0 } } } } } } } } }}OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.
OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.
By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.
You can download the OpenAPI definitions for Google Flights from the options below:
If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.
You can also check out our other API clients: