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.

Request samples

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

We use synchronous Realtime integration method in our examples. If you would like to use Proxy Endpoint or asynchronous Push-Pull integration, refer to the integration methods section.

Request parameter values

Generic

Basic setup and customization options for scraping Google Travel: Hotels results.

- mandatory parameter

Localization

Adapt search results to specific geographical locations, domains, and languages.

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

Pagination

Controls for managing the pagination.

Filtering

Advanced options for tailoring and refining the search context.

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