# Trip.com Reviews Scraper (`scrapyx/tripcom-reviews-scraper`) Actor

Extracts the aggregate rating and latest guest reviews for any hotel listed on Trip.com by hotel review-page URL.

- **URL**: https://apify.com/scrapyx/tripcom-reviews-scraper.md
- **Developed by:** [Ibnu Adzim](https://apify.com/scrapyx) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Trip.com Reviews Scraper

Extracts the aggregate rating and latest guest reviews for any hotel listed on Trip.com — just give it the hotel's review-page URL.

### Why use this actor

- No account, no login, no API key — works on public hotel pages only.
- Returns the hotel's aggregate rating (score, best-possible score, total review count) plus the platform's most recent guest reviews, each with rating, full text, reviewer name, and publish date.
- Every hotel you submit gets at least one output row — including a clear diagnostic reason on the rare rows that couldn't be fetched, so nothing silently disappears from your results.

### How it works

1. You give the actor one or more Trip.com hotel review-page URLs.
2. For each hotel, it reads the rating and reviews directly out of the page's own structured data — no separate API call, no pagination to manage.
3. Results are streamed to your dataset as they finish.
4. You export the finished dataset as JSON, CSV, or Excel straight from the Apify Console.

### Input

```json
{
  "hotelUrls": [
    "https://us.trip.com/hotels/singapore-hotel-detail-995074/hotel-royal-singapore/review.html"
  ],
  "maxConcurrency": 5
}
```

| Field | Type | Description |
|---|---|---|
| `hotelUrls` | array of strings | Trip.com hotel **review page** URLs — look for the "Reviews" tab/link on a hotel's page; the URL ends in `/review.html`. |
| `maxConcurrency` | integer | How many hotels to process at the same time. Default `5`. |
| `proxyConfiguration` | object | Optional. Not required — no bot-mitigation was found on this page tier. |

### Output

Each hotel produces one **summary** row plus one **review** row per guest review. Real examples from a live run:

**Summary row** (`recordType: "SUMMARY"`):

```json
{
  "_input": "https://us.trip.com/hotels/singapore-hotel-detail-995074/hotel-royal-singapore/review.html",
  "_source": "S1-review-page-jsonld",
  "_scrapedAt": "2026-08-10T12:50:00Z",
  "recordType": "SUMMARY",
  "hotelUrl": "https://us.trip.com/hotels/singapore-hotel-detail-995074/hotel-royal-singapore/review.html",
  "name": "Hotel Royal Singapore",
  "aggregateRating": { "ratingValue": 8.4, "ratingCount": 1582, "bestRating": 10, "worstRating": 0 },
  "_reviewsInDataset": 15,
  "_reviewsTotalOnPlatform": 1582,
  "_note": "Trip.com's review page publishes only its 15 most recent reviews as structured data; 1582 exist on the platform in total."
}
```

**Review row** (`recordType: "REVIEW"`):

```json
{
  "_input": "https://us.trip.com/hotels/singapore-hotel-detail-995074/hotel-royal-singapore/review.html",
  "_source": "S1-review-page-jsonld",
  "_scrapedAt": "2026-08-10T12:50:00Z",
  "recordType": "REVIEW",
  "hotelName": "Hotel Royal Singapore",
  "reviewRating": { "ratingValue": 10, "bestRating": 10, "worstRating": "0" },
  "reviewBody": "Bday staycation love staying at the hotel thank you enjoying the place with my friends thank you tripe.com",
  "author": { "name": "Phoebe Baita" },
  "datePublished": "2026-08-10 18:08:23"
}
```

When a hotel can't be found or the input isn't a Trip.com URL, the actor still emits one row for that input with a clear reason:

```json
{
  "_input": "https://us.trip.com/hotels/singapore-hotel-detail-999999999999/nonexistent-hotel/review.html",
  "_source": "none",
  "_scrapedAt": "2026-08-10T12:50:00Z",
  "recordType": "ERROR",
  "_error": "not_found",
  "_errorDetail": "No Hotel structured data on ... -- likely a removed/invalid hotel ID."
}
```

| Field | Type | Description |
|---|---|---|
| `_input` | string | The hotel URL you submitted. |
| `_source` | string | Which internal strategy produced this row. `"none"` on a failed row. |
| `_scrapedAt` | string | UTC timestamp of when this row was produced. |
| `recordType` | string | `"SUMMARY"`, `"REVIEW"`, or `"ERROR"`. |
| `_reviewsInDataset` / `_reviewsTotalOnPlatform` / `_note` | — | Present on a SUMMARY row only when the platform has more reviews than are published in this dataset — see Notes / limits below. |
| `_error` | string | Present only on rows that couldn't be fetched, e.g. `not_found`, `invalid_input`. |
| `_errorDetail` | string | Human-readable detail for the error, present only alongside `_error`. |
| *(all other fields)* | — | On a successful row, every field Trip.com's own structured data provides is passed through unchanged. |

### Notes / limits

- **Reviews are a snapshot, not full history.** Trip.com's review pages publish only their 15 most recent reviews as structured data (confirmed across hotels with 470 to 1,582 total reviews) — there is no pagination available for this data source. `aggregateRating.ratingCount` always reflects the true total; the `review` rows in this dataset are the latest slice of it, flagged explicitly on the SUMMARY row whenever the total exceeds what's included.
- Make sure you're using the hotel's **review page** (`/review.html`), not its general detail page — the detail-page URL format doesn't carry review data.

### Other actors in this collection

| Actor | What it returns |
|---|---|
| Agoda Reviews Scraper | Guest reviews for hotels listed on Agoda.com |
| GetYourGuide Reviews Scraper | Guest reviews for tours/activities listed on GetYourGuide |
| Booking.com Reviews Scraper | Guest reviews for hotels listed on Booking.com |
| Orbitz Hotel Reviews Scraper | Guest reviews for hotels listed on Orbitz.com |

# Actor input Schema

## `hotelUrls` (type: `array`):

Trip.com hotel review page URLs, e.g. https://us.trip.com/hotels/singapore-hotel-detail-995074/hotel-royal-singapore/review.html

## `maxConcurrency` (type: `integer`):

Maximum number of hotels processed in parallel.

## `proxyConfiguration` (type: `object`):

Optional. Recon found no WAF/bot-mitigation on this page tier -- a direct connection works.

## Actor input object example

```json
{
  "hotelUrls": [
    "https://us.trip.com/hotels/singapore-hotel-detail-995074/hotel-royal-singapore/review.html"
  ],
  "maxConcurrency": 5
}
```

# Actor output Schema

## `items` (type: `string`):

One row per scraped record. See the dataset's default view for field definitions.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "hotelUrls": [
        "https://us.trip.com/hotels/singapore-hotel-detail-995074/hotel-royal-singapore/review.html"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapyx/tripcom-reviews-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "hotelUrls": ["https://us.trip.com/hotels/singapore-hotel-detail-995074/hotel-royal-singapore/review.html"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapyx/tripcom-reviews-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "hotelUrls": [
    "https://us.trip.com/hotels/singapore-hotel-detail-995074/hotel-royal-singapore/review.html"
  ]
}' |
apify call scrapyx/tripcom-reviews-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapyx/tripcom-reviews-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/2JR9Yz2x5CFaRwpM8/builds/uutzfuYOafVSZa8n8/openapi.json
