Google Flights API
Google Flights API
Our Google Flights API allows you to scrape flight results from Google Flights.
The API is accessed through the following endpoint: /search?engine=google_flights
.
Api Details
Endpoint
GET https://serpapi.abcproxy.com/search
Description Retrieve comprehensive user profile including
basic info
,account status
and optionalpermission sets
.
Request
HTTP Request
API Parameters
Search Query
departure_id
string
No
PEK
arrival_id
string
No
AUS
Localization
gl
string
No
Amgola-ao
hl
string
No
Akan-ak
currency
string
No
-
Advanced Parameters
outbound_date
string
No
Parameter defines the outbound date. The format is YYYY-MM-DD.
2025-02-06
return_date
string
No
Parameter defines the return date. The format is YYYY-MM-DD.
2025-02-12
Serpapi Parameters
engine
string
Yes
Set parameter to google_flights
to use the Google Flights API engine.
google_flights
no_cache
boolean
No
Parameter will force SerpApi to fetch the Google Flights results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false
(default) to allow results from the cache, or true
to disallow results from the cache. no_cache and async parameters should not be used together.
true
orfalse
api_key
string
Yes
Parameter defines the SerpApi private key to use.
YOUR_API_KEY
Response
Success 200
Response Body
Response Fields
search_metadata
object
Contains timing
and status information
search_parameters
object
Contains query parameters
and search context
best_flights
object []
Best Flight Information
other_flights
object []
Other flight information
price_insights
object
Price action information
airports
object []
Airport information
Error Responses
Common Errors
200
400
API Key can not be empty
200
401
Param error
200
402
API Key error
200
403
Insufficient Balance
200
404
Deduction failed
200
405
Failed to record usage count
200
406
Unsupported engine
200
407
Network error
200
408
File not found
200
409
Limit param error
200
410
Build url error
200
411
Failed to QueryRecentRecord
200
412
Failed to find json
200
413
Get html error
200
414
HTML is empty
200
429
Too many request
Error Example
Last updated