Trip.com API: Search hotels
Finds hotels in a city on Trip.com for given dates, with prices, guest ratings, reviews and booking links. Only the initial public listing is read, so large limits may return fewer hotels.
Unofficial. Not affiliated with or endorsed by Trip.com.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- City, required
city City name, for example Tokyo.
Tokyo
- Sort optional
sort Listing order, for example lowest_price.
recommended (default)
One of
recommended,lowest_price,top_rated.- Rooms optional
rooms Number of rooms, for example 1.
1 (default)
Whole number 1 or more.
- Adults optional
adults Number of adults, for example 2.
2 (default)
Whole number 1 or more.
- Check in, required
check_in Check-in date (YYYY-MM-DD), for example 2026-10-20.
2026-10-20
- Currency optional
currency Three-letter currency code, for example USD.
USD (default)
Exactly 3 characters.
- Check Out, required
check_out Check-out date (YYYY-MM-DD), for example 2026-10-22.
2026-10-22
- Min Stars optional
min_stars Minimum hotel stars, for example 4.
Not set
Whole number from 1 to 5.
- Max Results optional
max_results Maximum hotels to return, for example 20.
20 (default)
Whole number from 1 to 50.
Input as JSON
{ "city": "Tokyo", "check_in": "2026-10-20", "check_out": "2026-10-22"}Output
{ "hotels": [ { "area": "Central Tokyo | Near Japan National Stadium", "link": "https://www.trip.com/hotels/detail/?hotelId=35541585&checkIn=2026-10-20&checkOut=2026-10-22&adult=2&crn=1&curr=USD" , "name": "Mitsui Garden Hotel Jingugaien Tokyo Premier", "stars": 5, "currency": "USD", "hotel_id": "35541585", "total_price": 571, "guest_rating": 9.2, "review_count": 1211, "nightly_price": 259, "free_cancellation": true, "guest_rating_label": "Great", "distance_to_city_centre": null }, { "area": "Near Shinjuku City | Ikebukuro", "link": "https://www.trip.com/hotels/detail/?hotelId=5214781&checkIn=2026-10-20&checkOut=2026-10-22&adult=2&crn=1&curr=USD" , "name": "JR-EAST HOTEL METS MEJIRO", "stars": 3, "currency": "USD", "hotel_id": "5214781", "total_price": 337, "guest_rating": 9.5, "review_count": 434, "nightly_price": 153, "free_cancellation": true, "guest_rating_label": "Amazing", "distance_to_city_centre": null }, { "area": "Kanda | Near Nihonbashi", "link": "https://www.trip.com/hotels/detail/?hotelId=12663342&checkIn=2026-10-20&checkOut=2026-10-22&adult=2&crn=1&curr=USD" , "name": "Sotetsu Fresa Inn Tokyo Kanda", "stars": 3, "currency": "USD", "hotel_id": "12663342", "total_price": 325, "guest_rating": 9.1, "review_count": 271, "nightly_price": 148, "free_cancellation": true, "guest_rating_label": "Great", "distance_to_city_centre": null } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"trip.com/search_hotels","input":{"city":"Tokyo","check_in":"2026-10-20","check_out":"2026-10-22"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "trip.com/search_hotels" , "input": { "city": "Tokyo", "check_in": "2026-10-20", "check_out": "2026-10-22" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "trip.com/search_hotels" , "input": { "city": "Tokyo", "check_in": "2026-10-20", "check_out": "2026-10-22" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run trip.com/search_hotels# with {"city":"Tokyo","check_in":"2026-10-20","check_out":"2026-10-22"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "city", "check_in", "check_out" ], "properties": { "city": { "type": "string", "description": "City name, for example Tokyo." }, "sort": { "enum": [ "recommended", "lowest_price", "top_rated" ], "type": "string", "default": "recommended", "description": "Listing order, for example lowest_price." }, "rooms": { "type": "integer", "default": 1, "minimum": 1, "description": "Number of rooms, for example 1." }, "adults": { "type": "integer", "default": 2, "minimum": 1, "description": "Number of adults, for example 2." }, "check_in": { "type": "string", "description": "Check-in date (YYYY-MM-DD), for example 2026-10-20." }, "currency": { "type": "string", "default": "USD", "maxLength": 3, "minLength": 3, "description": "Three-letter currency code, for example USD." }, "check_out": { "type": "string", "description": "Check-out date (YYYY-MM-DD), for example 2026-10-22." }, "min_stars": { "type": "integer", "maximum": 5, "minimum": 1, "description": "Minimum hotel stars, for example 4." }, "max_results": { "type": "integer", "default": 20, "maximum": 50, "minimum": 1, "description": "Maximum hotels to return, for example 20." } }}Output schema
{ "type": "object", "required": [ "hotels" ], "properties": { "hotels": { "type": "array", "items": { "type": "object", "required": [ "name", "stars", "guest_rating", "guest_rating_label", "review_count", "area", "distance_to_city_centre", "nightly_price", "total_price", "currency", "free_cancellation", "link", "hotel_id" ], "properties": { "area": { "type": [ "string", "null" ] }, "link": { "type": "string" }, "name": { "type": "string" }, "stars": { "type": [ "integer", "null" ] }, "currency": { "type": "string" }, "hotel_id": { "type": "string" }, "total_price": { "type": "number" }, "guest_rating": { "type": [ "number", "null" ] }, "review_count": { "type": [ "integer", "null" ] }, "nightly_price": { "type": "number" }, "free_cancellation": { "type": "boolean" }, "guest_rating_label": { "type": [ "string", "null" ] }, "distance_to_city_centre": { "type": [ "string", "null" ] } }, "additionalProperties": false } } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
trip.com/search_hotels- Returns
- name, stars, guest rating, reviews, area, nightly and total price, free cancellation, link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method trip.com/search_hotels with the inputs above.
Ask your agent
- Find me hotels in Lisbon from 2026-05-14 to 2026-05-17 for 2 adults, cheapest first, prices in EUR
- On Trip.com, what are the top-rated 4-star-and-up hotels in Bangkok for check-in March 3 and check-out March 7, 2026?
- Need 2 rooms for 4 adults in Seoul, Dec 20–23 2026 — show me about 10 options with free cancellation info and total price
- Search trip.com for 5-star hotels in Dubai, Nov 8 to Nov 12, priced in AED, recommended order, up to 30 results
- Looking for a cheap place to stay in Osaka for one adult, Oct 2–4 2026 — list hotels with guest ratings, review counts and booking links
See more
All Trip.com methodsFinds priced flights between two cities or airports on Trip.com for the chosen dates, cheapest first; round trips pair each outbound flight with its available returns.
trip.com/search_flightsFinds available Agoda stays in a city for your dates, with prices before taxes and fees, star and guest ratings, and free-cancellation status.
agoda.com/search_hotelsFinds Expedia hotels in a destination for given dates, with public USD prices, reviews, property class, refund status and links. Nightly prices are per room; totals include all requested rooms, taxes and fees.
expedia.com/search_hotelsCompares Kayak hotel nightly rates across booking sites for a city or neighborhood and stay dates (two adults, one room).
kayak.com/search_hotelsFinds places to stay in a city or area for given dates on Google Hotels, with nightly and total prices, hotel class, guest ratings, amenities, address and cheapest booking site. Optional filters for price, stars and rating; vacation rentals are left out. Prices and availability can change.
google.com/search_hotelsFind publicly priced Priceline hotels in a place for your travel dates, with guest ratings, nightly and total USD prices, and cancellation information. Excludes hotels hidden behind anonymous deals and sign-in-only prices.
priceline.com/search_hotelsFinds available hostels, hotels and guesthouses on Hostelworld in a city for given dates, with per-night dorm and private room prices, ratings, facilities and booking links.
hostelworld.com/search_hostelsFinds room offers and nightly prices for one Agoda hotel on selected dates. Totals are calculated from displayed nightly prices before taxes and fees; final checkout totals may differ.
agoda.com/get_room_prices