# Trip.com Scraper (`lergassy/tripcom-scraper`) Actor

Extract Trip.com hotels with live prices for your check-in and check-out dates: nightly and total price, star level, guest rating with cleanliness, location and service sub-scores, addresses, coordinates and guest reviews. Export data, run via API or schedule runs.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

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

## How to integrate an Actor?

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

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

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

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

# README

**Trip.com Scraper** extracts public **Trip.com hotel data** with **live prices for your own check-in and check-out dates**: hotel name, nightly and total price, star level, guest rating with its sub-scores for cleanliness, location, service and amenities, review counts, district, coordinates, full address and the guest reviews published on the hotel page. No login, no API key, no partner account. Export to JSON, CSV or Excel, run it via API, schedule it, or plug it into n8n, Make, Zapier, Google Sheets or an AI agent through MCP.

### What is Trip.com Scraper?

Trip.com is one of the largest online travel agencies in the world and the main booking channel for Asia. It has no public hotel API for the general web, and its pages render in the browser, so most scrapers either miss prices or run an expensive headless browser for every hotel.

This Actor reads the data Trip.com already ships inside its own pages. That means a run is fast and cheap, and — unlike list-only tools — the rows carry the **price for the exact dates you asked for**, both per night and as a total including taxes and fees.

| Mode | What you get | Input |
|---|---|---|
| 🏨 **Hotels in a city** | Hotel cards with price for your dates, total stay price, star level, rating and sub-scores, review count, district, coordinates, room type offered, image | city ID and dates |
| 📋 **Hotel details** | Full address with postcode and country, star level, rating, review count and the hotel's price range | hotel URLs |
| ⭐ **Guest reviews** | Reviews published on the hotel page: text, author, date | any hotel or city input |

Every row records `checkIn`, `checkOut`, `currency` and `hotelId`, so daily runs stack into a price history.

### What data can Trip.com Scraper extract?

#### 🏨 Hotel cards

| Field | Example |
|---|---|
| `name` | `Hotel Tjampuhan Spa` |
| `price` / `totalPrice` / `currency` | `89` / `192` / `USD` |
| `priceNote` | `Total price: US$192 · 1 room × 2 nights incl. taxes & fees` |
| `rating` / `ratingText` / `reviewCount` | `9.3` / `Great` / `216` |
| `subScores` | `[{"name":"Cleanliness","score":9},{"name":"Location","score":9.6}]` |
| `star` / `category` | `4` / `Resort` |
| `roomName` / `adults` / `children` | `Two Double Room` / `2` / `0` |
| `district` / `location` | `Ubud` / `Ubud Centre | Near Monkey Forest` |
| `latitude` / `longitude` | `-8.506` / `115.259` |
| `checkIn` / `checkOut` | `20261015` / `20261017` |
| `hotelId` / `url` / `imageUrl` / `images` | identifier, link, main photo, gallery |

#### 📋 Hotel details

