GET
TripAdvisor Hotel Details API
Extract comprehensive hotel information from TripAdvisor using the hotel's location ID.
Overview
Complete Hotel Data
Get detailed hotel information including amenities, location, ratings, contact details, awards, and more.
The TripAdvisor Hotel Details endpoint provides comprehensive hotel information including property details, amenities, location data, ratings breakdown, contact information, awards, and nearby attractions.
Endpoint URL
GET https://api.stayapi.com/v1/tripadvisor/hotel/details/{location_id}
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
location_id | string | Required | TripAdvisor location ID (path parameter) |
Response Structure
Basic Information
name
- Hotel namedescription
- Detailed property descriptionhotel_class
- Star ratingprice_level
- Price category ($ to $$$$)ranking
- City ranking and category
Location & Contact
- Full address with components
- GPS coordinates (latitude/longitude)
- Phone number and email
- Website URL
- Neighborhood information
- Nearby attractions with distances
Ratings & Reviews
- Overall rating and review count
- Rating breakdown by category (Location, Cleanliness, Service, Value)
- Rating distribution (5-star to 1-star percentages)
- Traveler type breakdown
- Language distribution
Amenities & Features
- Complete amenity list by category
- Room features
- Property amenities
- Number of rooms
- Hotel highlights
Awards & Recognition
- TripAdvisor awards (Travelers' Choice, etc.)
- Green Leader status
- Other certifications
Common Use Cases
- Building detailed hotel profile pages
- Comparing hotel amenities and features
- Displaying location and nearby attractions
- Showing awards and recognition
- Creating hotel comparison tools
- Enriching hotel data from other sources
Data Freshness
Hotel details change less frequently than reviews. Consider caching this data for 24-48 hours to improve performance.
Request
curl -X GET "https://api.stayapi.com/v1/tripadvisor/hotel/details/8622290" \ -H "x-api-key: YOUR_API_KEY"
const locationId = "8622290"; const response = await fetch( `https://api.stayapi.com/v1/tripadvisor/hotel/details/${locationId}`, { headers: { "x-api-key": "YOUR_API_KEY" } } ); const data = await response.json(); const hotel = data.data; console.log(`Hotel: ${hotel.name}`); console.log(`Rating: ${hotel.rating}/5 (${hotel.num_reviews} reviews)`); console.log(`Ranking: #${hotel.ranking_position} in ${hotel.ranking_geo}`); console.log(`Price Level: ${hotel.price_level}`); // Display top amenities console.log("\nTop Amenities:"); hotel.amenities.slice(0, 10).forEach(amenity => { console.log(` • ${amenity}`); }); // Show awards if (hotel.awards && hotel.awards.length > 0) { console.log("\nAwards:"); hotel.awards.forEach(award => { console.log(` 🏆 ${award.display_name} (${award.year})`); }); }
import requests location_id = "8622290" url = f"https://api.stayapi.com/v1/tripadvisor/hotel/details/{location_id}" headers = {"x-api-key": "YOUR_API_KEY"} response = requests.get(url, headers=headers) data = response.json() hotel = data["data"] # Display basic information print(f"Hotel: {hotel['name']}") print(f"{'⭐' * int(hotel['hotel_class'])} {hotel['hotel_class']} stars") print(f"Rating: {hotel['rating']}/5 based on {hotel['num_reviews']} reviews") print(f"Ranking: #{hotel['ranking_position']} in {hotel['ranking_geo']}") print(f"Price Level: {hotel['price_level']}") # Location information print(f"\nLocation:") print(f"Address: {hotel['address']['street1']}") print(f" {hotel['address']['city']}, {hotel['address']['country']}") print(f"Phone: {hotel.get('phone', 'N/A')}") print(f"Website: {hotel.get('website', 'N/A')}") # Rating breakdown print(f"\nRating Breakdown:") for category, score in hotel["rating_breakdown"].items(): print(f" {category}: {score}/5") # Top amenities print(f"\nTop Amenities:") for amenity in hotel["amenities"][:10]: print(f" • {amenity}") # Nearby attractions if "nearby_attractions" in hotel: print(f"\nNearby Attractions:") for attraction in hotel["nearby_attractions"][:5]: print(f" • {attraction['name']} ({attraction['distance']})")
Response
{ "success": true, "data": { "location_id": "8622290", "name": "Mandarin Oriental, Bangkok", "description": "Situated on the banks of the Chao Phraya River, the Mandarin Oriental, Bangkok has been an inspiration to travelers for over 140 years. A luxury five-star hotel with legendary service, exquisite rooms, and world-class dining.", "hotel_class": 5, "hotel_class_attribution": "This property is classified according to Giata.", "price_level": "$$$$", "rating": 4.5, "num_reviews": 3456, "ranking_position": 12, "ranking_geo": "Bangkok", "ranking_geo_id": "293916", "ranking_denominator": 1234, "ranking_category": "hotel", "subcategory": "Luxury Hotel", "awards": [ { "award_type": "TRAVELLERS_CHOICE", "year": "2023", "display_name": "Travelers' Choice 2023" }, { "award_type": "GREEN_LEADER", "year": "2023", "display_name": "GreenLeader Gold level" } ], "address": { "street1": "48 Oriental Avenue", "street2": "Bang Rak", "city": "Bangkok", "state": null, "country": "Thailand", "postalcode": "10500", "address_string": "48 Oriental Avenue Bang Rak, Bangkok 10500 Thailand", "latitude": 13.7234, "longitude": 100.5132 }, "phone": "+66 2 659 9000", "email": "[email protected]", "website": "https://www.mandarinoriental.com/bangkok", "write_review_url": "https://www.tripadvisor.com/UserReview-g293916-d8622290-Mandarin_Oriental_Bangkok.html", "rating_breakdown": { "Location": 4.8, "Cleanliness": 4.7, "Service": 4.9, "Value": 4.2 }, "rating_distribution": { "excellent": 65, "very_good": 22, "average": 8, "poor": 3, "terrible": 2 }, "review_summary": { "languages": { "English": 1876, "Chinese (Simplified)": 543, "Japanese": 234, "Thai": 189, "Other": 614 }, "traveler_types": { "Families": 456, "Couples": 1789, "Solo": 234, "Business": 677, "Friends": 300 } }, "amenities": [ "Free WiFi", "Pool", "Free parking", "Restaurant", "Room service", "Bar/Lounge", "Spa", "Fitness center", "Concierge", "Business center", "Meeting rooms", "Laundry service", "Air conditioning", "Multilingual staff", "Non-smoking rooms", "Airport transportation", "Babysitting", "Currency exchange" ], "room_features": [ "Air conditioning", "Minibar", "Safe", "Flat-screen TV", "Coffee/tea maker", "Bathrobes", "Hair dryer", "Iron", "Desk" ], "room_types": [ "Suites", "Non-smoking rooms", "Family rooms", "Accessible rooms" ], "num_rooms": 393, "hotel_highlights": [ "Luxury", "Romantic", "River view", "Historic hotel", "Great view" ], "nearby_attractions": [ { "name": "Wat Pho", "distance": "1.2 km", "location_id": "311016" }, { "name": "Grand Palace", "distance": "1.8 km", "location_id": "311019" }, { "name": "Wat Arun", "distance": "2.1 km", "location_id": "311017" } ], "photos": [ { "url": "https://media-cdn.tripadvisor.com/media/photo-o/main-photo.jpg", "caption": "Hotel exterior" } ] }, "message": "Successfully retrieved hotel details", "retrieved_at": "2024-01-15T10:30:00Z" }
{ "error": "Hotel not found", "detail": "No hotel found with location ID: 999999", "status_code": 404 }