GET

Google Search and Review API

Search for hotels by location and automatically fetch Google Reviews for the top result in one seamless request.

Overview

Two APIs in One

This endpoint combines hotel search with review fetching, eliminating the need for multiple API calls and simplifying your integration.

The Google Search and Review endpoint streamlines the hotel discovery process by searching for hotels in a location and automatically fetching Google Reviews for the best matching result. This is perfect for applications that need quick access to both hotel information and customer feedback without managing Place IDs or making multiple requests.

Endpoint URL

GET https://api.stayapi.com/v1/google_reviews/search-and-review

Parameters

Parameter Type Required Description
location string Required Location to search for hotels (e.g., "Bangkok", "Las Vegas", "Paris, France")
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
currency string Optional Currency code (e.g., USD, EUR, THB). Default: USD
min_rating float Optional Minimum hotel rating filter (1.0-5.0)
reviews_sort_by string Optional Sort order for reviews. Options: newest, most_relevant (default), highest_rating, lowest_rating

Response Structure

Success Response (200 OK)

{
  "success": true,
  "location": "Bangkok",
  "check_in": "2025-02-15",
  "check_out": "2025-02-17",
  "hotel": {
    "name": "The Peninsula Bangkok",
    "place_id": "ChIJhwz69lSe4jARZBQEUn3n2x0",
    "overall_rating": 4.7,
    "reviews": 3845,
    "price_per_night": "$285",
    "total_price": "$570",
    "location": {
      "lat": 13.7215,
      "lng": 100.5171
    },
    "address": "333 Charoennakorn Rd, Khlong San, Bangkok 10600, Thailand",
    "amenities": [
      "Free WiFi",
      "Pool",
      "Spa",
      "Fitness center",
      "Restaurant",
      "Bar"
    ],
    "images": [
      "https://lh5.googleusercontent.com/..."
    ],
    "star_rating": 5
  },
  "reviews": [
    {
      "review_id": "ChdDSUhNMG9nS0VJQ0FnSURiOTlySm1RRRAB",
      "author_name": "Sarah Johnson",
      "rating": 5,
      "date": "2 weeks ago",
      "review_text": "Exceptional service and stunning river views...",
      "likes": 8,
      "response_from_owner": "Thank you for choosing The Peninsula Bangkok..."
    }
  ],
  "total_reviews": 3845,
  "reviews_next_page_token": "CAESBkVnSUlDZw==",
  "search_metadata": {
    "total_hotels_found": 1250,
    "search_datetime": "2025-01-25T10:30:00Z"
  }
}

Response Fields

  • hotel: Complete hotel information including name, price, amenities, and location
  • place_id: Google Place ID for fetching additional reviews
  • reviews: Array of Google Reviews for the hotel
  • total_reviews: Total number of reviews available
  • reviews_next_page_token: Token to fetch more reviews using the reviews endpoint

Common Use Cases

🔍 Quick Hotel Discovery

Enable users to search for hotels and immediately see authentic reviews without additional steps or API calls.

# User searches for hotels in a destination
result = search_and_review('Paris', check_in, check_out)
display_hotel_card(result['hotel'])
display_review_summary(result['reviews'])

📱 Mobile App Integration

Minimize API calls and reduce latency in mobile applications by fetching hotel and review data in one request.

// Single API call for hotel + reviews
const data = await searchHotelWithReviews(location, dates);
// Update UI with both hotel info and reviews
updateHotelView(data.hotel);
updateReviewsSection(data.reviews);

🎯 Location-Based Recommendations

Build recommendation systems that consider both hotel features and customer sentiment from reviews.

# Get top-rated hotels with positive reviews
locations = ['Bangkok', 'Phuket', 'Chiang Mai']
recommendations = []
for loc in locations:
    data = search_and_review(loc, dates, min_rating=4.5)
    if data['hotel']['overall_rating'] >= 4.5:
        recommendations.append(data)

How It Works

  1. 1

    Search Hotels

    The API searches for hotels in the specified location using Google Hotels data

  2. 2

    Extract Place ID

    The Google Place ID is extracted from the top search result

  3. 3

    Fetch Reviews

    Google Reviews are fetched using the extracted Place ID

  4. 4

    Combined Response

    Hotel information and reviews are returned in a single response

Error Handling

Code Type Description
400 INVALID_DATE_FORMAT Date not in YYYY-MM-DD format
400 INVALID_DATES Check-out date is before check-in date
400 PAST_DATES Check-in date is in the past
404 NO_HOTELS_FOUND No hotels found for the specified location
429 RATE_LIMITED Too many requests. Please retry after the specified time
502 UPSTREAM_ERROR Error fetching data from Google

Pro Tips

  • 💡
    Use specific locations: More specific locations (e.g., "Downtown Bangkok" vs "Bangkok") return more relevant results
  • 💡
    Cache Place IDs: Store the returned place_id to fetch updated reviews later without searching again
  • 💡
    Filter by rating: Use min_rating to ensure only high-quality hotels are returned
  • 💡
    Review sorting: Use 'newest' to get recent feedback or 'highest_rating' for social proof

Related Endpoints

Request
curl -X GET "https://api.stayapi.com/v1/google_reviews/search-and-review?location=Bangkok&check_in=2025-02-15&check_out=2025-02-17" \
  -H "X-API-Key: YOUR_API_KEY"
Response
{
  "success": true,
  "location": "Bangkok",
  "check_in": "2025-02-15",
  "check_out": "2025-02-17",
  "hotel": {
    "name": "The Peninsula Bangkok",
    "place_id": "ChIJhwz69lSe4jARZBQEUn3n2x0",
    "overall_rating": 4.7,
    "reviews": 3845,
    "price_per_night": "$285",
    "total_price": "$570",
    "location": {
      "lat": 13.7215,
      "lng": 100.5171
    },
    "address": "333 Charoennakorn Rd, Khlong San, Bangkok 10600, Thailand",
    "amenities": [
      "Free WiFi",
      "Pool",
      "Spa",
      "Fitness center",
      "Restaurant",
      "Bar"
    ],
    "images": [
      "https://lh5.googleusercontent.com/..."
    ],
    "star_rating": 5
  },
  "reviews": [
    {
      "review_id": "ChdDSUhNMG9nS0VJQ0FnSURiOTlySm1RRRAB",
      "author_name": "Sarah Johnson",
      "rating": 5,
      "date": "2 weeks ago",
      "review_text": "Exceptional service and stunning river views. The staff went above and beyond to make our stay memorable.",
      "likes": 8,
      "response_from_owner": "Thank you for choosing The Peninsula Bangkok..."
    },
    {
      "review_id": "ChdDSUhNMG9nS0VJQ0FnSURiOTlySm1RRRAC",
      "author_name": "Michael Chen",
      "rating": 4,
      "date": "3 weeks ago",
      "review_text": "Beautiful property with excellent facilities. The only minor issue was the wait time at the restaurant.",
      "likes": 2
    }
  ],
  "total_reviews": 3845,
  "reviews_next_page_token": "CAESBkVnSUlDZw==",
  "search_metadata": {
    "total_hotels_found": 1250,
    "search_datetime": "2025-01-25T10:30:00Z"
  }
}