Google Hotels API
Effortlessly scrape hotel listings and pricing data from Google Hotels in real time, with location targeting and no captchas.
To enable this engine, set the engine=google_hotels parameter.
The Google Hotels API is built to extract structured hotel data directly from Google’s hotel search results. Whether you're looking for availability, pricing, ratings, or location-specific listings, this engine returns a detailed JSON response that reflects real-time results. As with other engines, you only need to send a simple GET request including your query parameters, and the API will return the relevant data in a clean and accessible format.

Google Hotels API Integration Examples
We will use the following URL as an example for this 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-03Ready 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 http = require("https");
const options = {
"method": "GET",
"hostname": "serpapi.webscrapingapi.com",
"port": null,
"path": "/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",
"headers": {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();import http.client
conn = http.client.HTTPSConnection("serpapi.webscrapingapi.com")
conn.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")
res = conn.getresponse()
data = res.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_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
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"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
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();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);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_bodyGoogle Hotels Specific Parameters
#1: Query Parameter
q
required
string
This parameter is required when type parameter is set to search.
The keywords used to search on Google Hotels.
pid
string
This parameter is required when type parameter is set to place.
The pid value of the hotel. Can be found sending an API request using the type=search parameter.
#2: Request Customization Parameters
type
required
string
The type of search. Possible values are search (to look for hotels in a certain area) and place (to search prices for a specific hotel).
check_in_date
required
string
The check-in date, must have the YYYY-MM-DD format.
check_out_date
required
string
The check-in date, must have the YYYY-MM-DD format.
occupancy
string
The number of guests that will occupy a room. Supported values are numbers (to describe the number of adults), or comma-separated numbers (to describe the number of adults and children, along with their age).
Examples:
occupancy=2 (default) means 2 adults
occupancy=1,2 means 1 adult and 1 child (2 years old)
occupancy=1,2,2 means 1 adult and 2 child (each 2 years old)
free_cancellation
string
Whether the offer has free cancellation. Can be 1 or 0 (default).
accomodation_type
string
This parameter is available only when type parameter is set to search.
The type of accomodation. Can be hotels (default) or vacation_rentals.
currency
string
The currency used to show the prices (3-letter code).
#3: Device and Geolocation Parameters
device
string
The device used for your Google Hotels search. Possible values are desktop (default), mobile and tablet.
Last updated