# Trip.com Hotels Scraper (`crawlerbros/tripdotcom-hotels-scraper`) Actor

Scrape hotel listings from Trip.com. Search hotels by city and date, with filters for star rating, guest score, and price. Returns hotel name, address, star rating, guest score, price per night, amenities, and booking URL

- **URL**: https://apify.com/crawlerbros/tripdotcom-hotels-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Travel, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Hotels Scraper

Scrape hotel listings from **Trip.com** — one of the world's largest online travel platforms. Search for hotels by city and travel dates, with filters for star rating, guest score, and price.

### Features

- Search hotels by **city name** and **travel dates**
- Filter by **star rating** (1–5 stars)
- Filter by **minimum guest score** (0–10 scale)
- Filter by **maximum price per night**
- Returns: hotel name, address, star rating, guest score, review count, price, amenities, URL, thumbnail
- Automatic API interception for fast, structured data extraction
- Apify Proxy support for reliable access

### Input

| Field | Type | Description |
|---|---|---|
| `mode` | select | `searchHotels` (search by city) |
| `cityName` | string | City to search (e.g. "London", "Tokyo", "Paris") |
| `checkIn` | string | Check-in date (YYYY-MM-DD). Defaults to tomorrow. |
| `checkOut` | string | Check-out date (YYYY-MM-DD). Defaults to day after check-in. |
| `minStars` | select | Minimum star rating (1–5) |
| `minRating` | number | Minimum guest score (0–10) |
| `maxPrice` | number | Maximum price per night (USD) |
| `maxItems` | integer | Max hotels to return (1–200, default 20) |
| `proxyConfiguration` | proxy | Proxy settings (recommended: Apify AUTO) |

### Output

| Field | Description |
|---|---|
| `hotelId` | Trip.com hotel ID |
| `name` | Hotel name |
| `address` | Full address |
| `starRating` | Star rating (1–5) |
| `rating` | Guest score (0–10, e.g. 8.9 = "Excellent") |
| `reviewCount` | Number of guest reviews |
| `pricePerNight` | Price per night (in `currency`) |
| `currency` | Currency code (e.g. USD) |
| `amenities` | Array of amenity names |
| `url` | Trip.com hotel booking URL |
| `thumbnailUrl` | Hotel photo URL |
| `lat` | Latitude |
| `lon` | Longitude |
| `checkIn` | Check-in date used in search |
| `checkOut` | Check-out date used in search |
| `city` | City searched |
| `scrapedAt` | ISO 8601 timestamp |

### Example Input

