Google Travel Explore API Documentation
Google Travel Explore API allows the retrieval of insights into possible travel options without specifying exact routes or dates.
API Parameters
Search Query
-
- Name
-
departure_id - Required
- Required
- Description
-
This parameter specifies the code for the departure airport or a location identifier. Available options can be:
- Airport Code: A 3-letter code representing the departure airport (e.g., MAD for Madrid-Barajas Airport or JFK for John F. Kennedy International Airport). You can find these codes using resources like Google Flights or IATA.
-
Location Identifier (kgmid): A string that begins with /m/, used to represent a specific location. You can find this identifier on Wikidata by looking for the "Freebase ID" while searching for location. For example,
/m/02_286is the identifier for New York,United States.
-
- Name
-
arrival_id - Required
- Optional
- Description
-
This parameter specifies the code for the arrival location identifier. Available options can be:
-
Location Identifier (kgmid): A string that begins with /m/, used to represent a specific location. You can find this identifier on Wikidata by looking for the "Freebase ID" while searching for location. While Google Flights also supports kgmid, this API allows you to search broader geographical regions that aren't available in Google Flights. For example,
/m/09b69is the identifier for Eastern Europe. -
Bounding Box (Array): A geographic boundary defined by two sets of latitude and longitude coordinates. The format is
[[lat1, lon1], [lat2, lon2]], where:lat1, lon1represent the top-left corner of the bounding box.lat2, lon2represent the bottom-right corner.
/m/02j71which is the identifier for Earth (anywhere). -
Location Identifier (kgmid): A string that begins with /m/, used to represent a specific location. You can find this identifier on Wikidata by looking for the "Freebase ID" while searching for location. While Google Flights also supports kgmid, this API allows you to search broader geographical regions that aren't available in Google Flights. For example,
Filters
-
- Name
-
time_period - Required
- Optional
- Description
-
Specifies the travel duration, time range, and whether the trip is one-way or round-trip. Available options are:
Round-Trip Options-
one_week_trip_in_the_next_six_monthsDefault two_week_trip_in_the_next_six_monthsone_week_trip_in_{month}two_week_trip_in_{month}weekend_trip_in_the_next_six_monthsweekend_in_{month}
trip_in_the_next_six_monthstrip_in_{month}
{month}placeholder is dynamically generated and only allows values for the current and next six months.You can also specify a custom date using the format
YYYY-MM-DDfor one-way trips, andYYYY-MM-DD..YYYY-MM-DDfor round-trips, as long as the dates are not more than 11 months in the future. -
-
- Name
-
travel_mode - Required
- Optional
- Description
-
Determines whether to include destinations reachable by car. Allowed options are:
-
allDefault flights_only
-
-
- Name
-
travel_class - Required
- Optional
- Description
-
Specifies the travel class. Allowed options are:
-
economyDefault premium_economybusinessfirst_class
-
-
- Name
-
interests - Required
- Optional
- Description
-
Specifies the interests of the traveler. Allowed options are:
-
popularDefault outdoorsbeachesmuseumshistoryskiing
Note: This parameter is incompatible with
travel_mode=flights_onlysince flight-only searches do not include destination-specific features. -
-
- Name
-
stops - Required
- Optional
- Description
-
Specifies the number of stops. Allowed options are:
-
anyDefault nonstopone_stop_or_fewertwo_stops_or_fewer
-
-
- Name
-
max_price - Required
- Optional
- Description
-
Defines the maximum ticket price.
-
- Name
-
max_flight_duration - Required
- Optional
- Description
-
Defines the maximum flight duration in minutes. (e.g., 240 for 4 hours)
-
- Name
-
carry_on_bags - Required
- Optional
- Description
-
Defines the number of carry-on bags. Default is
0.
Note: The number cannot exceed the total number of passengers (adults+children+infants_in_seat).
-
- Name
-
included_airlines - Required
- Optional
- Description
-
Specifies the airlines to include in the search. You can specify multiple airlines separated by commas. Allowed options are:
ONEWORLDSKYTEAMSTAR_ALLIANCE
Passengers
-
- Name
-
adults - Required
- Optional
- Description
-
Defines the number of adults. Default is 1. Maximum total number of passengers (adults + children + infants_in_seat + infants_on_lap) is 9.
-
- Name
-
children - Required
- Optional
- Description
-
Defines the number of children. Default is 0.
-
- Name
-
infants_in_seat - Required
- Optional
- Description
-
Defines the number of infants in seat. Default is 0.
-
- Name
-
infants_on_lap - Required
- Optional
- Description
-
Defines the number of infants on lap. Default is 0.
Note: You must have at least one adult per two infants.
Localization
-
- Name
-
gl - Required
- Optional
- Description
-
The default parameter
usdefines the country of the search. Check the full list of supported Google Travelglcountries.
-
- Name
-
hl - Required
- Optional
- Description
-
The default parameter
en-USdefines the interface language of the search. Check the full list of supported Google Travelhllanguages.
-
- Name
-
currency - Required
- Optional
- Description
-
Defines the currency of the returned prices. Default is
USD. Check the full list of supported Google Travelcurrencyvalues.
Engine
-
- Name
-
engine - Required
- Required
- Description
-
Parameter defines an engine that will be used to retrieve real-time data. It must be set to
google_travel_explore.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
The
api_keyauthenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).
Zero Data Retention
-
- Name
-
zero_retention - Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set this parameter to
trueto disable all logging and persistent storage. No request parameters, HTML, or JSON responses are stored or logged. Suitable for high-compliance use cases. Debugging and support may be limited while enabled.
API Examples
Search from New York to Anywhere
https://www.searchapi.io/api/v1/search?departure_id=%2Fm%2F02_286&engine=google_travel_explore
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "google_travel_explore",
"departure_id": "/m/02_286"
}
response = requests.get(url, params=params)
print(response.text)
{
"destinations": [
{
"name": "Toronto",
"kgmid": "/m/0h7h6",
"primary_airport": "YYZ",
"country": "Canada",
"coordinates": [
43.653226,
-79.3831843
],
"distance": "342 mi",
"avg_cost_per_night": 178,
"driving_duration": "8hr",
"driving_duration_minutes": 480,
"outbound_date": "2025-05-31",
"return_date": "2025-06-07",
"image": "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcRYoaDkFWO8Zv4BUtmfOHDd3QvGJZci9lqWZfFVV90hiu-LIfCYQxG7KdPHrsY1qybwY_7HsDhO2sgzed6ynG04_NxiRZQlZhjUvR8K3A",
"flight": {
"airport_code": "YYZ",
"price": 91,
"stops": 0,
"flight_duration": "1hr 45min",
"flight_duration_minutes": 105,
"airline_code": "F8",
"airline_name": "Flair Airlines",
"departure_city_kgmid": "/m/02_286"
}
},
...
]
}
Search from San Francisco to custom bounding box
https://www.searchapi.io/api/v1/search?arrival_id=%5B%5B89.81454934716177%2C-11.382087280677055%5D%2C%5B133.93564309716177%2C16.773985017700454%5D%5D&departure_id=%2Fm%2F0d6lp&engine=google_travel_explore
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "google_travel_explore",
"departure_id": "/m/0d6lp",
"arrival_id": "[[89.81454934716177,-11.382087280677055],[133.93564309716177,16.773985017700454]]"
}
response = requests.get(url, params=params)
print(response.text)
{
"destinations": [
{
"name": "Bali",
"kgmid": "/g/121hxh1j",
"primary_airport": "DPS",
"country": "Indonesia",
"coordinates": [
-8.4095178,
115.188916
],
"avg_cost_per_night": 39,
"outbound_date": "2025-08-18",
"alternative_outbound_date": "2025-08-20",
"return_date": "2025-08-24",
"image": "https://encrypted-tbn2.gstatic.com/licensed-image?q=tbn:ANd9GcRL2CzkKbrZEinzxfXijSFjsr3SRZzMO66-3aKlwUGPwy-N9y1e8dx3rYoONSkotsHVlsNUqjUm25LOjJUoH5RzVAMjXtB7T8Roh6_vWw",
"flight": {
"city": "Denpasar",
"city_kgmid": "/m/02nbh1",
"airport_code": "DPS",
"price": 736,
"stops": 1,
"flight_duration": "25hr 35min",
"flight_duration_minutes": 1535,
"driving_duration": "2hr",
"driving_duration_minutes": 120,
"airline_code": "CX",
"airline_name": "Cathay Pacific",
"departure_city_kgmid": "/m/0d6lp"
}
},
...
]
}