# Trip.com API

> Trip.com returns hotel prices, guest ratings, and flight fares as a workflow and API.

Trip.com returns hotel listings with prices, reviews, and booking links; Search hotels needs a city and check-in and check-out dates. Trip.com returns priced flight options and itinerary details; Search flights needs an origin, destination, and departure date.

- Page: https://fous.com/tools/trip-com
- Handle: `@trip-com`
- Category: [Travel](https://fous.com/tools/category/travel)
- Source website: https://trip.com
- Last verified: Sep 29, 2026

## Methods

### Search flights

Operation `search_flights`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Find priced flights between two places on selected dates, cheapest first. Round-trip choices pair each outbound flight with available returns; fares can change before booking. Links open the matching Trip.com flight search.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `cabin` | string | no |  | Seat class, e.g. business. |
| `adults` | integer | no |  | Number of adult travellers, e.g. 2. |
| `origin` | string | yes | `"Singapore"` | Departure city or airport, e.g. Singapore or SIN. |
| `currency` | string | no |  | Three-letter display currency, e.g. USD. |
| `destination` | string | yes | `"Seoul"` | Arrival city or airport, e.g. Seoul or ICN. |
| `max_results` | integer | no | `3` | Maximum priced flight options, e.g. 20. |
| `return_date` | string | no | `"2026-10-27"` | Return date for a round trip, e.g. 2026-10-22. |
| `nonstop_only` | boolean | no | `true` | Only show flights without stops, e.g. true. |
| `departure_date` | string | yes | `"2026-10-15"` | Departure date, e.g. 2026-10-15. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "origin",
    "destination",
    "departure_date"
  ],
  "properties": {
    "cabin": {
      "enum": [
        "economy",
        "premium_economy",
        "business",
        "first"
      ],
      "type": "string",
      "default": "economy",
      "description": "Seat class, e.g. business."
    },
    "adults": {
      "type": "integer",
      "default": 1,
      "maximum": 9,
      "minimum": 1,
      "description": "Number of adult travellers, e.g. 2."
    },
    "origin": {
      "type": "string",
      "title": "From",
      "minLength": 2,
      "description": "Departure city or airport, e.g. Singapore or SIN.",
      "examples": [
        "Singapore",
        "SIN",
        "Tokyo"
      ]
    },
    "currency": {
      "type": "string",
      "default": "USD",
      "pattern": "^[A-Za-z]{3}$",
      "description": "Three-letter display currency, e.g. USD."
    },
    "destination": {
      "type": "string",
      "title": "To",
      "minLength": 2,
      "description": "Arrival city or airport, e.g. Seoul or ICN.",
      "examples": [
        "Seoul",
        "ICN",
        "Osaka"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum priced flight options, e.g. 20.",
      "x-fous-developer": true,
      "examples": [
        3,
        4
      ]
    },
    "return_date": {
      "type": "string",
      "format": "date",
      "description": "Return date for a round trip, e.g. 2026-10-22.",
      "examples": [
        "2026-10-27"
      ]
    },
    "nonstop_only": {
      "type": "boolean",
      "default": false,
      "description": "Only show flights without stops, e.g. true.",
      "examples": [
        true
      ]
    },
    "departure_date": {
      "type": "string",
      "format": "date",
      "description": "Departure date, e.g. 2026-10-15.",
      "examples": [
        "2026-10-15",
        "2026-10-21",
        "2026-11-05"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "origin": "Singapore",
      "destination": "Seoul",
      "departure_date": "2026-10-15"
    },
    {
      "origin": "SIN",
      "destination": "ICN",
      "max_results": 3,
      "return_date": "2026-10-27",
      "departure_date": "2026-10-21"
    },
    {
      "origin": "Tokyo",
      "destination": "Osaka",
      "max_results": 4,
      "nonstop_only": true,
      "departure_date": "2026-11-05"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `flights` | array |  |  |
| `flights[].currency` | string | `"USD"` |  |
| `flights[].return_stops` | integer | `0` |  |
| `flights[].trip_com_url` | string | `"https://www.trip.com/flights/showfarefirst?dcity=sin&acity=sel&ddate=2026-10-15&triptype=ow&class=y&quantity=1&nonstopo` |  |
| `flights[].outbound_stops` | integer | `1` |  |
| `flights[].return_airlines` | array |  |  |
| `flights[].outbound_airlines` | array |  |  |
| `flights[].return_travel_time` | string or null | `"7 h 0 min"` | Journey duration, e.g. 7 h 25 min. |
| `flights[].price_per_traveller` | number | `179` | Displayed fare per adult including taxes. |
| `flights[].return_arrival_time` | string or null | `"2026-10-28T00:10:00+08:00"` | Local arrival time, ISO 8601 with UTC offset. |
| `flights[].outbound_travel_time` | string or null | `"30 h 50 min"` | Journey duration, e.g. 7 h 25 min. |
| `flights[].return_stop_airports` | array |  | Connecting airports as name (code). |
| `flights[].outbound_arrival_time` | string or null | `"2026-10-16T08:15:00+09:00"` | Local arrival time, ISO 8601 with UTC offset. |
| `flights[].return_departure_time` | string or null | `"2026-10-27T18:10:00+09:00"` | Local departure time, ISO 8601 with UTC offset. |
| `flights[].return_flight_numbers` | array |  |  |
| `flights[].outbound_stop_airports` | array |  | Connecting airports as name (code). |
| `flights[].outbound_departure_time` | string or null | `"2026-10-15T00:25:00+08:00"` | Local departure time, ISO 8601 with UTC offset. |
| `flights[].outbound_flight_numbers` | array |  |  |
| `flights[].return_travel_time_minutes` | integer or null | `420` |  |
| `flights[].return_arrival_airport_code` | string or null | `"SIN"` |  |
| `flights[].return_arrival_airport_name` | string or null | `"Singapore Changi Airport"` |  |
| `flights[].outbound_travel_time_minutes` | integer or null | `1850` |  |
| `flights[].outbound_arrival_airport_code` | string or null | `"GMP"` |  |
| `flights[].outbound_arrival_airport_name` | string or null | `"Gimpo International Airport"` |  |
| `flights[].return_departure_airport_code` | string or null | `"ICN"` |  |
| `flights[].return_departure_airport_name` | string or null | `"Incheon International Airport"` |  |
| `flights[].outbound_departure_airport_code` | string or null | `"SIN"` |  |
| `flights[].outbound_departure_airport_name` | string or null | `"Singapore Changi Airport"` |  |

**Example input**

```json
{
  "origin": "Singapore",
  "destination": "Seoul",
  "departure_date": "2026-10-15"
}
```

**Example output**

```json
{
  "flights": [
    {
      "currency": "USD",
      "return_stops": 0,
      "trip_com_url": "https://www.trip.com/flights/showfarefirst?dcity=sin&acity=sel&ddate=2026-10-15&triptype=ow&class=y&quantity=1&nonstoponly=off&locale=en-XX&curr=USD",
      "outbound_stops": 1,
      "return_airlines": [],
      "outbound_airlines": [
        "Jeju Air"
      ],
      "return_travel_time": null,
      "price_per_traveller": 179,
      "return_arrival_time": null,
      "outbound_travel_time": "30 h 50 min",
      "return_stop_airports": [],
      "outbound_arrival_time": "2026-10-16T08:15:00+09:00",
      "return_departure_time": null,
      "return_flight_numbers": [],
      "outbound_stop_airports": [
        "Gimhae International Airport (PUS)"
      ],
      "outbound_departure_time": "2026-10-15T00:25:00+08:00",
      "outbound_flight_numbers": [
        "7C2662"
      ],
      "return_travel_time_minutes": null,
      "return_arrival_airport_code": null,
      "return_arrival_airport_name": null,
      "outbound_travel_time_minutes": 1850,
      "outbound_arrival_airport_code": "GMP",
      "outbound_arrival_airport_name": "Gimpo International Airport",
      "return_departure_airport_code": null,
      "return_departure_airport_name": null,
      "outbound_departure_airport_code": "SIN",
      "outbound_departure_airport_name": "Singapore Changi Airport"
    }
  ]
}
```

### Search hotels

Operation `search_hotels`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Find hotels in a city for your dates with prices, reviews, and booking links. Only initial public listings are available, so large result limits may return fewer hotels; prices can change.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `city` | string | yes | `"Tokyo"` | City name, for example Tokyo. |
| `sort` | string | no | `"lowest_price"` | Listing order, for example lowest_price. |
| `rooms` | integer | no | `1` | Number of rooms, for example 1. |
| `adults` | integer | no | `1` | Number of adults, for example 2. |
| `check_in` | string | yes | `"2026-10-20"` | Check-in date, for example 2026-10-20. |
| `currency` | string | no | `"EUR"` | Three-letter currency code, for example USD. |
| `check_out` | string | yes | `"2026-10-22"` | Check-out date, for example 2026-10-22. |
| `min_stars` | integer | no | `4` | Minimum hotel stars, for example 4. |
| `max_results` | integer | no | `5` | Maximum hotels to return, for example 20. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "city",
    "check_in",
    "check_out"
  ],
  "properties": {
    "city": {
      "type": "string",
      "description": "City name, for example Tokyo.",
      "examples": [
        "Tokyo",
        "Paris"
      ]
    },
    "sort": {
      "enum": [
        "recommended",
        "lowest_price",
        "top_rated"
      ],
      "type": "string",
      "default": "recommended",
      "description": "Listing order, for example lowest_price.",
      "examples": [
        "lowest_price",
        "top_rated"
      ]
    },
    "rooms": {
      "type": "integer",
      "default": 1,
      "minimum": 1,
      "description": "Number of rooms, for example 1.",
      "examples": [
        1
      ]
    },
    "adults": {
      "type": "integer",
      "default": 2,
      "minimum": 1,
      "description": "Number of adults, for example 2.",
      "examples": [
        1
      ]
    },
    "check_in": {
      "type": "string",
      "format": "date",
      "description": "Check-in date, for example 2026-10-20.",
      "examples": [
        "2026-10-20",
        "2026-11-10"
      ]
    },
    "currency": {
      "type": "string",
      "default": "USD",
      "pattern": "^[A-Za-z]{3}$",
      "description": "Three-letter currency code, for example USD.",
      "examples": [
        "EUR"
      ]
    },
    "check_out": {
      "type": "string",
      "format": "date",
      "description": "Check-out date, for example 2026-10-22.",
      "examples": [
        "2026-10-22",
        "2026-11-12"
      ]
    },
    "min_stars": {
      "type": "integer",
      "maximum": 5,
      "minimum": 1,
      "description": "Minimum hotel stars, for example 4.",
      "examples": [
        4
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum hotels to return, for example 20.",
      "x-fous-developer": true,
      "examples": [
        5,
        3
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "city": "Tokyo",
      "check_in": "2026-10-20",
      "check_out": "2026-10-22"
    },
    {
      "city": "Paris",
      "sort": "lowest_price",
      "rooms": 1,
      "adults": 1,
      "check_in": "2026-11-10",
      "currency": "EUR",
      "check_out": "2026-11-12",
      "min_stars": 4,
      "max_results": 5
    },
    {
      "city": "Tokyo",
      "sort": "top_rated",
      "check_in": "2026-10-20",
      "check_out": "2026-10-22",
      "max_results": 3
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `hotels` | array |  |  |
| `hotels[].area` | string or null | `"Central Tokyo \| Near Japan National Stadium"` |  |
| `hotels[].link` | string | `"https://www.trip.com/hotels/detail/?hotelId=35541585&checkIn=2026-10-20&checkOut=2026-10-22&adult=2&crn=1&curr=USD"` |  |
| `hotels[].name` | string | `"Mitsui Garden Hotel Jingugaien Tokyo Premier"` |  |
| `hotels[].stars` | integer or null | `5` |  |
| `hotels[].currency` | string | `"USD"` |  |
| `hotels[].hotel_id` | string | `"35541585"` |  |
| `hotels[].total_price` | number | `571` |  |
| `hotels[].guest_rating` | number or null | `9.2` |  |
| `hotels[].review_count` | integer or null | `1211` |  |
| `hotels[].nightly_price` | number | `259` |  |
| `hotels[].free_cancellation` | boolean | `true` |  |
| `hotels[].guest_rating_label` | string or null | `"Great"` |  |
| `hotels[].distance_to_city_centre` | string or null |  |  |

**Example input**

```json
{
  "city": "Tokyo",
  "check_in": "2026-10-20",
  "check_out": "2026-10-22"
}
```

**Example output**

```json
{
  "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
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@trip-com",
  "visibility": "public",
  "operation": "search_flights",
  "version": 1,
  "input": {
    "origin": "Singapore",
    "destination": "Seoul",
    "departure_date": "2026-10-15"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@trip-com\",\n  \"visibility\": \"public\",\n  \"operation\": \"search_flights\",\n  \"version\": 1,\n  \"input\": {\n    \"origin\": \"Singapore\",\n    \"destination\": \"Seoul\",\n    \"departure_date\": \"2026-10-15\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@trip-com",
  "visibility": "public",
  "operation": "search_flights",
  "version": 1,
  "input": {
    "origin": "Singapore",
    "destination": "Seoul",
    "departure_date": "2026-10-15"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/trip-com`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `search_flights`: Search flights. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `search_hotels`: Search hotels. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-trip-com https://api.fous.com/mcp/tools/trip-com --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Compare hotel prices and guest ratings for a city stay
- Find hotels by star rating and cancellation availability
- Compare flight fares between two cities
- Review flight stops, airlines, and journey times
- Plan round trips using departure and return dates

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Trip.com tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Trip.com account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from trip.com when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### What hotels are available for my dates?

Search hotels returns hotel listings for a city and check-in and check-out dates, including prices, ratings, and booking links.

### Which hotels have the lowest prices?

Search hotels can sort listings by lowest price and returns nightly and total prices.

### What flights are available between two cities?

Search flights returns priced options for an origin, destination, and departure date, with airline, stop, and travel-time details.

## Related

- [Expedia API](https://fous.com/tools/expedia.md): Expedia helps travelers find hotels, vacation stays, and travel deals, with hotel prices and flight options for selected destinations and dates; flight listings may be limited.
- [Tripadvisor API](https://fous.com/tools/tripadvisor.md): Tripadvisor provides traveler-ranked first-page city listings of attractions, restaurants and hotels, plus latest reviews; hotel prices and booking sites depend on supplied stay dates and availability.
- [Kayak API](https://fous.com/tools/kayak.md): Kayak compares flight and hotel prices across booking sites and current rental car offers; hotel rates assume two adults per room and cover public location pages, while prices and availability can change at booking.
- [Booking.com API](https://fous.com/tools/booking-com.md): Booking.com helps find stays, property details and public guest reviews; prices and cancellation terms depend on selected dates, and displayed prices may exclude taxes and fees.
- [Google Hotels API](https://fous.com/tools/google-hotels.md): Google Hotels finds stays, guest details and reviews, and compares booking-site totals, cancellation and links for up to six adults; prices and availability can change, and some prices or topic ratings may be unavailable.
- [Google Flights API](https://fous.com/tools/google-flights.md): Google Flights returns route schedules, public fares, monthly lowest prices, and flight or destination options with times, stops, emissions, and fares that may change.
- [Agoda API](https://fous.com/tools/agoda.md): Agoda finds stays and room prices for selected dates; displayed prices exclude taxes and fees, and availability, prices, and cancellation terms may change before booking.
- [FlixBus API](https://fous.com/tools/flixbus.md): Find and book bus and train trips on FlixBus.
- [All Travel tools](https://fous.com/tools/category/travel)