```json
{
  "mode": "searchHotels",
  "cityName": "London",
  "maxItems": 5,
  "proxyConfiguration": {"useApifyProxy": true}
}
````

### Example Output

```json
{
  "hotelId": "12345",
  "name": "The Grand Hotel London",
  "address": "123 Strand, London WC2R 1HB",
  "starRating": 5,
  "rating": 8.9,
  "reviewCount": 1200,
  "pricePerNight": 250.0,
  "currency": "USD",
  "amenities": ["Free WiFi", "Pool", "Gym", "Restaurant", "Spa"],
  "url": "https://www.trip.com/hotels/detail/?hotelId=12345",
  "thumbnailUrl": "https://cdn.trip.com/hotel12345.jpg",
  "checkIn": "2026-05-23",
  "checkOut": "2026-05-24",
  "city": "London",
  "recordType": "hotel",
  "scrapedAt": "2026-05-22T10:00:00+00:00"
}
```

### Supported Regions

Trip.com's hotel search works best for the following regions:

- **Europe**: London, Paris, Amsterdam, Barcelona, Rome, Berlin, Prague, Vienna, Istanbul, and more
- **Asia**: Tokyo, Bangkok, Singapore, Dubai, Hong Kong, Seoul, Bali, Kuala Lumpur, and more
- **Middle East**: Dubai, Abu Dhabi, Riyadh, Doha, and more
- **Oceania**: Sydney, Melbourne, Auckland, and more

> **Note:** US and North American cities (New York, Los Angeles, Chicago, etc.) are **not supported**. Trip.com serves these markets via a different Next.js frontend that does not embed the hotel listing data in a format this actor can extract. Use a European or Asian destination instead.

### FAQ

**Do I need a Trip.com account?** No. Hotel search results are publicly accessible.

**What currency are prices shown in?** USD by default. Prices reflect the Trip.com listed price for the selected dates.

**Why do I need proxy?** Trip.com may rate-limit or block datacenter IPs. The Apify AUTO proxy group provides varied IP addresses for reliable access.

**What if no dates are provided?** The actor defaults to tomorrow and the next day, ensuring valid date-based pricing.

**How many hotels per city?** Trip.com typically lists 20–50 hotels per page. With pagination, you can collect up to 200 per run.

**Why does New York / US city return 0 results?** Trip.com migrated US and North American markets to a different frontend that does not expose hotel data in the format this actor reads. Try a European or Asian city instead.

# Actor input Schema

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

Scraping mode: 'searchHotels' to search by city, 'hotelDetail' to fetch a single hotel by its Trip.com hotel ID.

## `hotelId` (type: `string`):

Trip.com hotel ID to fetch detail for. E.g. '732036'. Used in hotelDetail mode.

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

Name of the city to search for hotels. E.g. 'London', 'Paris', 'Tokyo', 'Bangkok'. Also accepts 'destination' as an alias. Supported regions: Europe, Asia, Middle East. US/Americas cities may return 0 results due to Trip.com frontend differences.

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

Check-in date in YYYY-MM-DD format. Leave blank to use tomorrow's date.

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

Check-out date in YYYY-MM-DD format. Leave blank to use the day after check-in.

## `minStars` (type: `integer`):

Minimum hotel star rating filter (1-5). Leave blank for no minimum.

## `minRating` (type: `number`):

Minimum guest rating score (0-10). E.g. 7.0 for 'Good', 8.0 for 'Very Good'.

## `maxPrice` (type: `number`):

Maximum price per night in USD. Leave blank for no limit.

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

Maximum number of hotels to return. Min 1, max 200.

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

Proxy settings. Recommended: use Apify Proxy AUTO group for reliable access.

## Actor input object example

```json
{
  "mode": "searchHotels",
  "cityName": "London",
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `items` (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 = {
    "mode": "searchHotels",
    "cityName": "London",
    "checkIn": "",
    "checkOut": "",
    "maxItems": 5,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/tripdotcom-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 = {
    "mode": "searchHotels",
    "cityName": "London",
    "checkIn": "",
    "checkOut": "",
    "maxItems": 5,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/tripdotcom-hotels-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 '{
  "mode": "searchHotels",
  "cityName": "London",
  "checkIn": "",
  "checkOut": "",
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call crawlerbros/tripdotcom-hotels-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Trip.com Hotels Scraper",
        "description": "Scrape hotel listings from Trip.com. Search hotels by city and date, with filters for star rating, guest score, and price. Returns hotel name, address, star rating, guest score, price per night, amenities, and booking URL",
        "version": "1.0",
        "x-build-id": "kj8Jc1Vndb2jQmTxy"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~tripdotcom-hotels-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-tripdotcom-hotels-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/crawlerbros~tripdotcom-hotels-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-tripdotcom-hotels-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/crawlerbros~tripdotcom-hotels-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-tripdotcom-hotels-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",
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "searchHotels",
                            "hotelDetail"
                        ],
                        "type": "string",
                        "description": "Scraping mode: 'searchHotels' to search by city, 'hotelDetail' to fetch a single hotel by its Trip.com hotel ID.",
                        "default": "searchHotels"
                    },
                    "hotelId": {
                        "title": "Hotel ID (mode=hotelDetail)",
                        "type": "string",
                        "description": "Trip.com hotel ID to fetch detail for. E.g. '732036'. Used in hotelDetail mode."
                    },
                    "cityName": {
                        "title": "City Name",
                        "type": "string",
                        "description": "Name of the city to search for hotels. E.g. 'London', 'Paris', 'Tokyo', 'Bangkok'. Also accepts 'destination' as an alias. Supported regions: Europe, Asia, Middle East. US/Americas cities may return 0 results due to Trip.com frontend differences.",
                        "default": "London"
                    },
                    "checkIn": {
                        "title": "Check-in Date",
                        "type": "string",
                        "description": "Check-in date in YYYY-MM-DD format. Leave blank to use tomorrow's date."
                    },
                    "checkOut": {
                        "title": "Check-out Date",
                        "type": "string",
                        "description": "Check-out date in YYYY-MM-DD format. Leave blank to use the day after check-in."
                    },
                    "minStars": {
                        "title": "Minimum Star Rating",
                        "minimum": 1,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Minimum hotel star rating filter (1-5). Leave blank for no minimum."
                    },
                    "minRating": {
                        "title": "Minimum Guest Score",
                        "minimum": 0,
                        "maximum": 10,
                        "type": "number",
                        "description": "Minimum guest rating score (0-10). E.g. 7.0 for 'Good', 8.0 for 'Very Good'."
                    },
                    "maxPrice": {
                        "title": "Maximum Price Per Night (USD)",
                        "minimum": 0,
                        "maximum": 10000,
                        "type": "number",
                        "description": "Maximum price per night in USD. Leave blank for no limit."
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of hotels to return. Min 1, max 200.",
                        "default": 20
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. Recommended: use Apify Proxy AUTO group for reliable access.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
