# Ctrip / Trip.com Hotel Scraper - Prices, Ratings & Availability (`thirdwatch/ctrip-hotels-scraper`) Actor

Export Trip.com hotel listings by city and stay date, including available nightly prices, currencies and ratings. 按入住日期采集携程酒店列表，导出上海或新加坡的房价和评分。

- **URL**: https://apify.com/thirdwatch/ctrip-hotels-scraper.md
- **Developed by:** [Thirdwatch](https://apify.com/thirdwatch) (community)
- **Categories:** Travel
- **Features:** Limited permissions
- **Stats:** 66 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $30.00 / 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/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

## Ctrip / Trip.com Hotel Scraper

> **Thirdwatch portfolio:** 8,800+ users across 140+ public Actors, 2M+ records delivered, >95% run success. [Explore all Thirdwatch Actors](https://apify.com/thirdwatch).

Scrape hotel listings from **Trip.com** (the English face of Ctrip): prices, ratings, reviews, location, star class, amenities, room types, and photos for any city and date range.

### What you get per hotel

| Field | Description |
| --- | --- |
| `hotel_name` | Hotel name |
| `hotel_id` | Trip.com internal hotel ID |
| `url` | Detail page URL |
| `price` | Lowest nightly rate seen |
| `currency` | Currency code (USD default) |
| `original_price` | Crossed-out / pre-discount price when present |
| `rating` | User rating (0-5 scale on Trip.com) |
| `rating_label` | "Excellent" / "Very good" / etc. |
| `reviews_count` | Total user reviews |
| `stars` | Star class (1-5) |
| `address` | Street / area description |
| `city`, `district` | Location breakdown |
| `latitude`, `longitude` | Map coordinates |
| `image_url` | Primary photo |
| `amenities` | List of facility names |
| `room_types` | Sample room types from card |
| `tags` | Promotional / property tags |
| `distance_from_center` | When Trip.com provides it |
| `checkin_date`, `checkout_date`, `search_city` | Echoed inputs |
| `source` | How this row was collected; rows collected differently can carry slightly different fields |

### Input

```json
{
  "city": "Tokyo",
  "cityId": 228,
  "checkIn": "2026-06-01",
  "checkOut": "2026-06-03",
  "guests": 2,
  "rooms": 1,
  "maxResults": 50
}
```

`cityId` is **strongly recommended** for production. Trip.com's hotel list endpoint requires a numeric city ID — passing only a city name does **not** drive a search. The actor has a small built-in map of verified IDs (Tokyo 228, Singapore 73, Beijing 1, Shanghai 2, Madrid 357, Granada 717, New Delhi 495) and tries an in-browser autocomplete fallback for everything else, but the autocomplete resolver is not 100% reliable. To grab a cityId by hand, open `https://www.trip.com/hotels/list?city=<id>` for guesses and check the page title.

### Input parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `city` | Yes | City name to search hotels in (e.g., `Tokyo`, `Bangkok`, `Paris`, `Singapore`). Default `Tokyo`. |
| `cityId` | No | Trip.com internal city ID. If known, this is faster and more reliable than the city name. Example: `228` for Tokyo, `192` for Paris. Leave blank to auto-resolve from city name. |
| `checkIn` | Yes | Check-in date in `YYYY-MM-DD` format. Default `2026-12-01`. |
| `checkOut` | Yes | Check-out date in `YYYY-MM-DD` format. Default `2026-12-03`. |
| `guests` | No | Number of adult guests (1-10). Default `2`. |
| `rooms` | No | Number of rooms (1-5). Default `1`. |
| `maxResults` | No | Maximum number of hotels to scrape. Default `10`. |
| `proxyConfiguration` | No | Proxy settings. Preconfigured for reliable access — leave default unless you have a specific reason to change it. |

### Output fields

- One row per result with stable keys.

### Use cases

- Travel teams monitoring listings and reviews
- Analysts comparing destinations and operators
- Researchers building travel datasets

### Limitations

- `maxResults` above roughly 50-100 hotels may return fewer than requested, since Trip.com's listing loads progressively for a given city and date range.
- Occasionally a run returns fewer hotels than requested if Trip.com temporarily rate-limits the request; retrying later usually resolves it.
- Prices are requested in USD; Trip.com may still return rates that already include local taxes or fees.
- City-name auto-resolve is best-effort. For ambiguous city names, supply `cityId` directly — the built-in map covers Tokyo, Singapore, Beijing, Shanghai, Madrid, Granada, and New Delhi.

### Related Actors

- [Airbnb Scraper - Listings, Prices & Ratings](https://apify.com/thirdwatch/airbnb-scraper) — Thirdwatch
- [Booking.com Hotel Scraper - Prices, Ratings & Amenities](https://apify.com/thirdwatch/booking-hotel-scraper) — Thirdwatch
- [Google Flights Scraper - Fares, Routes & Price Monitoring](https://apify.com/thirdwatch/google-flights-scraper) — Thirdwatch

Last verified: 2026-10

More scrapers at [thirdwatch.dev](https://thirdwatch.dev).

# Actor input Schema

## `city` (type: `string`):

City name to search hotels in. Examples: 'Tokyo', 'Bangkok', 'Paris', 'Singapore'.

## `cityId` (type: `integer`):

Trip.com internal city ID. If known, this is faster and more reliable than the city name. Example: 228 for Tokyo, 187 for Paris. Leave blank to auto-resolve from city name.

## `checkIn` (type: `string`):

Check-in date in YYYY-MM-DD format.

## `checkOut` (type: `string`):

Check-out date in YYYY-MM-DD format.

## `guests` (type: `integer`):

Number of adult guests.

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

Number of rooms.

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

Maximum number of hotels to scrape.

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

Preconfigured for reliable access to Trip.com's hotel listings — leave this at its default unless you have a specific reason to change it.

## Actor input object example

```json
{
  "city": "Tokyo",
  "checkIn": "2026-12-01",
  "checkOut": "2026-12-03",
  "guests": 2,
  "rooms": 1,
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "city": "Tokyo",
    "checkIn": "2026-12-01",
    "checkOut": "2026-12-03",
    "guests": 2,
    "rooms": 1,
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("thirdwatch/ctrip-hotels-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 = {
    "city": "Tokyo",
    "checkIn": "2026-12-01",
    "checkOut": "2026-12-03",
    "guests": 2,
    "rooms": 1,
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("thirdwatch/ctrip-hotels-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 '{
  "city": "Tokyo",
  "checkIn": "2026-12-01",
  "checkOut": "2026-12-03",
  "guests": 2,
  "rooms": 1,
  "maxResults": 50
}' |
apify call thirdwatch/ctrip-hotels-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thirdwatch/ctrip-hotels-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/qrsBezjxNAYMywcG7/builds/PnlJUM6wpEckPAlnZ/openapi.json
