# Trip.com Hotels Scraper: Prices, Ratings & Locations (`axlymxp/trip-com-hotels-scraper`) Actor

Search Trip.com hotels by city name and dates: star class, guest score, nightly price with and without tax, coordinates, address and detail link. Pages through the whole city up to your limit. No login needed. Pay only for the hotels returned.

- **URL**: https://apify.com/axlymxp/trip-com-hotels-scraper.md
- **Developed by:** [axly](https://apify.com/axlymxp) (community)
- **Categories:** Travel, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 dataset items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Trip.com Hotels Scraper

Export hotel listings from Trip.com for any city and date range as structured JSON: name, star class, guest score, nightly price with and without tax, coordinates, address and a link to the hotel page. Type a city name such as "Tokyo" (or a numeric Trip.com city id) and the actor pages through the results until it has your `maxItems`. No login, no cookies to supply.

### What you get

| Field | Type | Description |
| --- | --- | --- |
| `hotel_id` | integer | Trip.com hotel id |
| `name` | string | Hotel name in the chosen locale |
| `address` | string | Full street address |
| `city_id`, `city_name` | integer, string | City the search resolved to |
| `star`, `star_type` | number, string | Star, diamond or circle class symbol (`STAR`, `DIAMOND` or `CIRCLE`) |
| `review_score`, `score_scale`, `review_level` | number, number, string | Guest score (out of 5), the scale, and the word rating |
| `price` | number | Lowest nightly rate including taxes and fees |
| `price_excl_tax` | number | The same rate excluding taxes and fees |
| `delete_price` | number | Struck-through price shown next to the rate, when present |
| `currency` | string | ISO 4217 code of the prices |
| `latitude`, `longitude` | number | WGS84 coordinates |
| `detail_url` | string | Hotel page on trip.com |
| `checkin`, `checkout` | string | The dates you searched |
| `scraped_at` | string | UTC timestamp |

With **Fetch full hotel detail** switched on, rows also carry `en_name`, `country_name`, `open_year` and `highlights[]` (one extra request per hotel, so runs are slower).

### Use cases

- **Rate monitoring**: schedule the same city and dates daily and compare nightly prices and discounts over time.
- **Market coverage**: pull the hotel supply of a destination for a travel marketplace, a map or a research dataset.
- **Competitive analysis**: compare star class, guest scores and price levels across districts or cities.
- **Lead lists**: hotel names, addresses and coordinates for outreach or local-market work.

### Input

| Field | Default | Description |
| --- | --- | --- |
| `destination` | required | City name (`Tokyo`, `Bangkok`, `Paris`) or numeric Trip.com city id |
| `checkIn`, `checkOut` | +7 / +8 days | `YYYY-MM-DD`; check-in must not be in the past |
| `adults`, `rooms` | 2, 1 | Guests (1-8) and rooms (1-4) |
| `maxItems` | 100 | Stop after this many hotels |
| `fetchDetail` | off | Add English name, country, opening year and highlights |
| `currency`, `locale` | USD, en-US | Price currency and text language |
| `cityScope` | auto | Override only if a numeric city id returns nothing |
| `proxyConfiguration` | none | Optional; enable if requests are blocked |

```json
{
    "destination": "Bangkok",
    "checkIn": "2026-11-10",
    "checkOut": "2026-11-13",
    "adults": 2,
    "maxItems": 100,
    "currency": "EUR"
}
```

#### Example output

```json
{
    "hotel_id": 132914314,
    "name": "Bangkok City Rama 9 Hotel",
    "address": "499 Thanon Asok - Din Daeng, Din Daeng, Bangkok, 10400, Thailand",
    "city_id": 359,
    "city_name": "Bangkok",
    "star": 4.0,
    "star_type": "STAR",
    "review_score": 4.3,
    "review_level": "Very good",
    "score_scale": 5,
    "price": 40.0,
    "price_excl_tax": 34.0,
    "currency": "EUR",
    "latitude": 13.755873,
    "longitude": 100.563484,
    "detail_url": "https://www.trip.com/hotels/detail/?hotelId=132914314&cityId=359",
    "checkin": "2026-11-10",
    "checkout": "2026-11-13",
    "scraped_at": "2026-10-11T03:00:00Z"
}
```

### Scheduling and integrations

Use Apify schedules for daily or weekly runs, call the actor through the API or webhooks, and export to JSON, CSV, Excel, Google Sheets or your database. It plugs into Make, Zapier and n8n like any Apify actor.

### FAQ

**How many hotels can I get per city?** The actor pages until it reaches `maxItems` or the end of the city's results. Large cities list several thousand hotels, so set `maxItems` to what you need.

**Are the prices live?** Yes. They are fetched at run time for your dates, guests and currency. The price is the lowest nightly rate Trip.com shows for the hotel in the search results, not a specific room.

**Why can a page contain repeats?** Trip.com's result pages occasionally overlap; the actor removes duplicate hotel ids, so every row is unique.

**What scale is the guest score?** `review_score` is out of 5 (see `score_scale`).

**Do I need a proxy?** Not in our tests from the Apify cloud. If Trip.com starts blocking your runs, enable `proxyConfiguration`.

**Is it legal?** The actor reads publicly visible search results. You are responsible for complying with Trip.com's terms and the laws that apply to you.

# Actor input Schema

## `destination` (type: `string`):

City or region to search: a name such as 'Tokyo', 'Bangkok' or 'Paris', or a numeric Trip.com cityId (e.g. 73 for Singapore). Names are resolved automatically.

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

Check-in date, YYYY-MM-DD. Leave empty for 7 days from today. Must not be in the past.

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

Check-out date, YYYY-MM-DD, after check-in. Leave empty for 8 days from today.

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

Number of adults (1–8).

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

Number of rooms (1–4).

## `maxItems` (type: `integer`):

Maximum number of hotels to collect. The actor pages through the results until it has this many or the city is exhausted.

## `fetchDetail` (type: `boolean`):

Adds English name, country, opening year and highlight tags per hotel with one extra request each. Slower.

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

ISO 4217 currency code for prices, e.g. USD, EUR, GBP, SGD.

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

Locale for localized hotel names and text, e.g. en-US, zh-HK.

## `cityScope` (type: `string`):

Auto-detected from the destination. Only change it if a numeric cityId returns nothing: 'international' for cities outside mainland China, 'china' for mainland-China cities.

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

Optional. Trip.com is usually reachable without a proxy; enable one if requests are blocked.

## Actor input object example

```json
{
  "destination": "Tokyo",
  "adults": 2,
  "rooms": 1,
  "maxItems": 40,
  "fetchDetail": false,
  "currency": "USD",
  "locale": "en-US",
  "cityScope": "auto",
  "proxyConfiguration": {}
}
```

# 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 = {
    "destination": "Tokyo",
    "maxItems": 40,
    "currency": "USD"
};

// Run the Actor and wait for it to finish
const run = await client.actor("axlymxp/trip-com-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 = {
    "destination": "Tokyo",
    "maxItems": 40,
    "currency": "USD",
}

# Run the Actor and wait for it to finish
run = client.actor("axlymxp/trip-com-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 '{
  "destination": "Tokyo",
  "maxItems": 40,
  "currency": "USD"
}' |
apify call axlymxp/trip-com-hotels-scraper --silent --output-dataset

```

## MCP server setup

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