Hotel Reviews API
Access detailed customer reviews, ratings, and feedback from various booking platforms including Booking.com.
Overview
Rich Review Data
Get comprehensive review information including ratings, text reviews, reviewer details, and review metadata for in-depth analysis.
The Hotel Reviews endpoint provides access to customer reviews and ratings from major booking platforms. Perfect for sentiment analysis, hotel performance tracking, and providing social proof to your users.
Endpoint URL
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
url | string | Required | Booking.com hotel URL or hotel slug (e.g., "le-grand-hotel-paris" or "https://www.booking.com/hotel/fr/le-grand-hotel-paris.html") |
page | integer | Optional | Page number for pagination (default: 1) |
per_page | integer | Optional | Number of reviews per page (default: 20, max: 50) |
language | string | Optional | Filter reviews by language (e.g., "en", "fr", "es") |
sort | string | Optional | Sort order: "newest", "oldest", "rating_high", "rating_low" (default: "newest") |
Common Use Cases
Sentiment Analysis
Analyze customer sentiment and satisfaction trends to understand hotel performance over time.
Social Proof
Display recent customer reviews to build trust and encourage bookings on your platform.
Competitive Analysis
Compare review trends and ratings across competing hotels in the same market.
Content Generation
Use review highlights and common themes to generate marketing content and descriptions.
Response Format
Review Object Fields
Field | Type | Description |
---|---|---|
id | string | Unique review identifier |
author | string | Reviewer name (anonymized) |
country | string | Reviewer's country |
rating | integer | Review rating (1-10 scale) |
title | string | Review title/summary |
text | string | Full review text |
date | string | Review date (ISO 8601 format) |
helpful_votes | integer | Number of helpful votes received |
Pagination
Use the pagination object to implement proper pagination in your application. Large hotels may have thousands of reviews.
Supported URL Formats
This endpoint accepts both hotel slugs and full Booking.com URLs, providing flexibility in how you reference hotels.
Hotel Slug Format
Use just the hotel identifier from the URL:
Full URL Format
Use the complete Booking.com hotel URL:
Automatic Detection
The API automatically detects and handles both formats. Use whichever format is most convenient for your application.
# Using hotel slug curl -X GET "https://api.stayapi.com/v1/booking/hotel/reviews" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -G \ -d "url=le-grand-hotel-paris" \ -d "page=1" \ -d "per_page=20" \ -d "sort=newest" \ -d "language=en" # Using full URL curl -X GET "https://api.stayapi.com/v1/booking/hotel/reviews" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -G \ -d "url=https://www.booking.com/hotel/fr/le-grand-hotel-paris.html" \ -d "page=1" \ -d "per_page=20"
// Using hotel slug const response = await fetch("https://api.stayapi.com/v1/booking/hotel/reviews?" + new URLSearchParams({ url: "le-grand-hotel-paris", page: 1, per_page: 20, sort: "newest", language: "en" }), { headers: { "x-api-key": "YOUR_API_KEY", "Content-Type": "application/json" } }); // Or using full URL const responseFullUrl = await fetch("https://api.stayapi.com/v1/booking/hotel/reviews?" + new URLSearchParams({ url: "https://www.booking.com/hotel/fr/le-grand-hotel-paris.html", page: 1, per_page: 20 }), { headers: { "x-api-key": "YOUR_API_KEY", "Content-Type": "application/json" } }); const data = await response.json(); console.log(`Found ${data.data.reviews.length} reviews`); console.log(`Average rating: ${data.data.average_rating}/10`); // Display first few reviews data.data.reviews.slice(0, 3).forEach(review => { console.log(`${review.author} (${review.rating}/10): ${review.title}`); });
import requests url = "https://api.stayapi.com/v1/booking/hotel/reviews" headers = { "x-api-key": "YOUR_API_KEY", "Content-Type": "application/json" } # Using hotel slug params = { "url": "le-grand-hotel-paris", "page": 1, "per_page": 20, "sort": "newest", "language": "en" } # Or using full URL params_full_url = { "url": "https://www.booking.com/hotel/fr/le-grand-hotel-paris.html", "page": 1, "per_page": 20 } response = requests.get(url, headers=headers, params=params) data = response.json() if response.status_code == 200: print(f"Hotel: {data[\"data\"][\"hotel_name\"]}") print(f"Average rating: {data[\"data\"][\"average_rating\"]}/10") print(f"Total reviews: {data[\"data\"][\"total_reviews\"]}") print(f"Found {len(data[\"data\"][\"reviews\"])} reviews on this page\n") for review in data["data"]["reviews"][:3]: print(f"{review[\"author\"]} ({review[\"rating\"]}/10):") print(f" {review[\"title\"]}") print(f" Date: {review[\"date\"]}") print(f" Helpful votes: {review[\"helpful_votes\"]}\n")
<?php $url = "https://api.stayapi.com/v1/booking/hotel/reviews"; $params = http_build_query([ "url" => "le-grand-hotel-paris", "page" => 1, "per_page" => 20, "sort" => "newest", "language" => "en" ]); $headers = [ "x-api-key: YOUR_API_KEY", "Content-Type: application/json" ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url . "?" . $params); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $data = json_decode($response, true); curl_close($ch); if ($data["status"] === "success") { echo "Hotel: " . $data["data"]["hotel_name"] . "\n"; echo "Average rating: " . $data["data"]["average_rating"] . "/10\n"; echo "Found " . count($data["data"]["reviews"]) . " reviews\n\n"; foreach (array_slice($data["data"]["reviews"], 0, 3) as $review) { echo $review["author"] . " (" . $review["rating"] . "/10): " . $review["title"] . "\n"; } } ?>
require "net/http" require "uri" require "json" uri = URI("https://api.stayapi.com/v1/booking/hotel/reviews") uri.query = URI.encode_www_form({ url: "le-grand-hotel-paris", page: 1, per_page: 20, sort: "newest", language: "en" }) http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true request = Net::HTTP::Get.new(uri) request["x-api-key"] = "YOUR_API_KEY" request["Content-Type"] = "application/json" response = http.request(request) data = JSON.parse(response.body) if response.code == "200" puts "Hotel: #{data["data"]["hotel_name"]}" puts "Average rating: #{data["data"]["average_rating"]}/10" puts "Found #{data["data"]["reviews"].length} reviews\n\n" data["data"]["reviews"].first(3).each do |review| puts "#{review["author"]} (#{review["rating"]}/10): #{review["title"]}" end else puts "Error: #{response.code}" puts data["error"]["message"] if data["error"] end
{ "status": "success", "data": { "hotel_name": "Le Grand Hotel InterContinental", "total_reviews": 2847, "average_rating": 8.6, "rating_breakdown": { "10": 856, "9": 712, "8": 634, "7": 387, "6": 145, "5": 78, "4": 23, "3": 8, "2": 3, "1": 1 }, "reviews": [ { "id": "review_789", "author": "Sophie M.", "country": "France", "rating": 9, "title": "Exceptional luxury experience", "text": "The service was impeccable and the location is perfect for exploring Paris. The rooms are beautifully decorated and the breakfast was outstanding. Staff went above and beyond to make our anniversary special.", "date": "2024-02-15", "helpful_votes": 12, "language": "en", "verified_stay": true, "room_type": "Deluxe Suite", "travel_type": "Couple", "photos": [ "https://images.booking.com/review_123.jpg" ] }, { "id": "review_790", "author": "James D.", "country": "United Kingdom", "rating": 8, "title": "Great location, excellent service", "text": "Perfect location in the heart of Paris. The concierge was extremely helpful with restaurant recommendations. Room was spacious and clean.", "date": "2024-02-12", "helpful_votes": 8, "language": "en", "verified_stay": true, "room_type": "Standard Double", "travel_type": "Business", "photos": [] }, { "id": "review_791", "author": "Maria S.", "country": "Spain", "rating": 10, "title": "Perfección absoluta", "text": "Todo fue perfecto desde el check-in hasta el check-out. El personal es muy profesional y atento. Las habitaciones son elegantes y muy cómodas.", "date": "2024-02-10", "helpful_votes": 15, "language": "es", "verified_stay": true, "room_type": "Premium Room", "travel_type": "Family", "photos": [ "https://images.booking.com/review_456.jpg", "https://images.booking.com/review_457.jpg" ] } ], "pagination": { "page": 1, "per_page": 20, "total_pages": 143, "has_next": true, "has_previous": false } } }
{ "error": { "code": "not_found", "message": "Hotel not found", "details": "No hotel found with the specified URL. Please check the hotel URL parameter." } }