Scraping Google Hotels for hotels data can be valuable to your business. These data can be used for:
- Analysis: Data such as pricing, availability, ratings, and reviews could be useful for market analysis, competitive research, and understanding pricing trends.
- Price Comparison: Compare prices across various platforms or to monitor hotel price changes over time. This can be particularly useful for travel agencies or price comparison websites.
- Feature Extraction: Gather data such as amenities, location, room types, and more.
- Sentiment Analysis: One can conduct sentiment analysis to gauge customer satisfaction and reputation of hotels from the users’ reviews.
- Machine Learning Model Training: Train machine learning models for various purposes like predictive pricing, recommendation systems, or to understand customer preferences.
In this blog post, we will be using Google Hotels API to scrape Google Hotels.
Playground

We have a playground for the API that you can test out. Playground allows you to visualize the data that you can get from our API and compare it with the data shown in Google Hotels itself.
The data contains: "type", "name", "check_in_time", "check_out_time", "price_source", "lowest_price", "rating", "images", and more.
Step-by-step on scraping Hotels data from Google
Get your API Key
First, ensure you register at serpapi.com to get your API Key. You can get 250 free searches per month. You can use this API Key to access all of our APIs, including the Google Hotels API.
cURL Implementation
Here is the basic implementation in cURL:
curl --get https://serpapi.com/search \
-d engine="google_hotels" \
-d q="Bali+Resorts" \
-d check_in_date="2025-10-31" \
-d check_out_date="2025-11-01" \
-d adults="2" \
-d currency="USD" \
-d gl="us" \
-d hl="en" \
-d api_key="YOUR_API_KEY"Feel free to check all of the available parameters here on the Google Hotels API documentation.
Python tutorial - Google Hotels Data Scraper
Next, let's see how to scrape the Google Hotels data search results in Python.
Preparation for accessing the SerpApi API in Python
- Create a new
main.pyfile - Install requests with:
pip install requestsHere is what the basic setup looks like:
import requests
SERPAPI_API_KEY = "YOUR_REAL_SERPAPI_API_KEY"
params = {
"api_key": SERPAPI_API_KEY, #replace with your real API Key
# soon
}
search = requests.get("https://serpapi.com/search", params=params)
response = search.json()
print(response)With these few lines of code, we can access all of the search engines available at SerpApi, including the Google Hotels API.
import requests
SERPAPI_API_KEY = "YOUR_SERPAPI_API_KEY"
params = {
"engine": "google_hotels",
"q": "Bali Resorts",
"check_in_date": "2025-10-31",
"check_out_date": "2025-11-01",
"adults": "2",
"currency": "USD",
"gl": "us",
"hl": "en",
"type": "asr",
}
search = requests.get("https://serpapi.com/search", params=params)
response = search.json()
print(response)Export hotel listing data to a CSV file
You can store Google Hotels Results JSON data in databases or export it to a CSV file.
# ... continue from previous code
search = requests.get("https://serpapi.com/search", params=params)
response = search.json()
properties = response.get("properties", [])
import csv
header = ["type", "name", "check_in_time", "check_out_time", "price_source", "lowest_price", "rating", "images"]
with open("google_hotels_results.csv", "w", encoding="UTF8", newline="") as f:
writer = csv.writer(f)
writer.writerow(header)
for item in properties:
writer.writerow([item.get('type'), item.get('name'), item.get('check_in_time'), item.get('check_out_time'), item.get('prices', [{}])[0].get('source'), item.get('total_rate', {}).get('lowest'), item.get('overall_rating'), item.get('images')])

