# Trip.com Hotel Rooms API

> One Trip.com hotel page by URL: name, address, rating, price range, rooms, check-in times, policies and nearby attractions.

- Page: https://cleanedweb.com/catalog/trip-com-hotel-rooms-api/
- Contract (JSON): https://cleanedweb.com/catalog/trip-com-hotel-rooms-api/contract.json
- Source: trip.com (https://www.trip.com/)
- Category: Travel
- Updated: 2026-12-01

## About

Trip.com is a travel site for hotels, flights and trains. One record is one hotel page with its rooms.

Each record has the hotel name, address, city and country, rating, review count, price range, rooms, check-in and check-out times, policies, features, nearby attractions and images.

Send one page address in the url input, or several in the urls input. Each address gives one record. There are no other filters.

## Typical uses

- Compare hotels in a city
- Collect room and policy details
- Keep hotel facts up to date

A run reads the one page you name and returns its record; `max_items`, `timeout_seconds` and your budget still bound it.

## Key fields

| Field | Type | Sample value |
| --- | --- | --- |
| `title` | string | `Xinyuan Hotel 1875 (Beijing Gulou Nanluoguxiang Store)` |
| `nearby_attractions` | string | `Drum Tower: 0.21 km away Shichahai Scenic Area: 0.03 km away Beijing's Bell and…` |
| `price_range` | string | `From US$70` |
| `url` | string | `https://www.trip.com/hotels/beijing-hotel-detail-132411993/xinyuan-hotel-1875/` |
| `category.name` | string | not in the saved sample |
| `check_in_check_out` | string | `From 14:00 until 12:00` |
| `property_policies` | string | `Check-in and Check-out Times Check-in: After 14:00 Check-out: Before 12:00 Fron…` |
| `property_description` | string | `Contact information Phone:+86-10-62883663-1000 About this property Local hotel …` |

Sample values come from one saved record, not a live run. Every field with its type, and the schemas, are in https://cleanedweb.com/catalog/trip-com-hotel-rooms-api/contract.json. Some fields the source returns are not published, so a record can carry fields the schema does not list.

## Inputs

- `url` (string, required): Paste the URL of a trip.com page of the same kind as the sample: its path looks like /hotels/{slug}/{slug}. Any such page works, not only the one the API was built from.
- `urls` (array of string): Pages of that kind (1 to 50 in all, with url): one record each, in this order, once per page; a call may give urls and no url. A page that fails (off the pattern, unreadable, no product data) is told by its code in the run's metadata (item_pages) and does not fail the run while another page is read.

## Request

`POST https://api.cleanedweb.com/v1/catalog/public/apis/generated_6d5a9e83a7bfb22626b35b68/endpoints/generated_6d5a9e83a7bfb22626b35b68_search/run`

```bash
curl -X POST https://api.cleanedweb.com/v1/catalog/public/apis/generated_6d5a9e83a7bfb22626b35b68/endpoints/generated_6d5a9e83a7bfb22626b35b68_search/run \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: UNIQUE_REQUEST_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "url": "https://www.trip.com/hotels/beijing-hotel-detail-132411993/xinyuan-hotel-1875/"
  },
  "version": 2,
  "max_items": 25
}'
```

Send an `Idempotency-Key` header with every run and save it before you send. Reuse it only to retry the same request. If the run does not end within `wait_seconds`, read the result with the same API key and key:

`GET https://api.cleanedweb.com/v1/catalog/public/apis/generated_6d5a9e83a7bfb22626b35b68/endpoints/generated_6d5a9e83a7bfb22626b35b68_search/result`

## Versions

Current: `2.0`. Pin a major with "version": N in the run body (an integer). Leave it out and the call runs on the latest major. A sunset major runs on the latest major and the response says rerouted. An unknown major answers 404 catalog_version_not_found and lists the available majors.

- v2: current, newest minor `2.0`
- v1: deprecated, newest minor `1.0`, sunsets 2027-01-30

### Changelog

- `2.0` (major) 2026-12-01
  - Records are now grouped: related fields sit under shared keys, so 12 field(s) have new paths (each listed below). Callers pinned to the previous major keep the previous shape until its sunset.
  - Field \`rooms\` is now \`rooms.options\`.
  - Field \`qichan_scenic_suite_smart_control_zero_pressure_mattress\` is now \`rooms.qichan_scenic_suite_smart_control_zero_pressure_mattress\`.
  - Field \`category\` is now \`category.name\`.
  - Field \`category_path\` is now \`category.path\`.
  - Field \`image\` is now \`media.image\`.
  - Field \`street_address\` is now \`location.street_address\`.
  - Field \`locality\` is now \`location.locality\`.
  - Field \`region\` is now \`location.region\`.
  - Field \`country\` is now \`location.country\`.
  - Field \`rating\` is now \`rating.value\`.
  - Field \`review_count\` is now \`rating.review_count\`.
  - Field \`media\` is now \`media.items\`.
- `1.0` (major) 2026-11-29

The same changelog, as data, is in https://cleanedweb.com/catalog/trip-com-hotel-rooms-api/contract.json

## Use it from an AI agent

MCP server: https://api.cleanedweb.com/mcp?profile=catalog (Streamable HTTP). Sign in with a CleanedWeb account when the client asks (OAuth), or send an API key with the `read` and `run` scopes as `Authorization: Bearer`. Call `get_api` with `api_id` `generated_6d5a9e83a7bfb22626b35b68`, then `run_api` with the `run_with` arguments it returns. See https://cleanedweb.com/docs/mcp/

## Run it

Reading the catalog needs no credential. Running needs a CleanedWeb account and an API key with the `run` scope; the first 5,000 records are free, then $1 per 1,000 records. See https://cleanedweb.com/docs/run-catalog-api/

CleanedWeb is not affiliated with Trip.com.
