# Trip.com Scraper — Hotels, Attractions, Trains & Cruises (`sian.agency/trip-com-scraper`) Actor

Scrape Trip.com across four verticals in one actor: hotels (plus deep detail mode), attractions & things-to-do, China train timetables & fares, and cruises. Clean structured data, simple inputs or paste a URL, free tier to try — the only multi-vertical Trip.com scraper.

- **URL**: https://apify.com/sian.agency/trip-com-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Travel, E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 66.7% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 item extracteds

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Scraper — Hotels, Attractions, Trains & Cruises ✈️

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Taobao Tmall Product Scraper](https://img.shields.io/badge/Store-Taobao%20Tmall%20Product%20Scraper-FF4F00)](https://apify.com/sian.agency/taobao-tmall-product-scraper?fpr=sian) [![Xiaohongshu RedNote Scraper](https://img.shields.io/badge/Store-Xiaohongshu%20RedNote%20Scraper-FF2442)](https://apify.com/sian.agency/xiaohongshu-rednote-scraper?fpr=sian) [![Instagram AI Transcript Extractor](https://img.shields.io/badge/Store-Instagram%20AI%20Transcript-E4405F)](https://apify.com/sian.agency/instagram-ai-transcript-extractor?fpr=sian)

#### 🎉 The ONLY Trip.com scraper that covers Hotels, Attractions, Trains AND Cruises — in one actor
##### One vertical dropdown, one clean dataset. The complete Trip.com / Ctrip travel-data toolkit for analysts, agencies, and travel-tech builders.

---

### 📋 Overview

**Pull travel data from Trip.com across four categories with a single tool** — hotels, things-to-do, China rail, and cruises, all from one Apify actor and exported as one tidy dataset.

Most Trip.com tools on the market do one thing: a hotels-only scraper here, a reviews-only scraper there. This actor is different — it is the **only Trip.com scraper covering four verticals at once**, so you stop juggling five separate tools and APIs to research a single destination.

**Why thousands of travel professionals choose us:**
- ✅ **4 verticals, 1 actor**: Hotels, Attractions, Trains, and Cruises — no other Trip.com scraper does all four
- ⚡ **Richer rows than the competition**: hotel detail mode returns rooms, the full photo album, a reviews sample, and nearby points of interest — all in a single row
- 🎯 **93–95% hotel field coverage**: prices, star ratings, review sub-scores, WGS84 coordinates, address + zones, photos and video
- 💰 **Free tier + pay-per-result**: try it for free, then only pay for the data you successfully receive
- 💎 **Built for China travel**: native China rail timetables with seat-class fares, plus international hotels, attractions and cruises
- ✨ **NEW**: pasted-URL mode — apply Trip.com's own star, price and district filters by copying any search URL

---

### ✨ Features

- 🏨 **Hotel Search**: name, star rating, live price + currency, struck-through price, lead room, review score and count, sub-scores, coordinates, address, photos and video
- 🔍 **Hotel Detail Mode**: a reviews sample, the full ~130-image photo album, ~30 nearby attractions, and reservation/policy notes — all in one row
- 🎡 **Attractions & Things-to-Do**: tickets, tours and sightseeing spots with price, rating, review count, category, plus address, opening hours and coordinates for points of interest
- 🚄 **China Rail Timetables**: every train for a route and date — train number, stations, times, duration, high-speed flag, and seat classes with fares and live ticket availability
- 🛳️ **Featured Cruises**: a curated set of featured sailings with ship, itinerary, departure city, sailing date and price
- 🎚️ **Native Filters**: paste any Trip.com search URL to carry over its star, price-band and district filters
- 🌍 **WGS84 Coordinates**: map-ready latitude/longitude for hotels, sightseeing spots and rail stations
- 📦 **One Unified Dataset**: a single `vertical` field labels every row, so mixed exports stay clean
- 💱 **Currency & Locale Control**: choose your output currency and language

---

### 🎬 Quick Start

Pick a vertical, give it a city (and dates for hotels), and run. Results stream into the Apify dataset as JSON you can export to CSV or Excel. Start on the free tier — no credit card required.

```bash
curl -X POST https://api.apify.com/v2/acts/sian.agency~trip-com-scraper/runs?token=YOUR_TOKEN \
-H 'Content-Type: application/json' \
-d '{"vertical": "hotels", "hotelCityId": "2", "hotelCityName": "Shanghai", "maxResults": 20}'
````

***

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Choose your vertical

Select **Hotels**, **Attractions**, **Trains**, or **Cruises** from the dropdown.

#### Step 2: Tell it where

Enter a city (hotels: city + check-in/check-out dates; attractions: city keyword; trains: from + to + date) — or paste a Trip.com search URL to reuse its filters.

#### Step 3: Run and export

Click **Start** and watch results fill the dataset. Download as JSON, CSV, or Excel.

**That's it! In a couple of minutes, you'll have:**

- A clean, structured dataset of Trip.com travel data
- Map-ready coordinates and rich per-row detail
- Export-ready files for your spreadsheet, database or BI tool

***

### 📥 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| vertical | string | Yes | `hotels`, `attractions`, `trains`, or `cruises` |
| maxResults | number | No | Cap how many rows to collect |
| currency | string | No | Output currency (e.g. `USD`, `CNY`) |
| locale | string | No | Output language (e.g. `en-US`) |
| hotelCityId | string | Hotels | Trip.com city ID (e.g. `2` = Shanghai) |
| hotelCityName | string | Hotels | City display name |
| checkin / checkout | string | Hotels | Stay dates (YYYY-MM-DD) |
| enableDetail | boolean | No | Hotels: also fetch rooms, full album, reviews and nearby POIs |
| searchUrl | string | No | Paste a Trip.com search URL to reuse its star/price/district filters |

**Hotels example:**

```json
{
  "vertical": "hotels",
  "hotelCityId": "2",
  "hotelCityName": "Shanghai",
  "checkin": "2026-07-10",
  "checkout": "2026-07-11",
  "enableDetail": true,
  "maxResults": 25
}
```

**Trains example (China rail):**

```json
{
  "vertical": "trains",
  "from": "Shanghai",
  "to": "Beijing",
  "date": "2026-07-10"
}
```

**Attractions example:**

```json
{
  "vertical": "attractions",
  "cityKeyword": "Tokyo"
}
```

***

### 📤 Output

Every row carries a `vertical` discriminator field so all four categories merge into one clean dataset. Headline fields by vertical:

**Hotels**

| Field | Type | Description |
|-------|------|-------------|
| name / name\_en | string | Hotel name |
| star | number | Star rating |
| price / currency | number / string | Live price + currency |
| display\_price / delete\_price | string | Shown price + struck-through price |
| comment\_score / comment\_count | number | Review score + count |
| sub\_scores | object | Cleanliness, location, service sub-ratings |
| address / zone\_names | string / array | Address and district zones |
| lat / lng | number | WGS84 coordinates |
| photos / video\_url | array / string | Imagery |
| album\_photos / reviews / nearby\_pois | array | Detail mode only |

**Attractions:** `name`, `price`, `original_price`, `comment_score`, `comment_count`, `category`, plus `address`, `open_time`, `description`, `lat`, `lng` for sightseeing spots.

**Trains:** `train_numbers`, `departure_station`, `arrival_station` (+ local names + coordinates), `departure_time`, `arrival_time`, `duration_display`, `has_high_speed`, `is_direct`, and `fares` (seat classes with price and ticket availability).

**Cruises:** `name`, `ship_name`, `company_name`, `departure_city`, `start_date`, `nights`, `price`, `currency`.

**Example (hotel row):**

```json
{
  "vertical": "hotels",
  "id": "1234567",
  "url": "https://www.trip.com/hotels/detail/?hotelId=1234567",
  "name": "The Bund Riverside Hotel",
  "star": 5,
  "price": 180,
  "currency": "USD",
  "display_price": "$180",
  "delete_price": "$240",
  "comment_score": 4.7,
  "comment_count": 2310,
  "sub_scores": { "location": 4.8, "cleanliness": 4.7, "service": 4.6 },
  "address": "No. 99 Zhongshan East Road, Huangpu",
  "zone_names": ["The Bund"],
  "lat": 31.2401,
  "lng": 121.4905,
  "photos": ["https://..."]
}
```

***

### 💼 Use Cases & Examples

#### 1. Hotel Rate & Competitor Intelligence

**Revenue managers and OTAs tracking how rival hotels price the same dates.**

**Input:** vertical `hotels`, a city + check-in/check-out
**Output:** live prices, struck-through rates, star ratings and review scores
**Use:** benchmark your property against the comp set and time your rate changes.

#### 2. Destination Market Research

**Travel-tech startups and analysts mapping a city's full travel supply.**

**Input:** run all four verticals for the same city
**Output:** hotels, attractions, trains and cruises in one merged dataset
**Use:** build a complete destination supply picture without stitching five tools together.

#### 3. China Rail Planning & Fare Monitoring

**Travel agencies and mobility apps surfacing China high-speed rail options.**

**Input:** vertical `trains`, origin → destination → date
**Output:** every train with seat-class fares and live ticket availability
**Use:** power a rail-search feature or watch fares and availability over time.

#### 4. Things-to-Do Content & Affiliate Catalogs

**Content creators and affiliate marketers building city activity guides.**

**Input:** vertical `attractions`, a city keyword
**Output:** ~144 tours and sightseeing spots with prices, ratings, hours and descriptions
**Use:** populate a "Top things to do in Tokyo" page or affiliate feed.

#### 5. Hotel Listing Enrichment

**Data teams that need deep, structured hotel profiles, not just a price.**

**Input:** vertical `hotels` with detail mode on
**Output:** the full ~130-image album, a reviews sample and nearby POIs — per hotel
**Use:** enrich a property database or train a recommendation model.

#### 6. Cruise Deal Discovery

**Cruise resellers and deal sites curating featured sailings.**

**Input:** vertical `cruises`
**Output:** a curated set of featured sailings across multiple cruise lines with itinerary and price
**Use:** seed a "featured cruises" page or monitor promoted departures.

#### 7. Location & Mapping Datasets

**GIS and proptech teams that need map-ready travel POIs.**

**Input:** hotels or attractions in any city
**Output:** WGS84 coordinates plus address and zone metadata
**Use:** plot supply on a map or join against your own geospatial layers.

***

### 🔗 Integration Examples

#### JavaScript/Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/trip-com-scraper').call({
  vertical: 'hotels',
  hotelCityId: '2',
  hotelCityName: 'Shanghai',
  maxResults: 20,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/trip-com-scraper').call(
    run_input={
        'vertical': 'attractions',
        'cityKeyword': 'Tokyo',
    }
)

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item)
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~trip-com-scraper/runs?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"vertical": "trains", "from": "Shanghai", "to": "Beijing", "date": "2026-07-10"}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. **Trigger**: Schedule or webhook
2. **HTTP Request**: Call the actor API
3. **Process**: Handle the JSON results
4. **Action**: Save to a database, notify a channel, or transform for BI

***

### 📊 Performance & Pricing

#### FREE Tier (Try It Now)

- A generous sample of rows per run — full feature access, same data quality
- No credit card required
- Perfect for testing and small projects

#### PAID Tier (Production Ready)

- **Unlimited** rows per run across all four verticals
- Pay-per-event: you're only charged for the data you successfully receive
- Hotel detail enrichment available for deep, structured profiles

💰 **Outstanding value** — competing hotel-only scrapers charge per item for a single vertical; here you get four verticals plus richer per-row detail (rooms + full album + reviews + nearby in one hotel row) under one pay-per-result actor.

🔗 [View current pricing](https://apify.com/sian.agency/trip-com-scraper?fpr=sian)

***

### ❓ Frequently Asked Questions

**Q: Which travel categories does it cover?**
A: Four — Hotels, Attractions / things-to-do, China Trains, and Cruises — all from one actor, selected by a dropdown.

**Q: How many results can I get?**
A: FREE tier returns a sample per run; PAID tier is unlimited.

**Q: How complete is the hotel data?**
A: Around 93–95% field coverage on hotels — prices, ratings, review sub-scores, coordinates, address, photos and video.

**Q: Does the cruises vertical return every cruise?**
A: No — cruises returns a curated set of featured sailings, not the full cruise catalogue. Hotels, attractions and trains return full results for your search.

**Q: What output formats are available?**
A: JSON, CSV, and Excel — export directly from the Apify dataset.

**Q: Can I apply Trip.com's own filters (star, price, district)?**
A: Yes — paste a Trip.com search URL and the actor reuses its filters.

**Q: Is this legal?**
A: Yes — we only extract publicly available data. See the [legal section](#-is-it-legal-to-scrape-data) below.

***

### 🐛 Troubleshooting

**No results returned**

- Double-check the city ID / city name, or paste a working Trip.com search URL
- For trains, confirm the route and date have scheduled service

**Hotel detail fields are empty**

- Enable detail mode (`enableDetail: true`) to fetch rooms, the full album, reviews and nearby POIs

**Fewer rows than expected**

- The FREE tier returns a sample — upgrade to PAID for unlimited rows
- Cruises always returns a curated featured set, not the full catalogue

**Prices look off**

- Set the `currency` and `locale` inputs to your preferred output

***

### ⚖️ Is it legal to scrape data?

Our actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data. Personal data is protected by the **GDPR** in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

> **Trademark notice:** Trip.com and Ctrip are trademarks of Trip.com Group Limited. This actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Trip.com Group Limited.

***

### 🤝 Support

[![Telegram Support](https://img.shields.io/badge/Telegram-Support%20Group-0088cc?logo=telegram)](https://t.me/+vyh1sRE08sAxMGRi)

**Join our active support community**

- For issues or questions, open an issue in the actor's repository
- Check the [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian) for more automation tools
- 📧 <apify@sian-agency.online>

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Actor input Schema

## `vertical` (type: `string`):

🧭 **CHOOSE A VERTICAL:** This one actor scrapes four Trip.com verticals. Pick exactly one per run — each fills its own set of fields in the dataset.

- **Hotels** — properties with price, rating, location, photos (optional per-hotel detail).
- **Attractions** — things to do / activities for a city.
- **Trains** — China high-speed & regular rail (timetables, fares).
- **Cruises** — cruise voyages from the Trip.com cruises homepage (no extra input needed).

The inputs below are grouped by vertical — only the group matching your choice is used.

## `maxResults` (type: `integer`):

🔢 **RESULT CAP:** Maximum number of rows to return for this run. Free runs are capped lower than paid runs.

## `currency` (type: `string`):

💰 **CURRENCY:** ISO currency code used for all prices (e.g. `USD`, `EUR`, `GBP`, `CNY`). Defaults to `USD`.

## `locale` (type: `string`):

🌐 **LOCALE:** Language/region locale for the Trip.com pages (e.g. `en-US`, `en-GB`, `zh-CN`). Defaults to `en-US`.

## `searchUrl` (type: `string`):

🔗 **PASTE A TRIP.COM LIST URL (OPTIONAL):** Skip the per-vertical fields below by pasting a ready-made Trip.com list/search URL — the actor harvests it directly.

- **Hotels:** the URL must contain `cityId=` and `cityName=`.
- **Attractions:** the URL must contain `keyword=` or `id=`.
- **Trains:** the URL must contain `departureStationCode=` and `arrivalStationCode=`.

💡 **TIP:** Use this for cities or routes not covered by the helper fields below.

## `hotelCityId` (type: `string`):

🏨 **HOTELS — CITY ID:** Trip.com numeric city ID (e.g. `2` for Shanghai). Required for hotels unless you provide a `searchUrl`.

## `hotelCityName` (type: `string`):

🏨 **HOTELS — CITY NAME:** Human-readable city name matching the city ID (e.g. `Shanghai`). Required for hotels unless you provide a `searchUrl`.

## `checkin` (type: `string`):

📅 **HOTELS — CHECK-IN:** Check-in date in `YYYY-MM-DD` format. Optional — Trip.com defaults are used if omitted.

## `checkout` (type: `string`):

📅 **HOTELS — CHECK-OUT:** Check-out date in `YYYY-MM-DD` format. Optional — Trip.com defaults are used if omitted.

## `adults` (type: `integer`):

👤 **HOTELS — ADULTS:** Number of adult guests for the search. Defaults to `2`.

## `rooms` (type: `integer`):

🛏️ **HOTELS — ROOMS:** Number of rooms for the search. Defaults to `1`.

## `listFilters` (type: `string`):

🔎 **HOTELS — LIST FILTERS (ADVANCED):** Opaque Trip.com `listFilters` string for slicing the hotel list by star rating, price band, etc. Copy it from a Trip.com hotel-list URL after applying filters in the browser.

## `sort` (type: `string`):

↕️ **HOTELS — SORT (ADVANCED):** Opaque Trip.com sort key controlling result ordering (e.g. by price or rating). Copy it from a Trip.com hotel-list URL after choosing a sort order.

## `enableDetail` (type: `boolean`):

💎 **HOTELS — PER-HOTEL DETAIL (PREMIUM):** When enabled, the actor opens each hotel and enriches the row with a reviews sample, the full photo album, nearby POIs and reservation/policy notes. Billed as a premium event per enriched hotel. Hotels only.

## `attractionKeyword` (type: `string`):

🎟️ **ATTRACTIONS — KEYWORD:** A city to find things to do in (e.g. `Shanghai`). Required for attractions unless you provide a `searchUrl`.

## `trainFrom` (type: `string`):

🚄 **TRAINS — FROM:** Departure city. Known cities: Shanghai, Beijing, Guangzhou, Shenzhen, Hangzhou, Chengdu, Xian, Nanjing. For any other station, paste a `searchUrl` instead. Required for trains unless you provide a `searchUrl`.

## `trainTo` (type: `string`):

🚄 **TRAINS — TO:** Arrival city. Known cities: Shanghai, Beijing, Guangzhou, Shenzhen, Hangzhou, Chengdu, Xian, Nanjing. For any other station, paste a `searchUrl` instead. Required for trains unless you provide a `searchUrl`.

## `trainDate` (type: `string`):

📅 **TRAINS — DATE:** Travel date in `YYYY-MM-DD` format. Required for trains unless you provide a `searchUrl`.

## Actor input object example

```json
{
  "vertical": "hotels",
  "maxResults": 100,
  "currency": "USD",
  "locale": "en-US",
  "hotelCityId": "2",
  "hotelCityName": "Shanghai",
  "adults": 2,
  "rooms": 1,
  "enableDetail": false,
  "attractionKeyword": "Shanghai",
  "trainFrom": "Shanghai",
  "trainTo": "Beijing"
}
```

# Actor output Schema

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

Scraped Trip.com rows for the selected vertical — names, prices, ratings, location, media and vertical-specific details.

## `htmlReport` (type: `string`):

HTML summary of the run — vertical, rows pushed, detail-enriched count and status.

# 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 = {
    "hotelCityId": "2",
    "hotelCityName": "Shanghai",
    "attractionKeyword": "Shanghai",
    "trainFrom": "Shanghai",
    "trainTo": "Beijing"
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/trip-com-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 = {
    "hotelCityId": "2",
    "hotelCityName": "Shanghai",
    "attractionKeyword": "Shanghai",
    "trainFrom": "Shanghai",
    "trainTo": "Beijing",
}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/trip-com-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "hotelCityId": "2",
  "hotelCityName": "Shanghai",
  "attractionKeyword": "Shanghai",
  "trainFrom": "Shanghai",
  "trainTo": "Beijing"
}' |
apify call sian.agency/trip-com-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sian.agency/trip-com-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Trip.com Scraper — Hotels, Attractions, Trains & Cruises",
        "description": "Scrape Trip.com across four verticals in one actor: hotels (plus deep detail mode), attractions & things-to-do, China train timetables & fares, and cruises. Clean structured data, simple inputs or paste a URL, free tier to try — the only multi-vertical Trip.com scraper.",
        "version": "1.0",
        "x-build-id": "1tbFdanneCDnsa8hZ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sian.agency~trip-com-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sian.agency-trip-com-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/sian.agency~trip-com-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sian.agency-trip-com-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/sian.agency~trip-com-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sian.agency-trip-com-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "vertical"
                ],
                "properties": {
                    "vertical": {
                        "title": "What to scrape",
                        "enum": [
                            "hotels",
                            "attractions",
                            "trains",
                            "cruises"
                        ],
                        "type": "string",
                        "description": "🧭 **CHOOSE A VERTICAL:** This one actor scrapes four Trip.com verticals. Pick exactly one per run — each fills its own set of fields in the dataset.\n\n- **Hotels** — properties with price, rating, location, photos (optional per-hotel detail).\n- **Attractions** — things to do / activities for a city.\n- **Trains** — China high-speed & regular rail (timetables, fares).\n- **Cruises** — cruise voyages from the Trip.com cruises homepage (no extra input needed).\n\nThe inputs below are grouped by vertical — only the group matching your choice is used.",
                        "default": "hotels"
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "🔢 **RESULT CAP:** Maximum number of rows to return for this run. Free runs are capped lower than paid runs.",
                        "default": 100
                    },
                    "currency": {
                        "title": "Currency",
                        "type": "string",
                        "description": "💰 **CURRENCY:** ISO currency code used for all prices (e.g. `USD`, `EUR`, `GBP`, `CNY`). Defaults to `USD`.",
                        "default": "USD"
                    },
                    "locale": {
                        "title": "Locale",
                        "type": "string",
                        "description": "🌐 **LOCALE:** Language/region locale for the Trip.com pages (e.g. `en-US`, `en-GB`, `zh-CN`). Defaults to `en-US`.",
                        "default": "en-US"
                    },
                    "searchUrl": {
                        "title": "Search URL (optional)",
                        "type": "string",
                        "description": "🔗 **PASTE A TRIP.COM LIST URL (OPTIONAL):** Skip the per-vertical fields below by pasting a ready-made Trip.com list/search URL — the actor harvests it directly.\n\n- **Hotels:** the URL must contain `cityId=` and `cityName=`.\n- **Attractions:** the URL must contain `keyword=` or `id=`.\n- **Trains:** the URL must contain `departureStationCode=` and `arrivalStationCode=`.\n\n💡 **TIP:** Use this for cities or routes not covered by the helper fields below."
                    },
                    "hotelCityId": {
                        "title": "Hotel city ID",
                        "type": "string",
                        "description": "🏨 **HOTELS — CITY ID:** Trip.com numeric city ID (e.g. `2` for Shanghai). Required for hotels unless you provide a `searchUrl`.",
                        "default": "2"
                    },
                    "hotelCityName": {
                        "title": "Hotel city name",
                        "type": "string",
                        "description": "🏨 **HOTELS — CITY NAME:** Human-readable city name matching the city ID (e.g. `Shanghai`). Required for hotels unless you provide a `searchUrl`.",
                        "default": "Shanghai"
                    },
                    "checkin": {
                        "title": "Check-in date",
                        "type": "string",
                        "description": "📅 **HOTELS — CHECK-IN:** Check-in date in `YYYY-MM-DD` format. Optional — Trip.com defaults are used if omitted."
                    },
                    "checkout": {
                        "title": "Check-out date",
                        "type": "string",
                        "description": "📅 **HOTELS — CHECK-OUT:** Check-out date in `YYYY-MM-DD` format. Optional — Trip.com defaults are used if omitted."
                    },
                    "adults": {
                        "title": "Adults",
                        "minimum": 1,
                        "type": "integer",
                        "description": "👤 **HOTELS — ADULTS:** Number of adult guests for the search. Defaults to `2`.",
                        "default": 2
                    },
                    "rooms": {
                        "title": "Rooms",
                        "minimum": 1,
                        "type": "integer",
                        "description": "🛏️ **HOTELS — ROOMS:** Number of rooms for the search. Defaults to `1`.",
                        "default": 1
                    },
                    "listFilters": {
                        "title": "Hotel list filters",
                        "type": "string",
                        "description": "🔎 **HOTELS — LIST FILTERS (ADVANCED):** Opaque Trip.com `listFilters` string for slicing the hotel list by star rating, price band, etc. Copy it from a Trip.com hotel-list URL after applying filters in the browser."
                    },
                    "sort": {
                        "title": "Hotel sort",
                        "type": "string",
                        "description": "↕️ **HOTELS — SORT (ADVANCED):** Opaque Trip.com sort key controlling result ordering (e.g. by price or rating). Copy it from a Trip.com hotel-list URL after choosing a sort order."
                    },
                    "enableDetail": {
                        "title": "Fetch per-hotel detail (premium)",
                        "type": "boolean",
                        "description": "💎 **HOTELS — PER-HOTEL DETAIL (PREMIUM):** When enabled, the actor opens each hotel and enriches the row with a reviews sample, the full photo album, nearby POIs and reservation/policy notes. Billed as a premium event per enriched hotel. Hotels only.",
                        "default": false
                    },
                    "attractionKeyword": {
                        "title": "Attraction keyword (city)",
                        "type": "string",
                        "description": "🎟️ **ATTRACTIONS — KEYWORD:** A city to find things to do in (e.g. `Shanghai`). Required for attractions unless you provide a `searchUrl`."
                    },
                    "trainFrom": {
                        "title": "Train origin",
                        "type": "string",
                        "description": "🚄 **TRAINS — FROM:** Departure city. Known cities: Shanghai, Beijing, Guangzhou, Shenzhen, Hangzhou, Chengdu, Xian, Nanjing. For any other station, paste a `searchUrl` instead. Required for trains unless you provide a `searchUrl`."
                    },
                    "trainTo": {
                        "title": "Train destination",
                        "type": "string",
                        "description": "🚄 **TRAINS — TO:** Arrival city. Known cities: Shanghai, Beijing, Guangzhou, Shenzhen, Hangzhou, Chengdu, Xian, Nanjing. For any other station, paste a `searchUrl` instead. Required for trains unless you provide a `searchUrl`."
                    },
                    "trainDate": {
                        "title": "Train date",
                        "type": "string",
                        "description": "📅 **TRAINS — DATE:** Travel date in `YYYY-MM-DD` format. Required for trains unless you provide a `searchUrl`."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
