Trip.com Hotel Reviews API
Extract comprehensive hotel reviews from Trip.com with detailed ratings, guest feedback, and filter options for sentiment analysis.
Copy for your AI agent
Paste into Claude, ChatGPT, Cursor or Copilot — endpoint, parameters, response fields and a curl example in Markdown.
Overview
Multi-Provider Reviews
Each review includes source: tripcom, ctrip, expedia, hotelscom, tripadvisor, or unknown. Attribution follows explicit review evidence; aggregate Expedia rating counts do not identify individual review origin. Token and signature fields are excluded; public aggregate rating metadata is retained.
The Trip.com Hotel Reviews endpoint provides access to comprehensive review data including guest ratings, detailed comments, check-in dates, and sentiment filters. Reviews can be filtered by positive, negative, or those with photos/videos.
Endpoint URL
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| hotel_id | integer | Required | Trip.com hotel ID (path parameter, e.g., 702258) |
| page | integer | Optional | Page number for pagination (starts at 1, default: 1) |
| page_size | integer | Optional | Number of reviews per page (default: 10, max: 50) |
| currency | string | Optional | Currency code (default: USD) |
| locale | string | Optional | Locale string (default: en-XX) |
Response Format
Success Response
total_reviews is the hotel aggregate, not the number of reviews guaranteed to be retrievable. pageable_reviews is the current feed count (totalCountForPage); it can be lower than the aggregate. A positive aggregate with zero pageable reviews returns an empty successful page. Missing or malformed upstream review payloads return 502. An out-of-range page also returns an empty reviews array with the totals preserved. A complete response with zero aggregate and zero pageable reviews is also a successful empty page.
{
"success": true,
"hotel_id": 702258,
"data": {
"total_reviews": 919,
"totalCountForPage": 850,
"pageable_reviews": 850,
"reviews": [...],
"filterList": [...],
"imageDomain": "ak-d.tripcdn.com"
},
"retrieved_at": "2025-01-23T12:00:00Z"
}
Review Object Structure
Core Fields
id- Review identifier from Trip.comrating- Review score (1-10 scale)title- Rating label (e.g., "Very good", "Great")text- Full review textdate- Review creation datestay_date- Guest's check-in datereviewer_name- Guest nameroom_type- Room type bookedtravel_type- Trip type (e.g., "Business traveler", "Family")images- Array of review image URLs
Filter List Object
id- Filter identifiername- Filter name (e.g., "Positive reviews", "Negative reviews")commentCount- Number of reviews matching filterfilterType- Type of filter (1 = sentiment, 2 = category)
Error Responses
Bad Request
Invalid hotel ID or parameter values
Unauthorized
Missing or invalid API key
Internal Server Error
Failed to fetch reviews from Trip.com
Usage Tips
Pagination Info
Use page_size up to 50 reviews per request. Calculate current feed pages by rounding up pageable_reviews (the alias of totalCountForPage) divided by page_size. total_reviews is the hotel aggregate, not a pagination bound.
Best Practices
- Start with page 1 and increment sequentially for pagination
- Use the filterList to understand review sentiment distribution
- Use pageable_reviews (totalCountForPage) to bound pagination; stop on an empty page and do not paginate toward the hotel aggregate total_reviews
- Cache review data as it doesn't change frequently
- Use each review’s source: tripcom, ctrip, expedia, hotelscom, tripadvisor, or unknown
- Use page_size=50 for fewer API calls when fetching the available review feed