Google Hotels Search API
Search for hotels with real-time availability, pricing, and comprehensive details using Google Hotels data.
Overview
Real-time Data
This endpoint provides real-time hotel search results with optimized execution for faster response times.
The Google Hotels Search endpoint provides comprehensive hotel search functionality with real-time availability, pricing, ratings, and amenities. Perfect for travel applications, price comparison sites, and booking platforms that need accurate, up-to-date hotel information.
Endpoint URL
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
location | string | Required | Location name (e.g., "Phuket", "Bangkok", "New York", "Las Vegas") |
check_in | string | Required | Check-in date in YYYY-MM-DD format |
check_out | string | Required | Check-out date in YYYY-MM-DD format |
adults | integer | Optional | Number of adults (1-10). Default: 2 |
children | integer | Optional | Number of children (0-10). Default: 0. Note: Not fully supported yet. |
currency | string | Optional | Currency code (e.g., USD, EUR, GBP). Default: USD |
min_rating | float | Optional | Minimum rating filter (1.0-5.0) |
Location Format
The API accepts simple location names like "Phuket", "Bangkok", "Las Vegas", or "New York". Google Hotels automatically interprets the location and returns relevant results.
Response Format
The response includes a comprehensive list of hotels with detailed information about each property, including pricing, ratings, amenities, and images.
Response Structure
- location: The searched location
- check_in: Check-in date
- check_out: Check-out date
- hotels: Array of hotel objects
- total_count: Total number of hotels found
- search_metadata: Search metadata including the source URL
Hotel Object Fields
Field | Type | Description |
---|---|---|
hotel_id | string | Unique hotel identifier |
name | string | Hotel name |
location | object | Location details (address, latitude, longitude) |
price | object | Pricing information (current, regular, max_price, currency, price_per_night) |
rating | object | Rating details (value, votes, rating_max) |
stars | integer | Hotel star rating (1-5) |
amenities | array | List of available amenities |
images | array | Array of hotel image URLs |
description | string | Hotel description |
is_paid | boolean | Indicates if this is a sponsored/paid listing |
Error Responses
The API returns standard HTTP error codes with detailed error messages following the RFC 7807 Problem Details format.
400 Bad Request
Invalid request parameters (e.g., invalid dates, date format)
{ "type": "https://api.stayapi.com/errors/invalid-dates", "title": "Invalid Dates", "status": 400, "detail": "Check-out date must be after check-in date" }
502 Bad Gateway
Upstream service error
{ "type": "https://api.stayapi.com/errors/upstream-error", "title": "Upstream Error", "status": 502, "detail": "Search failed" }
Usage Tips
Best Practices
- Simple location names like "Phuket" or "Las Vegas" work well
- Dates must be in YYYY-MM-DD format
- Results typically include 20+ hotels per search
- Filter results by min_rating to show only quality hotels (e.g., min_rating=4.5)
- Each hotel includes up to 10 images and comprehensive amenities list
- Prices are returned in the requested currency when available
Rate Limiting
This endpoint is subject to your plan's rate limits. Each search counts as one API call regardless of the number of results returned.
Related Endpoints
curl -X GET "https://api.stayapi.com/v1/google_hotels/search?location=Phuket&check_in=2026-03-15&check_out=2026-03-18&adults=2¤cy=USD&min_rating=4.5" \ -H "X-API-Key: YOUR_API_KEY"
const response = await fetch( "https://api.stayapi.com/v1/google_hotels/search?" + new URLSearchParams({ location: "Phuket", check_in: "2026-03-15", check_out: "2026-03-18", adults: 2, currency: "USD", min_rating: 4.5 }), { headers: { "X-API-Key": "YOUR_API_KEY" } } ); const data = await response.json(); console.log(`Found ${data.total_count} hotels`);
import requests params = { "location": "Phuket", "check_in": "2026-03-15", "check_out": "2026-03-18", "adults": 2, "currency": "USD", "min_rating": 4.5 } response = requests.get( "https://api.stayapi.com/v1/google_hotels/search", params=params, headers={"X-API-Key": "YOUR_API_KEY"} ) data = response.json() print(f"Found {data['total_count']} hotels")
$params = [ "location" => "Phuket", "check_in" => "2026-03-15", "check_out" => "2026-03-18", "adults" => 2, "currency" => "USD", "min_rating" => 4.5 ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.stayapi.com/v1/google_hotels/search?" . http_build_query($params)); curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-Key: YOUR_API_KEY"]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $data = json_decode($response, true); echo "Found " . $data["total_count"] . " hotels";
require "net/http" require "json" uri = URI("https://api.stayapi.com/v1/google_hotels/search") params = { location: "Phuket", check_in: "2026-03-15", check_out: "2026-03-18", adults: 2, currency: "USD", min_rating: 4.5 } uri.query = URI.encode_www_form(params) req = Net::HTTP::Get.new(uri) req["X-API-Key"] = "YOUR_API_KEY" res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| http.request(req) end data = JSON.parse(res.body) puts "Found \#{data['total_count']} hotels"
{ "location": "Phuket", "check_in": "2026-03-15", "check_out": "2026-03-18", "hotels": [ { "hotel_id": "http://www.bedlinehotel.com/", "name": "Bedline Hotel", "location": { "address": null, "latitude": 7.874396399999999, "longitude": 98.3891373 }, "price": { "current": 30.0, "regular": null, "max_price": 60.0, "currency": null, "price_per_night": 30.0 }, "rating": { "value": 4.7, "votes": 452, "rating_max": 5.0 }, "stars": null, "check_in_time": "2:00 PM", "check_out_time": "12:00 PM", "amenities": [ "Free Wi-Fi", "Free parking", "Outdoor pool", "Air conditioning", "Restaurant" ], "description": "Contemporary rooms in a relaxed hotel offering a coffee shop & a bar, plus an outdoor pool.", "images": [ "https://lh3.googleusercontent.com/p/AF1QipNbsdBnaXullMF1GWZevv9QWrlmxrgWCQAhHRVE=s287-w287-h192-n-k-no-v1", "https://lh3.googleusercontent.com/p/AF1QipM5zEktKO2b4IDquYCFJE5koX42Vm8VKBeqkJzl=s287-w287-h192-n-k-no-v1" ], "is_paid": false } ], "total_count": 354, "search_metadata": { "search_url": "https://www.google.com/_/TravelFrontendUi/data/batchexecute?...", "datetime": "2026-03-01T10:30:45.123Z" } }
{ "type": "https://api.stayapi.com/errors/invalid-date-format", "title": "Invalid Date Format", "status": 400, "detail": "Date must be in YYYY-MM-DD format", "instance": "/v1/google_hotels/search", "provider": "google_hotels", "error_code": "INVALID_DATE_FORMAT", "correlation_id": "req_abc123" }