Travel: Hotels

The google_travel_hotels data source is designed to retrieve Google Travel service's hotel search results.

To ensure optimal utilization of this service, include the "render": "html" parameter in your request.

Query parameters

ParameterDescriptionDefault Value

source

Data source. More info.

google_travel_hotels

domain

Domain localization for Google. The full list of available domains can be found here.

com

query

UTF-encoded keyword. "query": "hotels" will result list hotels in a given geo_location; "query": "hotels in <Location>" will result in a list hotels for <Location>. Eg hotels in Paris will list hotels in Paris, no matter what geo_location is given.

-

start_page

Starting page number

1

locale

Accept-Language header value which changes your Google search page web interface language. More info.

-

geo_location

The geographical location that the result should be adapted for. Using this parameter correctly is extremely important to get the right data. Please note that this source can accept a limited number of geo_location values - please check this section to see geo_location values that don't yield accurate results.

-

user_agent_type

Device type and browser. The full list can be found here.

desktop

render

Enables JavaScript rendering. More info.

-

callback_url

URL to your callback endpoint. More info.

-

context:adults

Number of adult guests

2

context:children

Number of children guests

-

context: hotel_classes

Filter results by # of hotel stars. You may specify one or more values between 2 and 5. Example: [3,4]

-

context: hotel_dates

Dates for staying at the hotel, from - to. Example: 2023-07-12,2023-07-13

-

- required parameter

NOTE: "geo_location": "United States" and other wide-area locations are not supported. Use city-level geo_location, e.g., Seattle,Washington,United States

Code examples

In this example, we make a request to retrieve the 2nd results page for hotel availability for 2 adult guests between 2023-10-01 and 2023-10-10 for 2 to 4-star hotels in Paris from google.com.

{
    "source": "google_travel_hotels",
    "domain": "com", 
    "start_page": 2, 
    "query": "hotels in Paris",
    "render": "html", 
    "context": [
        {
            "key": "adults", 
            "value": 2
        }, 
        {
            "key": "hotel_dates", 
            "value": "2023-10-01,2023-10-10"
        },
        {
            "key": "hotel_classes", 
            "value": [2,3,4]
        }]
}

The example above uses the Realtime integration method. If you would like to use some other integration method in your query (e.g. Push-Pull or Proxy Endpoint), refer to the integration methods section.

Output example

{
    "results": [
        {
            "content":"<!doctype html>\n<html lang=\"en\">\n<head>
            ...
            </script></body>\n</html>\n",            
            "created_at": "2024-02-13 11:30:09",
            "updated_at": "2024-02-13 11:30:36",
            "page": 2,
            "url": "https://www.google.com/travel/search?q=hotels%20in%20Paris&qs=OAA&hrf=OAI4AzgEWAGSAQIgAbABAA&ap=EgNDQXcwAGgA&ts=CAEaFhIUEhIKBwjnDxAKGAESBwjnDxAKGAo&uule=w%20CAIQICINdW5pdGVkIHN0YXRlcw&gl=us&hl=en&ved=0CAAQ5JsGahcKEwjIwci_m6iEAxUAAAAAHQAAAAAQew",
            "job_id": "7163132237108506625",
            "status_code": 200
        }
    ]
}

HTML example

Last updated