# Trip.com MCP Server (`axlymxp/trip-com-mcp`) Actor

MCP server for Trip.com hotels: your AI agent can resolve a city, search hotels with nightly prices, guest scores and coordinates, read curated top-lists and fetch hotel detail. Works from Claude, Cursor or any MCP client; also runs as a one-shot hotel scraper.

- **URL**: https://apify.com/axlymxp/trip-com-mcp.md
- **Developed by:** [axly](https://apify.com/axlymxp) (community)
- **Categories:** AI, Agents, Travel
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 mcp tool calls

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 MCP Server

Connect an AI assistant to **Trip.com hotel data**. This Model Context Protocol (MCP) server exposes four tools that Claude, Cursor, ChatGPT-style agents, n8n or your own code can call: resolve a destination, search hotels for a city and dates, read Trip.com's curated hotel top-lists and fetch the detail of one hotel. The same Actor also runs as a normal one-shot hotel scraper that writes to a dataset.

No Trip.com login or API key is needed. Every tool call queries Trip.com when it is made, for the dates you ask for.

### Tools

| Tool | What it returns |
| --- | --- |
| `search_destinations(keyword)` | Matching Trip.com destinations: `city_id`, name, country, type, `oversea` flag, coordinates. |
| `search_hotels(destination, check_in, check_out, adults, rooms, limit, oversea, currency)` | Hotels for a city (name or id) and dates: name, address, star class, guest score, nightly price with and without tax, coordinates, Trip.com page link. Up to 50 hotels per call, paged for you. |
| `hotel_rankings(destination, oversea)` | Trip.com's curated top-lists for a city (for example "Luxury Hotels" or "Hot Spring Hotels") with their member hotel ids and list URL. Some cities have none. |
| `get_hotel(hotel_id, city_id)` | One hotel: name, star class, city, country, opening year and highlight tags. It carries no prices; use `search_hotels` for those. |

A tool call that fails or finds nothing returns an `error` field (or an empty list) and is not charged.

### Connect it

Start the Actor in **Standby** mode (open it in the Apify Console and use its Standby tab, or call the URL directly). The server listens at

```
https://<your-username>--trip-com-mcp.apify.actor/mcp
```

Send your Apify API token as `Authorization: Bearer <token>`. In an MCP client that supports Streamable HTTP servers:

```json
{
    "mcpServers": {
        "trip-com": {
            "url": "https://<your-username>--trip-com-mcp.apify.actor/mcp",
            "headers": { "Authorization": "Bearer <your Apify token>" }
        }
    }
}
```

Then ask things like "find 4-star or better hotels in Bangkok for 14-16 November and compare the guest scores".

### Example tool output (`search_hotels`)

```json
{
    "count": 1,
    "hotels": [
        {
            "hotel_id": 1617121,
            "name": "InterContinental Tokyo Bay",
            "address": "1 Chome-16-2 Kaigan, Minato Ward, Tokyo, 105-8576, Japan",
            "city_id": 228,
            "city_name": "Tokyo",
            "star": 5.0,
            "review_score": 4.6,
            "score_scale": 5,
            "price": 415.0,
            "price_excl_tax": 332.0,
            "currency": "USD",
            "latitude": 35.653006,
            "longitude": 139.762375,
            "detail_url": "https://www.trip.com/hotels/detail/?hotelId=1617121&cityId=228",
            "checkin": "2026-10-18",
            "checkout": "2026-10-19"
        }
    ],
    "total_available": 4754,
    "city_id": 228,
    "city_name": "Tokyo"
}
```

`price` is the lowest nightly rate Trip.com displays for those dates, including taxes and fees; it can differ from the final booking price. `review_score` is out of `score_scale` (5).

### Classic run (no AI needed)

Press Start with a `destination` and the Actor performs a one-shot hotel search and writes rows to the dataset with the same fields as above. Leave `destination` empty and the run ends immediately with a note (the MCP server only runs in Standby mode).

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

| Input | Default | Description |
| --- | --- | --- |
| `destination` | empty | City name or numeric Trip.com city id |
| `checkIn`, `checkOut` | +7 / +8 days | `YYYY-MM-DD`, check-in not in the past |
| `adults`, `rooms` | 2, 1 | Guests (1-8) and rooms (1-4) |
| `maxItems` | 20 | Stop after this many hotels |
| `currency` | USD | ISO 4217 code for prices |

Schedule it or call it by API/webhook like any Actor to monitor rates over time.

### Use cases

- Give a travel or planning assistant live hotel prices and guest scores instead of stale training data.
- Compare districts or cities by star class, score and price from inside a chat.
- Build agentic travel workflows in n8n or Make with MCP tool nodes.

### FAQ

**Which clients work?** Any MCP client that supports Streamable HTTP and custom headers (Claude Desktop through a connector, Cursor, MCP SDKs).

**How fresh is the data?** Each call reads Trip.com at call time for your dates.

**Can it book rooms?** No. It only reads public search and detail data.

**What if a call returns an error?** Trip.com occasionally blocks or changes a response; the tool returns an `error` field and you are not charged. Retry or narrow the request.

**Is it legal?** It returns publicly visible data. You are responsible for complying with Trip.com's terms and applicable law.

# Actor input Schema

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

City name such as 'Tokyo' or a numeric Trip.com cityId. Set it to run a one-shot hotel search into the dataset. Leave empty and the run does nothing (the MCP server runs in Standby mode instead).

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

Check-in date YYYY-MM-DD (classic run). Empty = 7 days from today. Must not be in the past.

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

Check-out date YYYY-MM-DD (classic run). Empty = 8 days from today.

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

Adults per room (classic run).

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

Rooms (classic run, 1-4).

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

Maximum hotels to collect in a classic run.

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

ISO 4217 currency code for prices, e.g. USD, EUR, GBP (classic run).

## Actor input object example

```json
{
  "destination": "Tokyo",
  "adults": 2,
  "rooms": 1,
  "maxItems": 10,
  "currency": "USD"
}
```

# 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": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("axlymxp/trip-com-mcp").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": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("axlymxp/trip-com-mcp").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": 10
}' |
apify call axlymxp/trip-com-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,axlymxp/trip-com-mcp"
        }
    }
}
```

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/PyGXcMsCeyysnovtT/builds/Xj0653yUl80h6VXoA/openapi.json