`address` (full street address), `addressRegion`, `postalCode`, `country`, `star`, `rating`, `ratingBest`, `reviewCount`, `priceRange` (the hotel's own "From US$70" line) and the canonical `url`.

#### ⭐ Guest reviews

`text`, `author`, `reviewTime`, `score` where shown, plus `hotelId`, `hotelName` and `hotelUrl`.

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

The Actor uses Apify's **pay-per-event** pricing, so you pay for results and nothing per page.

| Event | Price | Per 1,000 |
|---|---|---|
| Hotel with price | $0.003 | **$3** |
| Hotel detail | $0.003 | **$3** |
| Guest review | $0.001 | **$1** |

No browser is involved, so platform usage is a fraction of a cent per run. The **Apify Free plan** ($5 monthly credit) covers roughly 1,600 priced hotels or 5,000 reviews a month.

### How to scrape Trip.com

1. Open **Trip.com Scraper** on Apify and click **Try for free**.
2. Open your city on Trip.com and copy the number from the address bar: in `trip.com/hotels/list?city=**723**` the city ID is `723` (Bali). Paste it into **Trip.com city ID**.
3. Set **Check-in** and **Check-out**. Without dates you still get hotels and ratings, but no prices.
4. Set **Max hotels**, tick **Collect guest reviews** if you want them, then click **Start**.
5. Alternatively paste **Trip.com URLs**: a hotel list URL you copied from the site, or single hotel URLs.
6. Open the **Output** tab and download JSON, CSV, Excel or XML, or read the dataset through the API.

### ⬇️ Input

![Trip.com Scraper input form: city ID, city name, check-in and check-out dates, max hotels, reviews, currency](https://raw.githubusercontent.com/lergassy/apify-actor-assets/main/tripcom/tripcom-scraper-input-form.png)

Hotels in Bali for a two-night stay, with reviews:

```json
{
  "cityId": 723,
  "cityName": "Bali",
  "checkIn": "2026-10-15",
  "checkOut": "2026-10-17",
  "adults": 2,
  "maxHotels": 100,
  "includeReviews": true,
  "currency": "USD"
}
```

Specific hotels by URL, with full addresses:

```json
{
  "startUrls": [
    "https://www.trip.com/hotels/detail/?hotelId=982030",
    "https://www.trip.com/hotels/detail/?hotelId=1978099"
  ],
  "includeHotelDetails": true
}
```

A hotel list URL copied straight from the browser:

```json
{
  "startUrls": ["https://www.trip.com/hotels/list?city=347&cityName=Los%20Angeles"],
  "checkIn": "2026-11-02",
  "checkOut": "2026-11-05",
  "maxHotels": 60
}
```

Prices in another currency for a family room:

```json
{
  "cityId": 723,
  "cityName": "Bali",
  "checkIn": "2026-12-20",
  "checkOut": "2026-12-27",
  "adults": 2,
  "children": 2,
  "rooms": 2,
  "currency": "SGD"
}
```

### ⬆️ Output

![Trip.com Scraper output table: hotel, price per night, total stay, rating, verdict, reviews, stars, area, room](https://raw.githubusercontent.com/lergassy/apify-actor-assets/main/tripcom/tripcom-scraper-output-table.png)

One hotel with a live price:

```json
{
  "type": "hotel",
  "hotelId": "982030",
  "name": "Hotel Tjampuhan Spa",
  "category": "Resort",
  "star": 4,
  "rating": 9.3,
  "ratingText": "Great",
  "reviewCount": 216,
  "subScores": [
    { "name": "Cleanliness", "score": 9 },
    { "name": "Amenities", "score": 9 },
    { "name": "Location", "score": 9.6 },
    { "name": "Service", "score": 9.4 }
  ],
  "price": 89,
  "totalPrice": 192,
  "currency": "USD",
  "priceNote": "Total price: US$192 1 room × 2 nights incl. taxes & fees",
  "roomName": "Deluxe Room",
  "district": "Ubud",
  "latitude": "-8.506",
  "longitude": "115.259",
  "checkIn": "20261015",
  "checkOut": "20261017",
  "url": "https://www.trip.com/hotels/detail/?hotelId=982030",
  "scrapedAt": "2026-09-03T09:11:52.061Z"
}
```

One hotel detail:

```json
{
  "type": "hotel_detail",
  "hotelId": "982030",
  "name": "Hotel Tjampuhan Spa",
  "star": 4,
  "rating": 9.3,
  "ratingBest": 10,
  "reviewCount": 216,
  "priceRange": "From US$70",
  "address": "Jl. Raya Campuhan, Ubud, Kecamatan Ubud, Gianyar, Bali, Bali Province, 80571, Indonesia",
  "postalCode": "80571",
  "country": "Indonesia",
  "url": "https://www.trip.com/hotels/bali-hotel-detail-982030/hotel-tjampuhan-spa/"
}
```

Rows carry a `type` (`hotel`, `hotel_detail`, `review`, `error`), so one dataset can be split in a spreadsheet or in code. Pages that fail after the retries become `error` rows with the URL and the reason.

### Use cases for Trip.com data

#### Rate shopping and price monitoring

Run the same city and dates every morning and watch `price` and `totalPrice` move. Hotels, revenue managers and OTAs use exactly this to see where they sit against the market.

#### Competitive set benchmarking

Pull your competitors by hotel URL and compare price, rating and the sub-scores for cleanliness, service, location and amenities side by side.

#### Destination research

One run returns a whole city with stars, districts and coordinates, which is enough to map supply, plot hotels on a map or size a market before entering it.

#### Review mining

Collect the reviews published on hotel pages and run sentiment analysis, or feed them to an LLM to find what guests praise and complain about.

#### Travel content and affiliate sites

Ratings, sub-scores, price ranges and photos are enough to build a comparison page or keep a "best hotels in …" list fresh automatically.

#### AI agents and RAG

Flat rows with literal names and a minimal input make the Actor easy to call from an agent through the Apify MCP server.

### Integrations

- **API** — start a run and read the dataset with any HTTP client:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("lergassy/tripcom-scraper").call(run_input={
    "cityId": 723, "cityName": "Bali",
    "checkIn": "2026-10-15", "checkOut": "2026-10-17", "maxHotels": 50
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("name"), item.get("price"), item.get("currency"))
```

- **JavaScript** — `npm i apify-client`, then `client.actor('lergassy/tripcom-scraper').call(input)`.
- **n8n, Make, Zapier, Google Sheets, Airtable, Slack, webhooks** — through the standard Apify integrations.
- **MCP** — add the Apify MCP server to Claude, ChatGPT or Cursor and let the agent call `lergassy/tripcom-scraper` with a city and dates.

### Errors and troubleshooting

| What you see | What it means | Fix |
|---|---|---|
| No prices in the rows | Check-in and check-out were not set | Add both dates; Trip.com only prices a real stay |
| Fewer hotels than **Max hotels** | Trip.com serves one screen of hotels per view and paginates behind a signed request | The Actor already rotates sort orders to widen coverage; add more cities or dates for more rows |
| `error` rows | The page failed after the retries | Re-run those URLs; the Actor rotates proxy sessions automatically |
| No reviews for a hotel | That hotel has no reviews rendered on its page | Check `reviewCount` on the hotel card first |
| Wrong city in the results | `cityName` alone does not identify a city | Always pass the numeric **city ID** from the Trip.com URL |

### 🤖 For AI Agents & LLM Apps

Compact reference for agents calling this Actor through the [Apify MCP server](https://mcp.apify.com) or the Apify API (`lergassy/tripcom-scraper`).

**Purpose:** returns Trip.com hotel availability and prices for a city and a date
range, with guest scores, stars, room type and coordinates, plus optional property
details and guest reviews. Use it to answer "what do hotels in Bali cost that week",
"which four-star properties are under $100" and "how do guests rate this hotel".

**Minimal input:**

```json
{ "cityName": "Bali", "checkIn": "2026-10-12", "checkOut": "2026-10-15", "adults": 2, "maxHotels": 40 }
```

**Output:** one row per hotel — `type`, `hotelId`, `name`, `nameEn`, `category`,
`star`, `rating`, `ratingText`, `reviewCount`, `subScores`, `price`, `priceText`,
`currency`, `totalPrice`, `priceNote`, `roomName`, `district`, `location`,
`latitude`, `longitude`, `distance`, `isAd`, `status`, `imageUrl`, `adults`,
`children`, `checkIn`, `checkOut`, `url`, `city`, `position`, `scrapedAt`. Detail
rows add `address`, `postalCode`, `country` and `priceRange`; review rows carry
`score`, `text`, `author` and `reviewTime`; unreadable pages arrive as
`type: "error"`.

**Behaviors an agent should know:**

- **Trip.com has no search by city name.** `cityName` works only for the thirty
  destinations Trip.com links from its own pages (Bali, Bangkok, Tokyo, Singapore,
  Hong Kong, London, Paris, New York and so on) — the Actor maps those to ids and
  logs which id it used. For anywhere else, pass the numeric `cityId`: open the city
  on trip.com and copy the number from `/hotels/bali-hotels-list-723/`. An
  unrecognised name is reported in the log rather than silently returning nothing.
  Hotel and hotel-list URLs also work as input.
- **Prices only exist for a date range.** Without `checkIn` and `checkOut` the Actor
  cannot quote a nightly rate, and `price` will be empty. Always pass both.
- `price` is per night for the given occupancy; `totalPrice` covers the whole stay.
  `priceNote` says whether taxes are excluded — quote it when reporting a price.
- `currency` is chosen by input and defaults to USD. The number is converted by
  Trip.com, not by the Actor.
- `maxHotels` (default 40) and `maxPages` (default 5) together cap a run.
  `includeHotelDetails` and `includeReviews` each add a fetch per hotel.
- `isAd` marks sponsored results; drop them before ranking by price or score.
- Availability moves fast: a row is a snapshot at `scrapedAt`, not a bookable quote.

### ❓ FAQ

#### Is it legal to scrape Trip.com?

The Actor reads only pages any visitor can open without logging in, and it collects no personal data beyond the guest names Trip.com publishes next to reviews. You are responsible for using the data in line with local law and Trip.com's terms; consult a lawyer for your case.

#### Do I need a Trip.com API key or an affiliate account?

No. The Actor never authenticates.

#### Does it use a browser?

No. Everything is plain HTTP, which keeps runs fast and cheap.

#### Where do I find the city ID?

Open the city on Trip.com. The address bar shows `trip.com/hotels/list?city=723&cityName=Bali`, so the ID is `723`. You can also paste that whole URL into **Trip.com URLs** instead.

#### Can I track prices over time?

Yes. Schedule the run daily with the same city and dates. Each row carries `checkIn`, `checkOut` and `scrapedAt`, so the dataset becomes a price history.

#### How many hotels can one city return?

Trip.com shows one screen of hotels per view and loads the rest through a signed request the Actor does not touch. To widen coverage it walks several sort orders, which typically yields a few dozen distinct hotels per city and date pair.

#### Does it return room-level prices for every room type?

The card carries the cheapest bookable room for your dates, with its name and the total for the stay. Full room lists sit behind the same signed request.

#### Can I use it with the Apify API, MCP or n8n?

Yes, see Integrations. The input is plain JSON.

### Your feedback

Need another field, another Trip.com page type, or flights and trains? Open an issue in the **Issues** tab or leave a review — user requests decide what ships next.

### You might also like

| Actor | What it does |
|---|---|
| [Airbnb Scraper](https://apify.com/lergassy/airbnb-scraper) | Airbnb listings for any place and dates: nightly price, rating, beds, amenities, host |
| [Agoda Reviews Scraper](https://apify.com/lergassy/agoda-reviews-scraper) | Hotel reviews from Agoda and Booking.com |
| [Google Flights Scraper](https://apify.com/lergassy/google-flights-scraper) | Flight prices, airlines and price insights |
| [Shopee Scraper](https://apify.com/lergassy/shopee-scraper) | Products and prices across 11 Shopee marketplaces |
| [Lazada Scraper](https://apify.com/lergassy/lazada-scraper) | Products, prices and reviews across six Lazada marketplaces |
| [Email & Phone Verifier](https://apify.com/lergassy/email-phone-verifier) | Checks e-mails and phone numbers in bulk: deliverability, throwaway and role flags, numbering plan, US state and time zone |

# Actor input Schema

## `mode` (type: `string`):

<b>Hotels in a city</b> – the hotel list with live prices for your dates. <b>Hotel details</b> – address, rating and price range for hotel URLs. <b>Auto</b> decides by what you paste.

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

Numeric Trip.com city id — the exact way to pick a destination. Open the city on trip.com and copy the number from the URL: <code>/hotels/bali-hotels-list-<b>723</b>/</code>.

## `cityName` (type: `string`):

City to search, for the destinations Trip.com links from its own pages (Bali, Bangkok, Tokyo, Singapore, Hong Kong, London, Paris, New York and about twenty more). Trip.com has no public search by name, so anything else must be given as <b>City ID</b> below.

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

Date of arrival as <code>YYYY-MM-DD</code>. Prices only appear when both dates are set.

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

Date of departure as <code>YYYY-MM-DD</code>.

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

Hotel list URLs (<code>trip.com/hotels/list?city=…</code>) or single hotel URLs (<code>trip.com/hotels/detail/?hotelId=…</code>). Mix freely.

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

Stop after this many hotels per city or list URL.

## `includeHotelDetails` (type: `boolean`):

Open each hotel page for the full address, postcode, country, star level and price range. Slower and billed per hotel detail.

## `includeReviews` (type: `boolean`):

Open each hotel page and collect the guest reviews published on it, with text, author and date.

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

Guests per room.

## `children` (type: `integer`):

Children per room.

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

Number of rooms to price.

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

Currency for the prices.

## `maxPages` (type: `integer`):

How many pages of the hotel list to walk.

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

Trip.com is served worldwide; the shared datacenter proxy is enough. Switch to residential only if you see repeated failures.

## Actor input object example

```json
{
  "mode": "auto",
  "cityId": 723,
  "cityName": "Bali",
  "startUrls": [],
  "maxHotels": 40,
  "includeHotelDetails": false,
  "includeReviews": false,
  "adults": 2,
  "children": 0,
  "rooms": 1,
  "currency": "USD",
  "maxPages": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `hotels` (type: `string`):

One row per Trip.com hotel for the searched city and dates: nightly and total price in the requested currency, guest score and score breakdown, stars, room offered, district, coordinates and whether the result is sponsored. Detail and review rows follow when requested.

## `csv` (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 = {
    "cityId": 723,
    "cityName": "Bali",
    "startUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("lergassy/tripcom-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 = {
    "cityId": 723,
    "cityName": "Bali",
    "startUrls": [],
}

# Run the Actor and wait for it to finish
run = client.actor("lergassy/tripcom-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 '{
  "cityId": 723,
  "cityName": "Bali",
  "startUrls": []
}' |
apify call lergassy/tripcom-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lergassy/tripcom-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/JzEpolhzZUri7OEGv/builds/83KWZz9OX216xsNXw/openapi.json
