GET

Trip.com Hotel Reviews API

Extract comprehensive hotel reviews from Trip.com with detailed ratings, guest feedback, and filter options for sentiment analysis.

Overview

Multi-Provider Reviews

Trip.com aggregates reviews from multiple sources including TripAdvisor and Expedia, providing a comprehensive view of guest feedback.

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

GET https://api.stayapi.com/v1/tripcom/hotel/reviews/{hotel_id}

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

Returns a JSON object containing reviews array, total count, and available filters.

{
  "data": {
    "totalCount": 919,
    "commentList": [...],
    "filterList": [...],
    "imageDomain": "ak-d.tripcdn.com"
  }
}

Review Object Structure

Core Fields

  • id - Unique review identifier
  • content - Full review text
  • checkInDate - Guest's check-in date
  • language - Review language code
  • source - Review source (1 = Trip.com)
  • usefulCount - Number of helpful votes
  • canMarkUseful - Whether review can be marked helpful

Filter List Object

  • id - Filter identifier
  • name - Filter name (e.g., "Positive reviews", "Negative reviews")
  • commentCount - Number of reviews matching filter
  • filterType - Type of filter (1 = sentiment, 2 = category)

Error Responses

400

Bad Request

Invalid hotel ID or parameter values

401

Unauthorized

Missing or invalid API key

500

Internal Server Error

Failed to fetch reviews from Trip.com

Usage Tips

Pagination Info

Use page_size up to 50 reviews per request. Calculate total pages by dividing totalCount by page_size.

Best Practices

  • Start with page 1 and increment sequentially for pagination
  • Use the filterList to understand review sentiment distribution
  • Monitor the totalCount to know when to stop paginating
  • Cache review data as it doesn't change frequently
  • Reviews include data from multiple providers (Trip.com, TripAdvisor, Expedia)
  • Use page_size=50 for fewer API calls when fetching all reviews
Request
curl -X GET "https://api.stayapi.com/v1/tripcom/hotel/reviews/702258?page=1&page_size=10" \
  -H "X-API-Key: YOUR_API_KEY"
Response
{
  "data": {
    "imageDomain": "ak-d.tripcdn.com",
    "totalCount": 919,
    "repeatCommentCount": 208,
    "filterList": [
      {
        "id": 1,
        "name": "All reviews",
        "commentCount": 919,
        "filterType": 1
      },
      {
        "id": 2,
        "name": "Positive reviews",
        "commentCount": 863,
        "filterType": 1
      },
      {
        "id": 3,
        "name": "Negative reviews",
        "commentCount": 56,
        "filterType": 1
      },
      {
        "id": 6,
        "name": "Reviews with photos/video",
        "commentCount": 264,
        "filterType": 1
      }
    ],
    "commentList": [
      {
        "id": 1767021456,
        "usefulCount": 0,
        "source": 1,
        "language": "en",
        "canMarkUseful": true,
        "checkInDate": "2025-11-01 00:00:00",
        "content": "Generally it was a pleasant stay and experience with Dara Hotel. It is next to a premium Mall - CENTRAL..."
      },
      {
        "id": 1717544824,
        "usefulCount": 0,
        "source": 1,
        "language": "en",
        "canMarkUseful": true,
        "checkInDate": "2025-09-15 00:00:00",
        "content": "Great location, friendly staff, and clean rooms. Would definitely recommend!"
      }
    ]
  }
}