Google Flights Search API
Pricing
from $1.20 / 1,000 successful flight searches
Google Flights Search API
Fast and reliable Google Flights Search API for retrieving flight prices, airlines, schedules, durations, airport details, price insights, carbon emissions, and booking data in structured JSON. Supports one-way, round-trip, localization, and multiple travel classes.
Pricing
from $1.20 / 1,000 successful flight searches
Rating
5.0
(1)
Developer
Gaurav Kumar Choudhary
Maintained by CommunityActor stats
2
Bookmarked
1
Total users
0
Monthly active users
12 days ago
Last modified
Categories
Security
Limited permissionsShare
Google Flights Search API — Prices, Airlines & Itineraries
At a glance
- Collect: One route/date flight search; available fares, segments and price insights.
- Input: use the runnable example below or the prefilled Input form.
- Output: the default dataset supports JSON/CSV/Excel export; see output modes below.
- Billing: $1.20–$1.50 per 1,000 successful searches, depending on plan. One search is one charge, not one itinerary. No startup fee. Platform usage may be additional.
- Limits: No ticket purchasing, guaranteed fare, multi-city search or exhaustive inventory.
Search one-way and round-trip flights with airport codes, travel dates, cabin and stop filters. Retrieve available fares, flight segments, layovers, journey duration, carbon emissions and price insights as structured JSON in the dataset and OUTPUT record.
Service status
Service authentication was restored and an end-to-end Delhi-to-Patna search succeeded on October 5, 2026. Availability and fares depend on the selected route and travel dates.
Airport examples
| Airport | Code |
|---|---|
| New York — John F. Kennedy | JFK |
| Los Angeles | LAX |
| London — Heathrow | LHR |
| Delhi | DEL |
| Patna | PAT |
| Dubai | DXB |
| Singapore — Changi | SIN |
Enter codes rather than city names. Lowercase codes work too. For example, use JFK to LAX or DEL to PAT. Multiple departure airports can be entered as JFK,LGA,EWR. A correctly formatted code must still identify an airport supported by the search service.
Configure
- Open the Actor's Input tab.
- Provide departure and destination codes. Enter a future outbound date, or leave it blank to search 30 days from the current UTC day.
- Choose currency and filters, then start the run and open its dataset.
Example input:
{"departureId": "JFK","arrivalId": "LAX","outboundDaysFromToday": 30,"adults": 2,"travelClass": 3,"stops": 1,"sortBy": 2,"currency": "USD"}
Leave type empty to infer a round trip from returnDate, or explicitly choose 1 for round trip and 2 for one way. Replace example dates with future travel dates. For India results, choose gl: "in" and currency: "INR".
The default JFK-to-LAX example uses outboundDaysFromToday: 30 so it stays current for scheduled runs and automated tests. An explicit outboundDate takes priority. Past explicit dates are rejected, not silently changed; round trips still require a valid explicit return date.
showHidden: true includes additional itineraries; some may not have quoted prices. Cabin, stop, airline and passenger filters are available in the input form. Multi-city trips, ticket purchasing, baggage filters and automatic date-range searches are not supported.
Output
One dataset item is written per run, including search_parameters, best_flights, other_flights, price_insights, and airports. The same response is also available in the default key-value store as OUTPUT.
API integration
POST your input JSON to https://api.apify.com/v2/acts/lLZLUFNhij9CXCOBt/run-sync-get-dataset-items with your Apify token in the Authorization: Bearer YOUR_APIFY_TOKEN header. For longer jobs use /runs and retrieve the completed run's dataset. The Actor's API tab provides generated client examples.
Troubleshooting
INVALID_INPUT identifies fields that need correction. SEARCH_UNAVAILABLE means the search could not complete. Failed searches mark the run as failed. Service credentials and raw internal errors are not returned.
An empty flight list can mean no matching itineraries. Missing prices are not free tickets. Fares can change before booking; a booking token is not a confirmed reservation. Dates are validated against the UTC date.
Minimal API example
Store your own Apify token in APIFY_TOKEN; never paste it into public input or code. This example uses the same small input as the prefilled form.
import osimport requestsresponse = requests.post("https://api.apify.com/v2/acts/gauravlabs~google-flights-search-api/run-sync-get-dataset-items",headers={"Authorization": "Bearer " + os.environ["APIFY_TOKEN"]},json={"departureId":"JFK","arrivalId":"LAX","outboundDaysFromToday":30},timeout=300,)response.raise_for_status()print(response.json())
For large batches, start an asynchronous run with /runs, wait for its final status, and retrieve its default dataset. HTTP success when starting a run does not prove the extraction succeeded.
Minimal output shape (illustrative)
The following shows one documented field, not a fresh result or a promised yield. Inspect the output reference above for the complete schema.
{"flightOverview": []}
Practical workflow and accuracy notes
flightOverview contains compact itinerary comparisons with price, currency, airlines, stops, duration, airport IDs and available local-time strings. fetchedAt is UTC collection time. Original flight arrays are preserved; missing prices/times remain null. The overview adds no extra charge.