GET
Expedia Hotel Reviews API
Extract guest reviews from Expedia hotels using the property ID.
Overview
Real-time Review Data
Get complete review content, ratings, and reviewer information with real-time data updates.
The Expedia Hotel Reviews endpoint returns the 10 most recent guest reviews for a hotel. Each review includes the rating, review text, reviewer name, and review date.
Endpoint URL
GET https://api.stayapi.com/v1/expedia/hotel/reviews
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| property_id | string | Required | Expedia property ID (numeric string, e.g., "1582716") |
Response Structure
Review Information
id- Unique review identifierrating- Rating as raw string (e.g., "10/10 Excellent")text- Full review textreviewer_name- Name of the reviewerreview_date- Date of the review
Pagination Data
total_count- Number of reviews returnedhas_more- Whether more reviews exist
Finding the Property ID
Finding the Property ID
The property ID can be found in Expedia hotel URLs after the "h" prefix.
The property ID appears in Expedia URLs. For example:
https://www.expedia.com/h1582716.Hotel-Information
The property ID is 1582716 (the number after "h").
Request
curl -X GET "https://api.stayapi.com/v1/expedia/hotel/reviews?property_id=1582716" \ -H "x-api-key: YOUR_API_KEY"
const propertyId = "1582716"; const params = new URLSearchParams({ property_id: propertyId }); const response = await fetch( `https://api.stayapi.com/v1/expedia/hotel/reviews?${params}`, { headers: { "x-api-key": "YOUR_API_KEY" } } ); const data = await response.json(); // Display reviews data.reviews.forEach(review => { console.log(`${review.rating} - ${review.reviewer_name}`); console.log(`Review: ${review.text}`); console.log("---"); });
import requests property_id = "1582716" url = "https://api.stayapi.com/v1/expedia/hotel/reviews" headers = {"x-api-key": "YOUR_API_KEY"} params = {"property_id": property_id} response = requests.get(url, headers=headers, params=params) data = response.json() # Display review summary print(f"Total reviews: {data['total_count']}") print(f"Has more: {data['has_more']}") # Display individual reviews for review in data["reviews"]: print(f"{review['rating']} - {review['reviewer_name']}") print(f"Date: {review['review_date']}") print(f"Review: {review['text'][:200]}...") print("-" * 50)
<?php $propertyId = "1582716"; $url = "https://api.stayapi.com/v1/expedia/hotel/reviews"; $params = http_build_query([ "property_id" => $propertyId ]); $ch = curl_init($url . "?" . $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); curl_close($ch); // Display reviews foreach ($data["reviews"] as $review) { echo $review["rating"] . " - " . $review["reviewer_name"] . "\n"; echo "Review: " . $review["text"] . "\n"; echo "---\n"; } ?>
require "net/http" require "json" require "uri" property_id = "1582716" uri = URI("https://api.stayapi.com/v1/expedia/hotel/reviews") uri.query = URI.encode_www_form({ property_id: property_id }) 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" response = http.request(request) data = JSON.parse(response.body) # Display reviews puts "Total reviews: \#{data['total_count']}" data["reviews"].each do |review| puts "\#{review['rating']} - \#{review['reviewer_name']}" puts "Review: \#{review['text'][0..200]}..." puts "-" * 50 end
Response
{ "property_id": "1582716", "reviews": [ { "id": "review_123456", "rating": "10/10 Excellent", "text": "The room was clean and nice. The staff was very friendly and helpful. Great location near the city center.", "reviewer_name": "Andrew", "review_date": "Nov 2024" }, { "id": "review_123457", "rating": "8/10 Good", "text": "Good place for a short rest. Clean room and comfortable bed.", "reviewer_name": "Marek", "review_date": "Oct 2024" } ], "total_count": 10, "page": 0, "per_page": 10, "has_more": true }
{ "type": "https://api.stayapi.com/errors/invalid-property-id", "title": "Invalid Property ID", "status": 400, "detail": "Property ID must be numeric", "error_code": "INVALID_PROPERTY_ID" }