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.

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.

curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "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.

Query parameters

- 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

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
        }
    ]
}

Last updated