Site icon DataForSEO

How to collect prices from Google Hotel Search?

You can use Business Data API to collect hotel prices from Google Hotel Search. It takes a few simple steps.

1 Call the Hotel Searches endpoint.

POST https://api.dataforseo.com/v3/business_data/google/hotel_searches/task_post

2 Add the keyword field to the Task POST body and specify the keyword you would like to use for hotel search. Note that this field is optional, so you can skip it. If you ignore the field, the API will return country-specific results for the country specified in the location_name, location_code or location_coordinate field. To narrow down the results, you should add a keyword that indicates a specific location. Example: "keyword": "cheap hotels New York"

3 Specify location_name, location_code or location_coordinate.

You will receive the full list of available locations by making a separate request to the Locations endpoint.

GET https://api.dataforseo.com/v3/business_data/google/locations

4 Specify language_name or language code.

You will receive the full list of available languages by making a separate request to the Languages endpoint.

GET https://api.dataforseo.com/v3/business_data/google/languages

5 Specify the check_in and check_out parameters. Use the yyyy-mm-dd date format. Example: ”check_in”: “2021-10-19”.

If you ignore the check_in parameter, tomorrow’s date will be used by default. If you don’t specify the check_out field, the API will apply the date that is two days from today’s date.

6 Add the adults and children fields to the Task POST body and specify the number of adults and children you would like to find hotel rooms for.

In the adults field you should just set the number of adults. Example: ”adults”: 2 However, in the children array, you should specify the age of children instead. For example, if you search a room for two kids 5 and 8 years old, the array should be structured as in the following example: ”children”: [5, 8]

Note that you can specify up to 4 persons, including both adults and children.

If you ignore the adults field, the API will use two adults by default. If you don’t specify the children field, no children will be included in the search.

7 Set the number of hotels to be returned in the API response by adding the depth field to the Task POST array.

Please note that your account will be billed per every 12 organic results regardless of paid listings in the response. Thus, setting the depth above 12 will result in additional charges if Google Hotels return more than 12 results. Alternatively, if the specified depth is higher than the number of results in the response, the difference will be refunded automatically to your account balance.

The default depth value is 12. The maximum depth value is 84.

Your Task POST request should be structured as in the example below:

[
    {
        "location_name": "New York,New York,United States",
        "language_name": "English",
        "check_in": "2021-10-25",
        "check_out": "2021-10-30",
        "depth": 12
    }
]

8 Once the POST request is set, send it and copy your task ID from the API response.

9 Use the task ID to retrieve the results from the Task GET endpoint.

GET https://api.dataforseo.com/v3/business_data/google/hotel_searches/task_get/$id

Example of the response in JSON:

{
    "version": "0.1.20210917",
    "status_code": 20000,
    "status_message": "Ok.",
    "time": "0.0642 sec.",
    "cost": 0,
    "tasks_count": 1,
    "tasks_error": 0,
    "tasks": [
        {
            "id": "10191149-2806-0290-0000-de351f235919",
            "status_code": 20000,
            "status_message": "Ok.",
            "time": "0.0170 sec.",
            "cost": 0,
            "result_count": 1,
            "path": [
                "v3",
                "business_data",
                "google",
                "hotel_searches",
                "task_get",
                "10191149-2806-0290-0000-de351f235919"
            ],
            "data": {
                "se_type": "hotels",
                "se": "google",
                "api": "business_data",
                "function": "hotel_searches",
                "location_name": "New York,New York,United States",
                "language_name": "English",
                "check_in": "2021-10-25",
                "check_out": "2021-10-30",
                "depth": 12,
                "device": "desktop",
                "os": "windows"
            },
            "result": [
                {
                    "keyword": "New York,New York,United States",
                    "location_code": 1023191,
                    "language_code": "en",
                    "check_url": "https://www.google.com/travel/hotels/New+York%2cNew+York%2cUnited+States?ts=CAESCAoCCAMKAggDGkMKJRIhOh9OZXcgWW9yayxOZXcgWW9yayxVbml0ZWQgU3RhdGVzGgASGhIUCgcI5Q8QChgZEgcI5Q8QChgeGAUyAhAAKg8KCygBSgIgAToDVVNEGgA&hl=en&gl=US",
                    "datetime": "2021-10-19 08:49:54 +00:00",
                    "items_count": 16,
                    "items": [
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "CgoIyNSNluH9xs8nEAEafkFHWklFZ2FsVVNxeXlBM3NWUDdad05XWVUwWV9rcWlBN0ZkazBqWG9tLTV2SWlCWmpXc1d6TU9STkJ1emw2dl9HOFR1MXpxYy0yUy02bHBjRjF5SUctVVZrWllkQ3dRRHNNTFJrQzByNHVTZDdWQ1VVQ1hxdG1WWWVjckhyQQ",
                            "title": "Warwick New York",
                            "stars": 4,
                            "is_paid": true,
                            "location": {
                                "latitude": 40.762464,
                                "longitude": -73.978101
                            },
                            "reviews": {
                                "value": 4.2,
                                "votes_count": 1713,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 234,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": null,
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "CgsI29ip8cuQlsjPARABGnxBR1pJRWdZTmlXUHdRS1RHSmhXTFFJT2k0bHlHLU1TVXNtM1NwbjdUWjNLdDluWThnSG9OUzR1SWY1Z1dUUUdxdjB3azlwNUo4WjRmTnBtTjZIcW9iU3hQaHlfSFNsY2ROUlZldmxpMXpxVENGb1k4NE9teGFrbENSM3JX",
                            "title": "Hotel on Rivington",
                            "stars": 4,
                            "is_paid": true,
                            "location": {
                                "latitude": 40.719761999999996,
                                "longitude": -73.98809299999999
                            },
                            "reviews": {
                                "value": 4.2,
                                "votes_count": 580,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 351,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": null,
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChkIuuav9KbOg9kvGg0vZy8xMWMybnF4NXFtEAE",
                            "title": "DoubleTree by Hilton Hotel New York Times Square West",
                            "stars": 4,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.7566361,
                                "longitude": -73.9930715
                            },
                            "reviews": {
                                "value": 3.7,
                                "votes_count": 3743,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 144,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": null,
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChUI9r76narMz6IxGgkvbS8wYzdocTkQAQ",
                            "title": "The New Yorker Hotel",
                            "stars": 3,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.7526686,
                                "longitude": -73.9935648
                            },
                            "reviews": {
                                "value": 0,
                                "votes_count": 7829,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 134,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": null,
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChgI7amOooeH09krGgwvZy8xMnFmeHdsMWsQAQ",
                            "title": "Pod 51 Hotel",
                            "stars": 3,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.7557851,
                                "longitude": -73.9690935
                            },
                            "reviews": {
                                "value": 4.1,
                                "votes_count": 2705,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 129,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": null,
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChkIu7iEoIe44olUGg0vZy8xMWJ0bF92OHB5EAE",
                            "title": "Radisson Hotel New York Midtown-Fifth Avenue",
                            "stars": 3,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.7599904,
                                "longitude": -73.97823269999999
                            },
                            "reviews": {
                                "value": 3.9,
                                "votes_count": 1205,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 149,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": null,
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChoQv7_H7bqklJa9ARoNL2cvMTFqM3ZocGtfdhAC",
                            "title": "Sonder | Serene Studio at One Platt",
                            "stars": 0,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.7072639465332,
                                "longitude": -74.005859375
                            },
                            "reviews": {
                                "value": 0,
                                "votes_count": 0,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 252,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": null,
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChUIyNSNluH9xs8nGgkvbS8wYndtMXIQAQ",
                            "title": "Warwick New York",
                            "stars": 4,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.762464099999995,
                                "longitude": -73.9781009
                            },
                            "reviews": {
                                "value": 4.2,
                                "votes_count": 1713,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 182,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": "31% less than usual",
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChoIxK2h8a6ktYmWARoNL2cvMTFmeHltZ2YzYhAB",
                            "title": "Holiday Inn Manhattan-Financial District",
                            "stars": 3,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.7082705,
                                "longitude": -74.01408909999999
                            },
                            "reviews": {
                                "value": 4.1,
                                "votes_count": 2758,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 141,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": null,
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChoI0dHFsf3AycHrARoNL2cvMTFkeGRsZjU3bhAB",
                            "title": "Hilton Garden Inn New York Times Square South",
                            "stars": 3,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.754482499999995,
                                "longitude": -73.99359849999999
                            },
                            "reviews": {
                                "value": 4.3,
                                "votes_count": 899,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 175,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": "15% less than usual",
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChcIqO3l7L7A0vDxARoKL20vMHdmZ19iNhAB",
                            "title": "InterContinental New York Times Square, an IHG Hotel",
                            "stars": 4,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.75866080000001,
                                "longitude": -73.9893761
                            },
                            "reviews": {
                                "value": 4.3,
                                "votes_count": 2909,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 253,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": null,
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChcIhtK894jcn48hGgsvZy8xdGZfajlfMxAB",
                            "title": "Hilton Garden Inn Times Square",
                            "stars": 3,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.7612054,
                                "longitude": -73.9865068
                            },
                            "reviews": {
                                "value": 4.2,
                                "votes_count": 2045,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 165,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": null,
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChkI2fTmp6-qjK0VGg0vZy8xMWNsX2w5ODRsEAE",
                            "title": "EVEN Hotel New York - Midtown East, an IHG Hotel",
                            "stars": 4,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.7518354,
                                "longitude": -73.9723757
                            },
                            "reviews": {
                                "value": 4.4,
                                "votes_count": 978,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 177,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": "19% less than usual",
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChkIn7SxzeGElrllGg0vZy8xMWI3MnA2ZG1xEAE",
                            "title": "Holiday Inn New York City - Times Square, an IHG Hotel",
                            "stars": 3,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.7552207,
                                "longitude": -73.99165959999999
                            },
                            "reviews": {
                                "value": 4.1,
                                "votes_count": 2038,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 164,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": null,
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChoQi_Dhjay7pcKgARoNL2cvMTFyNnd2M210NxAC",
                            "title": "Yorkville Apartments 30 Day Stays One Bedroom",
                            "stars": 0,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.775306701660156,
                                "longitude": -73.9491958618164
                            },
                            "reviews": {
                                "value": 0,
                                "votes_count": 0,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 146,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": null,
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        },
                        {
                            "type": "hotel_search_item",
                            "hotel_identifier": "ChkIoJOJvKHI5JoHGg0vZy8xMWc4N2JoaGM3EAE",
                            "title": "Pod Times Square Hotel",
                            "stars": 3,
                            "is_paid": false,
                            "location": {
                                "latitude": 40.758386,
                                "longitude": -73.9930976
                            },
                            "reviews": {
                                "value": 0,
                                "votes_count": 880,
                                "mentions": null,
                                "rating_distribution": null,
                                "other_sites_reviews": null
                            },
                            "overview_images": null,
                            "prices": {
                                "price": 128,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": "23% less than usual",
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }
                        }
                    ]
                }
            ]
        }
    ]
}

You will find hotel pricing data in the prices object of the response.

{
                            "prices": {
                                "price": 128,
                                "price_without_discount": null,
                                "currency": "USD",
                                "discount_text": "23% less than usual",
                                "check_in": "2021-10-25 00:00:00 +00:00",
                                "check_out": "2021-10-30 00:00:00 +00:00",
                                "visitors": 2,
                                "items": null
                            }

}

Exit mobile version