WebScrapingAPI Docs
Search Engine APIsGoogle Search APIGoogle Search Engines

Google Hotels API

Scrape Google Hotels search results and return structured hotel availability, pricing, rating, and location data.

Scrape Google Hotels and receive structured hotel search data.

To enable this engine, set engine=google_hotels.

The Google Hotels API extracts structured hotel data directly from Google's hotel search results. Whether you are looking for availability, pricing, ratings, or location-specific listings, this engine returns a detailed JSON response that reflects real-time results.

Google Hotels Search Page

Google Hotels Search Page

Google Hotels API Integration Examples

We will use the following URL as an example request:

https://serpapi.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&engine=google_hotels&type=search&q=hotels+in+cancun&check_in_date=2025-08-01&check_out_date=2025-08-03

Ready to Use Google Hotels Scraping Scripts

curl --request GET \
  --url "https://serpapi.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&engine=google_hotels&type=search&q=hotels+in+cancun&check_in_date=2025-08-01&check_out_date=2025-08-03"
const response = await fetch("https://serpapi.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&engine=google_hotels&type=search&q=hotels+in+cancun&check_in_date=2025-08-01&check_out_date=2025-08-03", {
  method: "GET"
});

const data = await response.text();
console.log(data);
import http.client

connection = http.client.HTTPSConnection("serpapi.webscrapingapi.com")
connection.request("GET", "/v2?api_key=<YOUR_API_KEY>&engine=google_hotels&type=search&q=hotels+in+cancun&check_in_date=2025-08-01&check_out_date=2025-08-03")

response = connection.getresponse()
data = response.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://serpapi.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&engine=google_hotels&type=search&q=hotels+in+cancun&check_in_date=2025-08-01&check_out_date=2025-08-03",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$error = curl_error($curl);

curl_close($curl);

echo $error ? "cURL Error #: " . $error : $response;
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
)

func main() {
	requestURL := "https://serpapi.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&engine=google_hotels&type=search&q=hotels+in+cancun&check_in_date=2025-08-01&check_out_date=2025-08-03"

	response, err := http.Get(requestURL)
	if err != nil {
		log.Fatal(err)
	}
	defer response.Body.Close()

	body, err := io.ReadAll(response.Body)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(string(body))
}
HttpResponse<String> response = Unirest
    .get("https://serpapi.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&engine=google_hotels&type=search&q=hotels+in+cancun&check_in_date=2025-08-01&check_out_date=2025-08-03")
    .asString();

System.out.println(response.getBody());
var client = new RestClient("https://serpapi.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&engine=google_hotels&type=search&q=hotels+in+cancun&check_in_date=2025-08-01&check_out_date=2025-08-03");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);

Console.WriteLine(response.Content);
require "uri"
require "net/http"
require "openssl"

url = URI("https://serpapi.webscrapingapi.com/v2?api_key=<YOUR_API_KEY>&engine=google_hotels&type=search&q=hotels+in+cancun&check_in_date=2025-08-01&check_out_date=2025-08-03")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
response = http.request(request)

puts response.read_body

Google Hotels Specific Parameters

Query Parameter

ParameterTypeRequiredDescription
qstringRequired when type=search. The keywords used to search on Google Hotels.
pidstringRequired when type=place. The pid value of the hotel, available from a type=search request.

Request Customization Parameters

ParameterTypeRequiredDescription
typestringType of search. Supported values are search for hotels in an area and place for prices for a specific hotel.
check_in_datestringCheck-in date in YYYY-MM-DD format.
check_out_datestringCheck-out date in YYYY-MM-DD format.
occupancystringNumber of guests. Examples: 2 for two adults, 1,2 for one adult and one child aged 2, or 1,2,2 for one adult and two children aged 2.
free_cancellationstringWhether the offer has free cancellation. Supported values are 1 and 0.
accomodation_typestringAvailable only when type=search. Supported values are hotels and vacation_rentals.
currencystringCurrency used to show prices, provided as a 3-letter code.

Device and Geolocation Parameters

ParameterTypeRequiredDescription
devicestringDevice type used for the search. Supported values include desktop, mobile, and tablet.
glstringCountry code used to localize the Google Hotels search.
hlstringInterface language for the Google Hotels search.

Response example

{
  "overview": {
    "type": "hotels_selection",
    "title": "hotels in cancun",
    "check_in_date": "2025-08-01",
    "check_out_date": "2025-08-03"
  },
  "organic": [
    {
      "name": "Grand Hotel Cancun",
      "rating": 4.6,
      "reviews": 2140,
      "price": "$218",
      "link": "https://www.google.com/travel/hotels/entity/example"
    }
  ]
}

On this page