JavaScript tutorial - Google Hotels Data Scraper
Next, let's see how we can do this in JavaScript.
Install the serpapi package:
npm install serpapiRun a basic query:
import { getJson } from "serpapi"
const SERPAPI_KEY = "..." // Get your API_KEY from https://serpapi.com/manage-api-key
const googleHotelsParams = {
api_key: SERPAPI_KEY,
engine: "google_hotels",
q: "Bali Resorts",
check_in_date: "2026-01-20",
check_out_date: "2026-01-25",
adults: 2,
}
const googleHotelsResponse = await getJson(googleHotelsParams)Code Explanation
We set the required parameters for the Google Hotels API. A list of parameters and their detailed explanation can be found in our documentation.
q is hotel search query that can be anything available in Google Hotels like Iceland, New York. For this demo, we are scraping the Bali Resorts hotels data.
const googleHotelsParams = {
api_key: SERPAPI_KEY,
engine: "google_hotels",
q: "Bali Resorts",
check_in_date: "2024-01-20",
check_out_date: "2024-01-25",
adults: 2,
}Once parameters are defined, everything else will be taken care of by the library, for example, making the actual API request. Calling getJson to make the API request and JSON data will be returned and assigned it to googleHotelsResponse.
const googleHotelsResponse = await getJson(googleHotelsParams)Output:
The total number of results per page is about 20. The data includes hotel name, price data, customer reviews, amenities and other hotel details.
console.log(googleHotelsResponse)"properties": [
{
"type": "hotel",
"name": "Sol Benoa Bali - All Inclusive",
"description": "Chic hotel opposite a private area of beach, plus dining, bars, a spa & an outdoor pool.",
"logo": "https://www.gstatic.com/travel-hotels/branding/icon_49.png",
"sponsored": true,
"gps_coordinates": {
"latitude": -8.78685,
"longitude": 115.22636500000002
},
"check_in_time": "3:00 PM",
"check_out_time": "12:00 PM",
"rate_per_night": {
"lowest": "$103",
"extracted_lowest": 103,
"highest": "$124",
"extracted_highest": 124
},
"prices": [
{
"source": "Sol Benoa Bali - All Inclusive",
"logo": "https://www.gstatic.com/travel-hotels/branding/icon_49.png",
"rate_per_night": {
"lowest": "$103",
"extracted_lowest": 103,
"highest": "$124",
"extracted_highest": 124
}
}
],
"nearby_places": [
{
"name": "Nusa Dua 2",
"transportations": [
{
"type": "Walking",
"duration": "9 min"
}
]
},
{
"name": "I Gusti Ngurah Rai International Airport",
"transportations": [
{
"type": "Taxi",
"duration": "18 min"
},
{
"type": "Public transport",
"duration": "30 min"
}
]
},
{
"name": "九九港式海鲜火锅 nine resturant",
"transportations": [
{
"type": "Walking",
"duration": "2 min"
}
]
}
],
"hotel_class": "5-star hotel",
"extracted_hotel_class": 5,
"images": [
{
"thumbnail": "https://lh5.googleusercontent.com/p/AF1QipM2c6Pq3LHe0_vVOawTPwExOyVgljaM6XtRWbYB=s287-w287-h192-n-k-no-v1",
"original_image": "https://lh5.googleusercontent.com/p/AF1QipM2c6Pq3LHe0_vVOawTPwExOyVgljaM6XtRWbYB=s10000"
},
....
],
"overall_rating": 4.5,
"reviews": 1288,
"location_rating": 3.4,
"reviews_breakdown": [
{
"name": "Nature",
"description": "Nature and outdoor activities",
"total_mentioned": 173,
"positive": 127,
"negative": 23,
"neutral": 23
},
...
],
"amenities": [
"Breakfast ($)",
"Free Wi-Fi",
"Free parking",
"Outdoor pool",
"Air conditioning",
"Fitness centre",
"Spa",
"Beach access",
"Bar",
"Restaurant",
"Room service",
"Full-service laundry",
"Accessible",
"Business centre",
"Child-friendly",
"Smoke-free property"
]
},
...
]Pagination example:
import { getJson } from "serpapi"
const SERPAPI_KEY = "..." // Get your API_KEY from https://serpapi.com/manage-api-key
const googleHotelsParams = {
api_key: SERPAPI_KEY,
engine: "google_hotels",
q: "Bali Resorts",
check_in_date: "2024-01-20",
check_out_date: "2024-01-25",
adults: 2,
next_page_token: "CBI="
}
const googleHotelsResponse = await getJson(googleHotelsParams)How to paginate the results
When there is next page results, our API will return serpapi_pagination. The next_page_token can be used to retrieve the next page results.
{
"current_from": 1,
"current_to": 20,
"next_page_token": "CBI=",
"next": "https://serpapi.com/search.json?adults=2&check_in_date=2024-01-20&check_out_date=2024-01-25&children=0¤cy=USD&engine=google_hotels&gl=us&hl=en&next_page_token=CBI%3D&q=Bali+Resorts"
}How to get specific property information
We can use the same API along with property_token that we got from regular search to get full detailed information about a specific property.
For example:
params = {
"api_key": SERPAPI_API_KEY,
"engine": "google_hotels",
"q": "Singapore",
"check_in_date": "2025-11-10",
"check_out_date": "2025-11-20",
"property_token": $TOKEN_YOU_GET_FROM_ORIGINAL_SEARCH
}Output:

How to get autocomplete result
We can use the Google Hotels Autocomplete API to see all autocomplete suggestions where you can get the property_token and serpapi_google_hotels_link for each suggestion.
Not finding the hotels you're looking for using the general results? Not to worry, because SerpApi also offers an API to get all autocomplete suggestions for queries, and provides the property_token and serpapi_google_hotels_link for all properties returned in the autocomplete, as well as other information, such as value, type, location, thumbnail, highlighted_words, autocomplete_suggestion, kgmid, data_cid and serpapi_link.
To use it, we just need to set engine to "google_hotels_autocomplete" and provide a query using the parameter q, such as "New York".
params = {
"engine": "google_hotels_autocomplete",
"q": "New York",
"api_key": "YOUR_API_KEY"
}
No-code solution for scraping hotel data
Non-developers who want to use the Google Hotels API without writing code also have the option of using it with several tools below. However, the use of a programming language is usually encouraged for greater flexibility and better support.
- SerpApi Google Sheets Extension
- N8N - for more powerful integration
Why use an API?
- No need to create a parser from scratch and maintain it.
- Bypass blocks from Google: solve CAPTCHA or solve IP blocks.
- No need to pay for proxies, and CAPTCHA solvers.
- Don't need to use browser automation.
SerpApi takes care of everything mentioned above with fast response times under ~2.47 seconds (~1.33 seconds with Ludicrous speed) per request. The result is a well structured data in JSON with only a single API call.
Response times and success rates are shown under the SerpApi Status page.
About SerpApi
In SerpApi, we provide easy and fast API to scrape various search engines like Google, Google Maps, Bing, other engine that under Google Travel like Google Flights and many others.
If you are looking for a complete step-by-step tutorial to build your own Hotels data scraper, we have blog post that cover it. It includes scraping data from booking.com, Airbnb and etc.
If you are wondering the legality of web scraping, you can checkout our FAQ. Scraping data that is publicly available is generally safe provided the usage is fully legal.
Conclusions
Scraping Google Hotels data can be valuable in terms of pricing strategy, pricing trends, market research, sentiment analysis, predictive analysis and etc. In future, we will be covering more in-depth hotel data, follow our public roadmap to get up to date information. In SerpApi, we provide an easy and fast API for our customers so they can focus the resources on their core of the business.
If you'd like to dive deeper into Hotel Pricing research or looking for an example in Python, here is the related blog post:

If you have any questions, please feel free to reach out to me.
Add a Feature Request💫 or a Bug🐞

