GET
TripAdvisor Hotel Reviews API
Extract comprehensive hotel reviews from TripAdvisor using the hotel's location ID.
Overview
Rich Review Data
Get detailed reviews with user profiles, ratings, photos, trip information, and engagement metrics.
The TripAdvisor Hotel Reviews endpoint provides access to detailed review data including reviewer information, stay dates, ratings, review text, photos, helpful votes, and management responses.
Endpoint URL
GET https://api.stayapi.com/v1/tripadvisor/hotel/reviews/{location_id}
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
location_id | string | Required | TripAdvisor location ID (path parameter) |
limit | integer | Optional | Number of reviews per page (1-50, default: 10) |
offset | integer | Optional | Pagination offset (default: 0) |
language | string | Optional | Language filter (default: "en" for English) |
Response Structure
Review Information
review_id
- Unique review identifiertitle
- Review titletext
- Full review textrating
- Overall rating (1-5)published_date
- When review was postedstay_date
- When the reviewer stayed
Reviewer Details
- Username and display name
- Location
- Contribution count and helpful votes
- Profile photo URL
Additional Data
- Trip type (business, couples, family, etc.)
- Review photos
- Helpful vote count
- Management response (if available)
- Room tip information
- Language of review
Finding the Location ID
Need the Location ID?
Use the /location/extract-id endpoint to extract the location ID from any TripAdvisor hotel URL.
The location ID can be found in TripAdvisor URLs. For example:
https://www.tripadvisor.com/Hotel_Review-g1224250-d305165-Reviews-Hotel.html
The location ID is 305165
(the number after "d").
Request
curl -X GET "https://api.stayapi.com/v1/tripadvisor/hotel/reviews/305165?limit=10&offset=0" \ -H "x-api-key: YOUR_API_KEY"
const locationId = "305165"; const params = new URLSearchParams({ limit: "10", offset: "0", language: "en" }); const response = await fetch( `https://api.stayapi.com/v1/tripadvisor/hotel/reviews/${locationId}?${params}`, { headers: { "x-api-key": "YOUR_API_KEY" } } ); const data = await response.json(); // Display reviews data.data.reviews.forEach(review => { console.log(`${review.rating}/5 - ${review.title}`); console.log(`By: ${review.user.username} from ${review.user.location}`); console.log(`Review: ${review.text.substring(0, 200)}...`); console.log(`Helpful votes: ${review.helpful_votes}`); console.log("---"); });
import requests location_id = "305165" url = f"https://api.stayapi.com/v1/tripadvisor/hotel/reviews/{location_id}" headers = {"x-api-key": "YOUR_API_KEY"} params = { "limit": 10, "offset": 0, "language": "en" } response = requests.get(url, headers=headers, params=params) data = response.json() # Display review summary print(f"Total reviews: {data['data']['total_reviews']}") print(f"Average rating: {data['data']['average_rating']}/5\n") # Display individual reviews for review in data["data"]["reviews"]: print(f"{review['rating']}/5 ⭐ - {review['title']}") print(f"By: {review['user']['username']} from {review['user']['location']}") print(f"Stay date: {review['stay_date']}") print(f"Review: {review['text'][:200]}...") if review.get("management_response"): print(f"Hotel response: {review['management_response']['text'][:100]}...") print("-" * 50)
Response
{ "success": true, "data": { "hotel_name": "The Siam", "location_id": "305165", "total_reviews": 892, "average_rating": 4.5, "reviews": [ { "review_id": "874521963", "title": "Exceptional luxury hotel with outstanding service", "text": "From the moment we arrived, we were treated like royalty. The staff went above and beyond to ensure our stay was perfect. The room was beautifully appointed with traditional Thai decor and modern amenities. The pool area is stunning and the spa treatments were heavenly.", "rating": 5, "published_date": "2024-01-10", "stay_date": "December 2023", "trip_type": "Couples", "user": { "username": "SarahM_London", "display_name": "Sarah M", "location": "London, UK", "contributions": 47, "helpful_votes": 123, "avatar_url": "https://media-cdn.tripadvisor.com/media/photo-l/user123.jpg" }, "helpful_votes": 8, "photos": [ { "url": "https://media-cdn.tripadvisor.com/media/photo-w/review123.jpg", "caption": "Beautiful pool area" } ], "room_tip": "Request a river view room for stunning sunset views", "management_response": { "text": "Dear Sarah, Thank you for your wonderful review. We are delighted you enjoyed your stay with us and look forward to welcoming you back soon.", "date": "2024-01-12", "responder": "Hotel Management" }, "language": "en" }, { "review_id": "873654821", "title": "Good hotel but overpriced", "text": "The hotel is nice and the location is convenient, but I felt it was overpriced for what you get. The breakfast was limited and the pool area gets very crowded. Staff were friendly but service was sometimes slow.", "rating": 3, "published_date": "2024-01-05", "stay_date": "December 2023", "trip_type": "Solo", "user": { "username": "TravellerMike", "display_name": "Mike", "location": "New York, NY", "contributions": 156, "helpful_votes": 89, "avatar_url": null }, "helpful_votes": 3, "photos": [], "room_tip": null, "management_response": null, "language": "en" } ], "pagination": { "limit": 10, "offset": 0, "has_next": true } }, "message": "Successfully retrieved hotel reviews", "retrieved_at": "2024-01-15T10:30:00Z" }
{ "error": "Hotel not found", "detail": "No hotel found with location ID: 999999", "status_code": 404 }