About this API
Trip.com is a travel site for hotels, flights and trains. One record is one hotel page with its rooms.
What you get
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.
What you can filter
Send one page address in the url input, or several in the urls input. Each address gives one record. There are no other filters.
What it is good for
- Compare hotels in a city
- Collect room and policy details
- Keep hotel facts up to date
- Output fields
- 23
- Inputs
- 2
Sample hotel record
Saved sample, not a live run.
title- Xinyuan Hotel 1875 (Beijing Gulou Nanluoguxiang Store)
nearby_attractions- Drum Tower: 0.21 km away Shichahai Scenic Area: 0.03 km away Beijing's Bell and…
price_range- From US$70
check_in_check_out- From 14:00 until 12:00
property_policies- Check-in and Check-out Times Check-in: After 14:00 Check-out: Before 12:00 Fron…
property_description- Contact information Phone:+86-10-62883663-1000 About this property Local hotel …
you_might_be_wondering- What are the check-in and check-out times at Xinyuan Hotel 1875 (Beijing Gulou …
about_this_property- Nearest Airport Beijing Capital Intl. Airport Distance to Airport 25.69KM Neare…
recommendations- Most Viewed Hotels Hotels near attractions Top destinations More accommodation …
All 23 fields
location.locality- No. 21, Yandai Xie Street, Xicheng District, Beijing, China
location.region- Beijing
location.country- China
name- Xinyuan Hotel 1875 (Beijing Gulou Nanluoguxiang Store)
media.items- { type, url }
category.name- —
rooms.options- —
rooms.qichan_scenic_suite_smart_control_zero_pressure_mattress- —
hotel_features- —
category.path- —
media.image- —
rating.value- —
rating.review_count- —
Try it
Records
Saved sample, not a live run.
title |
nearby_attractions |
price_range |
url |
check_in_check_out |
property_policies |
property_description |
you_might_be_wondering |
about_this_property |
recommendations |
location.locality |
location.region |
location.country |
name |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Xinyuan Hotel 1875 (Beijing Gulou Nanluoguxiang Store) | Drum Tower: 0.21 km away Shichahai Scenic Area: 0.03 km away Beijing's Bell and… | From US$70 | trip.com/hotels/beijing-hotel-detail-1324… | From 14:00 until 12:00 | Check-in and Check-out Times Check-in: After 14:00 Check-out: Before 12:00 Fron… | Contact information Phone:+86-10-62883663-1000 About this property Local hotel … | What are the check-in and check-out times at Xinyuan Hotel 1875 (Beijing Gulou … | Nearest Airport Beijing Capital Intl. Airport Distance to Airport 25.69KM Neare… | Most Viewed Hotels Hotels near attractions Top destinations More accommodation … | No. 21, Yandai Xie Street, Xicheng District, Beijing, China | Beijing | China | Xinyuan Hotel 1875 (Beijing Gulou Nanluoguxiang Store) |
Scroll sideways to see more columns.
Output fields
| Field | Description | Example | Type | Returned |
|---|---|---|---|---|
title |
— | Xinyuan Hotel 1875 (Beijing Gulou Nanluoguxiang Store) | string | Required |
nearby_ |
— | Drum Tower: 0.21 km away Shichahai Scenic Area: 0.03 km away Beijing's Bell and… | string | Optional |
price_ |
— | From US$70 | string | Optional |
url |
Link | trip.com/hotels/beijing-hotel-detail-1324… | string | Required |
check_ |
— | From 14:00 until 12:00 | string | Optional |
property_ |
— | Check-in and Check-out Times Check-in: After 14:00 Check-out: Before 12:00 Fron… | string | Optional |
property_ |
— | Contact information Phone:+86-10-62883663-1000 About this property Local hotel … | string | Optional |
you_ |
— | What are the check-in and check-out times at Xinyuan Hotel 1875 (Beijing Gulou … | string | Optional |
about_ |
— | Nearest Airport Beijing Capital Intl. Airport Distance to Airport 25.69KM Neare… | string | Optional |
recommendations |
— | Most Viewed Hotels Hotels near attractions Top destinations More accommodation … | string | Optional |
location.locality |
— | No. 21, Yandai Xie Street, Xicheng District, Beijing, China | string | Optional |
location.region |
— | Beijing | string | Optional |
location.country |
— | China | string | Optional |
name |
— | Xinyuan Hotel 1875 (Beijing Gulou Nanluoguxiang Store) | string | Optional |
category.name |
— | — | string | Optional |
rooms.options |
— | — | string | Optional |
rooms.qichan_ |
— | — | string | Optional |
hotel_ |
— | — | string | Optional |
category.path |
— | — | array of string | Optional |
media.image |
— | — | string | Optional |
media.items |
— | { type, url } | array of object | Optional |
rating.value |
— | — | string | Optional |
rating.review_ |
How many | — | string | Optional |
Inputs
-
urlURL · requiredPaste 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.
-
urlsarray of stringPages 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
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
}'
Save the Idempotency-Key before you send, and reuse it only to retry the same request. The key needs the run scope. See Run a catalog API.
version pins major v2, whose newest minor (2.0) answers. Leave it out and the call runs on the latest major.
v1 is deprecated. It answers until Jan 30, 2027. After that, calls pinned to v1 run on v2. Move to v2, the current version.
Use it from an AI agent
Open in your coding agent
Add CleanedWeb to your agent as an MCP server, such as a custom connector in Claude or ChatGPT, then sign in with your CleanedWeb account. An API key with the read and run scopes works too.
https://api.cleanedweb.com/mcp?profile=catalog
Then ask, for example: Use CleanedWeb to get 25 records from the Trip.com Hotel Rooms API.
The agent finds the API, runs it and reads the records. Runs are charged like any other run.
Coverage
- Version
- v2 2.0
- Category
- Travel
- Updated
A run reads the one page you name and returns its record. Your limits on records, time and budget still apply.
CleanedWeb is not affiliated with Trip.com.
Changelog
-
v2.0 (major) ·
record_layout_changedRecords 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_movedFieldroomsis nowrooms.options.field_movedFieldqichan_scenic_suite_smart_control_zero_pressure_mattressis nowrooms.qichan_scenic_suite_smart_control_zero_pressure_mattress.field_movedFieldcategoryis nowcategory.name.field_movedFieldcategory_pathis nowcategory.path.field_movedFieldimageis nowmedia.image.field_movedFieldstreet_addressis nowlocation.street_address.field_movedFieldlocalityis nowlocation.locality.field_movedFieldregionis nowlocation.region.field_movedFieldcountryis nowlocation.country.field_movedFieldratingis nowrating.value.field_movedFieldreview_countis nowrating.review_count.field_movedFieldmediais nowmedia.items.
-
v1.0 (major) ·