# Trip.com Reviews Scraper - Hotel Ratings, Translations & Ctrip (`topapi/trip-com-reviews-scraper`) Actor

Scrape Trip.com and Ctrip hotel reviews by hotel link, id, name or city: rating and 4 sub-scores, text with Trip.com's translation, stay date, room, traveller type, reviewer country, photos and hotel reply, plus each hotel's rating summary. $0.45 per 1,000 reviews, no start fee.

- **URL**: https://apify.com/topapi/trip-com-reviews-scraper.md
- **Developed by:** [Top Api](https://apify.com/topapi) (community)
- **Categories:** Travel, E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.45 / 1,000 reviews

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Trip.com Reviews Scraper do?

**Trip.com Reviews Scraper** extracts hotel guest reviews from [Trip.com](https://www.trip.com) and [Ctrip](https://hotels.ctrip.com) (携程) and turns hotel links, hotel ids, hotel names or whole cities into structured rows: the guest's rating and four sub-ratings, the review text with Trip.com's own translation, stay month, room type, traveller type, the reviewer's country and level, photos and videos, and the hotel's reply. Each hotel can also get a summary row with its overall score, sub-scores against similar hotels, review counts by traveller type, language, room and topic, and Trip.com's AI review summary. Built for hotel reputation management, revenue and competitor analysis, travel research and sentiment / AI datasets.

Trip.com reviews scraper - Ctrip hotel reviews scraper - 携程酒店点评 - Trip.com API alternative

- **Every review a hotel has:** 100 reviews a request, page after page, including the reviews Trip.com folds away as repeats (Grand Hyatt Shanghai: 18,906 reviews, 4,318 of them folded).
- **Trip.com's own translations in 20 languages:** pick an output language and every foreign review comes with `translatedContent` in it (English, Japanese, German, Spanish, Thai, Arabic and more), plus the hotel's reply translated.
- **Trip.com's own filters:** sort (most relevant, most recent, rating high / low), positive / negative / with photos, review language, traveller type, room type and review topic, applied by Trip.com itself.
- **Ctrip native mode:** Chinese (Simplified) reads Ctrip's own answer: the original Simplified Chinese text and Ctrip's 5-point ratings.
- **Find hotels by name or city:** `"Marina Bay Sands"` or `"Tokyo"` work as well as links; cities come Top-reviewed first.
- **Monitoring mode:** schedule it and receive only reviews you have not received before; a run with nothing new costs nothing.
- **No login, cookies or API key:** the actor reads the same public reviews Trip.com shows a signed-out visitor.
- **Pay per review, no start fee:** $0.45 per 1,000 reviews, $1.30 per 1,000 hotel summary rows.

### What data can you get from Trip.com?

<table>
<tr>
<td>⭐ Rating out of 10 + rating word</td>
<td>📊 Location, Amenities, Service, Cleanliness</td>
<td>💬 Review text as written</td>
</tr>
<tr>
<td>🌐 Trip.com translation (20 languages)</td>
<td>🗓️ Posted date and stay month</td>
<td>🛏️ Room type (name + id)</td>
</tr>
<tr>
<td>👪 Traveller type (business, couple, family…)</td>
<td>🌍 Reviewer country, level, review count</td>
<td>📷 Guest photos (1280 px) and videos</td>
</tr>
<tr>
<td>🏨 Hotel reply + its translation</td>
<td>👍 Helpful votes, recommends flag</td>
<td>🔖 Source: Trip.com or Ctrip review</td>
</tr>
<tr>
<td>🏆 Hotel score + sub-scores vs similar hotels</td>
<td>🧮 Counts by traveller, language, room, topic</td>
<td>🤖 Trip.com's AI review summary</td>
</tr>
</table>

### How to scrape Trip.com reviews with Trip.com Reviews Scraper

1. Open the actor and click **Try for free** (Apify's free plan includes monthly credit).
2. Paste one or more **hotel links** (any Trip.com country site or Ctrip), hotel ids, **hotel names** or **cities**.
3. Set **Max reviews per hotel** (0 = all of them), and optionally a sort, a date, a rating range or an output language.
4. Click **Start**.
5. Download the reviews as JSON, CSV or Excel, or read them through the API.

### ⬇️ Input

| Field | Type | What it does | Default |
|---|---|---|---|
| `startUrls` | list | Hotel links (`www/us/uk/m.trip.com/hotels/...-hotel-detail-<id>/`, `/hotels/detail/?hotelId=<id>`, `hotels.ctrip.com/hotels/<id>.html`) or bare hotel ids | - |
| `searchQueries` | list | Hotel names as typed in Trip.com's search box, e.g. `Marina Bay Sands`; a city name reads that city's hotels | - |
| `cities` | list | City names, Trip.com city ids or hotel-list links | - |
| `maxHotels` | integer | Hotels per city, Top-reviewed first (up to ~50) | 10 |
| `maxReviewsPerHotel` | integer | Reviews per hotel; 0 = every review | 100 |
| `sortBy` | select | `mostRelevant`, `mostRecent`, `ratingHighToLow`, `ratingLowToHigh` | most relevant (most recent in monitoring) |
| `reviewFilter` | select | `all`, `positive`, `negative`, `withPhotos` (Trip.com's tabs) | all |
| `reviewLanguages` | multi-select | Keep reviews written in these languages | all |
| `travellerTypes` | multi-select | business, couple, family, friends, solo, booked for others, other | all |
| `roomIds`, `topicTagIds` | list | Trip.com room-type and topic ids (listed on every hotel row) | - |
| `language` | select | Output language of labels and translations; `zh-CN` = Ctrip native | `en-XX` |
| `cutoffDate`, `reviewsToDate` | text | Date window: `2026-01-01` or `30 days` | - |
| `minRating`, `maxRating` | integer | Rating range on the 10-point scale (`maxRating: 6` = complaints) | - |
| `keyword` | text | Keep reviews whose text or translation contains this word | - |
| `requireText` | boolean | Skip rating-only reviews | off |
| `includeHotelSummary` | boolean | One summary row per hotel ($0.0013) | on |
| `includeFoldedReviews` | boolean | Include the reviews Trip.com folds away as repeats | on |
| `monitorMode`, `monitorStoreName` | boolean, text | Only reviews not delivered by earlier runs | off |
| `maxTotalReviews` | integer | Cap on reviews for the whole run | - |
| `proxyConfiguration`, `maxConcurrency` | | Optional; Trip.com answers without a proxy | 6 parallel |

#### Input JSON

```json
{
    "startUrls": ["https://www.trip.com/hotels/shanghai-hotel-detail-346403/grand-hyatt-shanghai/"],
    "maxReviewsPerHotel": 20
}
```

#### Complaints from the last 90 days, translated into English

```json
{
    "startUrls": ["687592", "https://www.trip.com/hotels/lisbon-hotel-detail-2561632/valverde-hotel/"],
    "sortBy": "mostRecent",
    "cutoffDate": "90 days",
    "maxRating": 6,
    "maxReviewsPerHotel": 0,
    "language": "en-XX"
}
```

#### The top 20 hotels of a city, 50 reviews each, in Japanese

```json
{
    "cities": ["Bangkok"],
    "maxHotels": 20,
    "maxReviewsPerHotel": 50,
    "language": "ja-JP"
}
```

#### Paste the whole hotel link or just its id

The id is the number after `hotel-detail-` or `hotelId=`; the same id works on Trip.com and Ctrip (`hotels.ctrip.com/hotels/346403.html` is Grand Hyatt Shanghai too). Check-in dates and other parameters in the link are ignored. A Ctrip link with no output language set is read the way Ctrip shows it (Simplified Chinese, ratings out of 5); set `language` to read the same hotel on Trip.com in another language.

#### Use "Most recent" with a date for scheduled runs

Under `mostRecent` the actor stops at the first page older than `cutoffDate` (or, in monitoring mode, at the first review an earlier run delivered), so a daily run reads one page per hotel.

### ⬆️ Output

Each item has `recordType`: `review` for a guest review, `hotel` for the hotel summary row.

```json
{
  "recordType": "review",
  "id": "2134272597",
  "hotelId": "346403",
  "hotelName": "Grand Hyatt Shanghai",
  "rating": 10,
  "ratingMax": 10,
  "commentLevel": "Outstanding",
  "ratingLocation": 10, "ratingFacility": 10, "ratingService": 10, "ratingRoom": 10,
  "content": "1999年的金茂君悦年頭長了，降低了期望值。其實不錯的，門口迎賓主動開關車門拉出行李…",
  "language": "zh",
  "translatedContent": "Although the Grand Hyatt Jin Mao, built in 1999, is showing its age—which lowered our expectations—it actually turned out to be a great stay…",
  "translatedLanguage": "en",
  "createDate": "2026-10-09 16:42:41",
  "checkInDate": "2026-10-01",
  "travelTypeText": "Couple",
  "roomName": "Club Room Queen Bed",
  "imageCount": 18,
  "feedbackContent": "尊敬的賓客：感謝您帶着\"降低期望值\"的心態來打卡…",
  "feedbackTranslateContent": "Dear Guest, Thank you for your honest and detailed review…",
  "userNickName": "YPluotuo",
  "userRegion": "China",
  "userLevel": "Review Expert",
  "reviewSource": "ctrip",
  "aggregateReviewScore": 9.4
}
```

```json
{
  "recordType": "hotel",
  "hotelId": "346403",
  "hotelName": "Grand Hyatt Shanghai",
  "hotelNameLocal": "上海金茂君悦大酒店",
  "star": 5,
  "city": "Shanghai",
  "country": "China",
  "rating": 9.4,
  "ratingLocation": 9.5, "ratingFacility": 9.2, "ratingService": 9.2, "ratingRoom": 9.5,
  "similarHotelsAverage": { "location": 9.4, "amenities": 9.2, "service": 9.4, "cleanliness": 9.4 },
  "reviewCount": 18906,
  "foldedReviewCount": 4318,
  "negativeReviewCount": 459,
  "recommendPercent": 93,
  "topics": [{ "id": "70", "name": "Delicious breakfast", "count": 1128 }],
  "aiSummary": [{ "title": "Location", "conclusion": "The hotel is centrally located in Lujiazui…", "positive": true, "reviewCount": 5320 }]
}
```

#### Fields

Fill measured on our platform run of 3,087 Trip.com reviews from 3 hotels (Singapore, Tokyo, Lisbon; English output):

| Field | Filled | Field | Filled |
|---|---|---|---|
| `rating`, `ratingMax`, `id`, `content`, `language` | 100% | `ratingLocation` / `ratingFacility` / `ratingService` / `ratingRoom` | 100% |
| `createDate`, `reviewDate`, `checkInDate`, `stayMonth` | 100% | `travelType`, `travelTypeText` | 100% |
| `translatedContent` (every review not in English) | 42% | `commentLevel` (rating word) | 87% |
| `roomId` / `roomName` | 98% / 73% | `recommend`, `usefulCount` | 100% |
| `imageList` (reviews with photos) | 32% | `videoList` | under 1% |
| `feedbackContent` (hotel replied) | 63% | `feedbackTranslateContent` | 21% |
| `userNickName`, `userCommentCount`, `userLevel` | 100% | `userRegion` | 85% |
| `hotelName`, `hotelCity`, `hotelCountry`, `aggregateReview*` | 100% | `reviewSource` | 100% |

Hotel rows (8 hotels across our runs): name, local name, stars, address, coordinates, overall and sub-ratings, review counts, traveller / room / topic counts 100%; `similarHotelsAverage` and `aiSummary` 80-100%; `openYear` 67-80%, `renovationYear` 33-60% (where Trip.com lists them). Ctrip native rows (`zh-CN`) carry no sub-ratings, reviewer country, room id or recommend flag: Ctrip's answer does not have them.

### Use cases

- 🏨 **Hotel reputation management:** every new review and the hotel's reply for your properties, on a schedule.
- 📉 **Complaint mining:** negative or low-rated reviews (`maxRating: 6`) with Trip.com's English translation, by room type or traveller type.
- 🆚 **Competitor benchmarking:** sub-ratings and review counts of a city's top hotels, with Trip.com's similar-hotel averages.
- 🇨🇳 **China market research:** Ctrip guests' reviews of Chinese and overseas hotels, translated into your language.
- 🤖 **AI and sentiment datasets:** review text with language codes, translations, ratings and topics.
- 📈 **Revenue and travel analytics:** traveller mix, stay months and room types from guest reviews.

### How much does it cost to scrape Trip.com reviews?

Pay per row, no start fee. Reviews removed by your filters, duplicates and reviews already delivered in monitoring mode are not charged.

| Event | Price per 1,000 |
|---|---|
| Review | $0.45 |
| Hotel summary row (add-on) | $1.30 |

| Example run (our test runs) | Rows | Cost |
|---|---|---|
| 1 hotel, 20 reviews + hotel row (the prefill) | 21 | $0.0103 |
| 5 hotels, 100 reviews each + hotel rows | 489 | $0.22 |
| 3 hotels, every review (3,087) + hotel rows | 3,090 | $1.39 |
| 10,000 reviews of one hotel + hotel row | 10,001 | $4.50 |
| Bangkok's top 10 hotels + 1 by name, 30 reviews each, in Japanese | 341 | $0.16 |
| Monitoring run with nothing new | 0 | $0 |

Set **Maximum cost per run** in the run options to cap any run; the actor stops cleanly at the limit.

### Run it on a schedule

Turn on `monitorMode`, give the watch a `monitorStoreName`, save the input as a task and schedule it daily. The first run returns the newest reviews up to your limit and remembers them; later runs return only reviews posted since, reading newest first and stopping at the first review already delivered. The hotel row is sent only when a hotel has new reviews. In our test, the second run of a 3-hotel watch list returned 0 rows, charged nothing and cost $0.00014 in platform usage.

### Integrations, API & MCP

- **Schedules and webhooks:** run on a schedule and get a call when a run finishes.
- **Make, Zapier, n8n, Google Sheets, Slack:** connect through Apify's integrations.
- **API:** start runs and read results from [Python](https://apify.com/TopApi/trip-com-reviews-scraper/api/python) or [JavaScript](https://apify.com/TopApi/trip-com-reviews-scraper/api/javascript) with the Apify client.
- **MCP:** AI agents can call the actor through the [Apify MCP server](https://apify.com/TopApi/trip-com-reviews-scraper/api/mcp).

### More scrapers from TopApi

- 🏨 [Agoda Reviews Scraper](https://apify.com/TopApi/agoda-reviews-scraper): Agoda hotel reviews with traveller type and hotel replies
- 🛎️ [Booking.com Hotels Scraper](https://apify.com/TopApi/booking-hotels-scraper): Booking.com hotels, prices, rooms and availability
- 🧳 [Expedia & Hotels.com Scraper](https://apify.com/TopApi/expedia-hotels-scraper): hotels, prices and reviews from Expedia
- 🔎 [Google Hotels Scraper](https://apify.com/TopApi/google-hotels-scraper): hotel prices by booking site and ratings
- ⭐ [Google Maps Reviews Scraper](https://apify.com/TopApi/google-maps-reviews-scraper): reviews from Google Maps places

All TopApi actors: [apify.com/TopApi](https://apify.com/TopApi)

### Limits & empty runs

- Trip.com pages reviews 100 at a time; every review is reachable (`totalCount` on the hotel row). Our runs read about 400 reviews a second (3,087 reviews in 7 seconds), so an 18,000-review hotel takes under a minute with `maxReviewsPerHotel: 0`.
- Trip.com gives the stay as a month: `checkInDate` is always the 1st of that month.
- Ctrip native mode (`zh-CN`): ratings are out of 5, and Ctrip's answer has no per-review sub-ratings, reviewer country or room id; the positive / negative, room and topic filters apply on Trip.com only.
- `translatedContent` is empty when a review is already in the output language; Chinese (Traditional) outputs show Chinese reviews as written.
- A city reads Trip.com's hotel lists in five orders (10-12 hotels each), so about 50 distinct hotels per city at most.
- A run that finds nothing ends with a message saying why (unknown hotel, filters, nothing new in monitoring mode) and charges nothing. A run Trip.com refuses completely ends as failed and charges nothing.

### ❓ FAQ

#### How much does Trip.com Reviews Scraper cost?

$0.45 per 1,000 reviews and $1.30 per 1,000 hotel summary rows (one per hotel, optional). No start fee.

#### How many reviews can Trip.com Reviews Scraper return per hotel?

All of them: set `maxReviewsPerHotel` to 0. 1,723 reviews of Marina Bay Sands took 18 requests in our test run.

#### Does Trip.com Reviews Scraper translate reviews?

It returns Trip.com's own translation (`translatedContent`) in the output language you pick: 20 languages, including English, Japanese, Korean, German, French, Spanish, Thai and Arabic. The hotel's reply is translated too.

#### Does it scrape Ctrip (携程) reviews?

Yes. Trip.com shows Ctrip guests' reviews (`reviewSource: "ctrip"`), and Chinese (Simplified) output reads Ctrip's own answer with the original Simplified Chinese text. Ctrip links work as input.

#### Can I find hotels without a link?

Yes: type the hotel name in `searchQueries` or a city in `cities`. A city's hotels come Top-reviewed first.

#### Can I get only new reviews on a schedule with Trip.com Reviews Scraper?

Yes, with `monitorMode`: later runs return only reviews not delivered before and charge nothing when there are none.

#### Can I use Trip.com Reviews Scraper with the Apify API or Python?

Yes, through the [API tab](https://apify.com/TopApi/trip-com-reviews-scraper/api/python) with the Apify client for Python or JavaScript.

#### Can AI agents use Trip.com Reviews Scraper through MCP?

Yes, through the [Apify MCP server](https://apify.com/TopApi/trip-com-reviews-scraper/api/mcp).

#### Do I need a Trip.com account, login or API key?

No.

#### Why did my run return no reviews?

The status message says why: the hotel id has no reviews on Trip.com, your filters removed every review, or nothing is new since the last monitoring run. The run summary (`RUN_SUMMARY` in the key-value store) lists every hotel with its counts.

#### Your feedback

Missing a field or a filter? Open an issue on the [Issues tab](https://apify.com/TopApi/trip-com-reviews-scraper/issues/open) and we will look at it.

# Actor input Schema

## `startUrls` (type: `array`):

Trip.com hotel pages from any country site, Ctrip pages (hotels.ctrip.com/hotels/1286148.html, read in Chinese unless Output language is set) or bare hotel ids, e.g. "346403".

## `searchQueries` (type: `array`):

No link at hand? Type the hotel as you would in Trip.com's search box, e.g. "Marina Bay Sands", "Grand Hyatt Shanghai". The best hotel match is read; a city name reads that city's top hotels.

## `cities` (type: `array`):

Whole destinations, e.g. "Shanghai", "Tokyo", "Bangkok", a Trip.com city id ("2") or a hotel-list link. Hotels come Top-reviewed first, then by Trip.com's other orders.

## `maxHotels` (type: `integer`):

Hotels to read per city (Top-reviewed first). Trip.com shows 10-12 per list view; the actor walks 5 sort orders, so up to about 50 distinct hotels.

## `maxReviewsPerHotel` (type: `integer`):

Reviews to deliver per hotel - the main cost control. 0 = every review the hotel has (big hotels carry 10,000-20,000; 100 a request).

## `sortBy` (type: `string`):

Trip.com's review orders. Empty = Most relevant (Most recent in monitoring mode). Most recent + a date below stops at the first older review, which keeps scheduled runs cheap.

## `reviewFilter` (type: `string`):

Trip.com's review tabs: positive, negative (what guests complain about) or with photos / video.

## `reviewLanguages` (type: `array`):

Keep reviews written in these languages. Empty = every language (Chinese hotels are mostly Chinese reviews, each with Trip.com's translation).

## `travellerTypes` (type: `array`):

Keep reviews from these kinds of traveller. Empty = all.

## `roomIds` (type: `array`):

Only reviews of these room types, by Trip.com room id. Every hotel row lists its reviewed room types with ids and counts (roomTypes).

## `topicTagIds` (type: `array`):

Only reviews Trip.com tags with these topics, e.g. "70" (Delicious breakfast), "85" (Great location). Every hotel row lists its topics with ids and counts.

## `language` (type: `string`):

Language of the labels (traveller type, room, rating word) and of Trip.com's translation (translatedContent). Reviews themselves stay as written. Chinese (Simplified) reads Ctrip's own answer.

## `cutoffDate` (type: `string`):

Only reviews posted on or after this date: "2026-01-01", or an age such as "30 days" for a monthly schedule. Empty = every review.

## `reviewsToDate` (type: `string`):

Only reviews posted on or before this date, e.g. "2026-06-30".

## `minRating` (type: `integer`):

Keep reviews rated at least this on Trip.com's 10-point scale, e.g. 8 for praise.

## `maxRating` (type: `integer`):

Keep reviews rated at most this, e.g. 6 for complaints.

## `keyword` (type: `string`):

Keep reviews whose text or translation contains this word, e.g. "breakfast", "parking", "早餐".

## `requireText` (type: `boolean`):

Skip rating-only reviews.

## `includeHotelSummary` (type: `boolean`):

One extra row per hotel ($0.0013): name, stars, address, coordinates, overall + 4 sub-ratings vs similar hotels, review counts (positive, negative, with media), traveller / language / room / topic counts and Trip.com's AI summary.

## `includeFoldedReviews` (type: `boolean`):

Trip.com folds some reviews away as repeats (Grand Hyatt Shanghai: 4,318 of 18,906). On = every review; off = only what the hotel page lists.

## `monitorMode` (type: `boolean`):

Remembers the reviews delivered for each hotel; later runs return only new ones and stop at the first known review (newest first). Pairs with a daily schedule. The hotel row is sent only when there are new reviews.

## `monitorStoreName` (type: `string`):

Optional name for the remembered state, e.g. "my-hotels". Use one name per watch list.

## `maxTotalReviews` (type: `integer`):

Optional cap on reviews for the whole run, across all hotels. 0 = no cap.

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

Optional. Trip.com answers without a proxy; a proxy you set is tried first.

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

Requests to Trip.com at the same time. The actor slows down by itself when Trip.com refuses a request.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.trip.com/hotels/shanghai-hotel-detail-346403/grand-hyatt-shanghai/"
  ],
  "maxHotels": 10,
  "maxReviewsPerHotel": 20,
  "includeHotelSummary": true,
  "includeFoldedReviews": true,
  "maxConcurrency": 6
}
```

# Actor output Schema

## `results` (type: `string`):

One item per guest review, plus one rating-summary item per hotel when the hotel row is on (the recordType field says which).

## `summary` (type: `string`):

Per-hotel counts (delivered, examined, Trip.com's totals, pages), hotel-name and city searches, filtered counts, not-found inputs, routes used, field fill and charges.

# 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 = {
    "startUrls": [
        "https://www.trip.com/hotels/shanghai-hotel-detail-346403/grand-hyatt-shanghai/"
    ],
    "maxReviewsPerHotel": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("topapi/trip-com-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 = {
    "startUrls": ["https://www.trip.com/hotels/shanghai-hotel-detail-346403/grand-hyatt-shanghai/"],
    "maxReviewsPerHotel": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("topapi/trip-com-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 '{
  "startUrls": [
    "https://www.trip.com/hotels/shanghai-hotel-detail-346403/grand-hyatt-shanghai/"
  ],
  "maxReviewsPerHotel": 20
}' |
apify call topapi/trip-com-reviews-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,topapi/trip-com-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/sQQMNShNMOJrE24RI/builds/9c6kYaazx0L4cRceg/openapi.json
