DocumentationMCPCLI

Get started

  • Introduction
  • Quickstart
  • Installation

Reference

  • Response schemas
  • Errors & limits

Reference

Response schemas

The CLI prints these objects on stdout. MCP tools return them as structuredContent. Fields marked optional can be absent; a type with null means the value can be null.

Search result

From fortrip search and search_hotels. A hotel is listed only when every night has a price.

{
  "checkIn": "2026-11-10",
  "checkOut": "2026-11-12",
  "nights": 2,
  "currency": "CNY",
  "fx": null,
  "hotels": [
    {
      "hotelId": 266000,
      "name": "曼谷安纳塔拉河畔度假酒店",
      "nameEn": "Anantara Riverside Bangkok Resort",
      "starLevel": 5,
      "cityCode": 904976,
      "cityNameEn": "Bangkok",
      "price": {
        "totalFrom": 3160.61,
        "nightlyFrom": 1580.31,
        "nightly": [{ "date": "2026-11-10", "price": 1459.47 }, ...]
      },
      ...
    }
  ],
  "pagination": { "page": 1, "pageSize": 20, "total": 2571 },
  "coverage": { "matched": 3581, "candidates": 3581, "priced": 2571 }
}
checkInstring

Check-in date, yyyy-MM-dd.

checkOutstring

Check-out date, yyyy-MM-dd.

nightsnumber

Nights in the stay.

currency"CNY" | "USD"

Currency of every price in the response.

fxobject | null

How prices were converted to currency. null when no conversion was needed.

fx.fromstring

Currency the prices were quoted in.

fx.ratenumber

Units of currency per unit of from.

fx.source"stripe" | "fallback"

stripe: Stripe's live rate. fallback: a fixed rate, used when Stripe could not quote.

hotelsobject[]

Hotels with a price for every night. Prices are indicative; quote live rates before booking.

hotels[].hotelIdnumber

Hotel id. Pass it to hotel details, rates and booking.

hotels[].resourceHotelIdstring

Catalogue record id. Not used by other calls.

hotels[].namestring

Hotel name, often in Chinese.

hotels[].nameEnstring | null

Hotel name in English.

hotels[].starLevelnumber

Star rating, 0–5.

hotels[].countryNamestring

Country.

hotels[].countryNameEnstring | null

Country in English.

hotels[].cityCodenumber

Catalogue city code. Use it as cityCode in search.

hotels[].cityNamestring

City.

hotels[].cityNameEnstring | null

City in English.

hotels[].addressstring

Address.

hotels[].addressEnstring | null

Address in English.

hotels[].latitudenumber | null

Latitude (WGS 84).

hotels[].longitudenumber | null

Longitude (WGS 84).

hotels[].distanceMetersnumberoptional

Distance from near. Present only when searching with near.

hotels[].priceobject

Indicative price for the stay.

hotels[].price.totalFromnumber

Sum of the nightly prices.

hotels[].price.nightlyFromnumber

totalFrom divided by nights.

hotels[].price.nightlyobject[]

Lowest price for each night.

hotels[].price.nightly[].datestring

Night, yyyy-MM-dd.

hotels[].price.nightly[].pricenumber

Price for the night.

paginationobject

Paging.

pagination.pagenumber

Current page.

pagination.pageSizenumber

Hotels per page.

pagination.totalnumber

Hotels after price filters.

coverageobject

How many hotels the search matched and priced.

coverage.matchednumber

Hotels matching the query and filters.

coverage.candidatesnumber

Matches that could be priced.

coverage.pricednumber

Candidates with a price for every night, before price filters.

Hotel details

From fortrip hotel and get_hotel. About 8–10 KB per hotel. Unknown values are null.

hotelIdnumber

Hotel id.

resourceHotelIdstring

Catalogue record id.

namestring

Hotel name, often in Chinese.

nameEnstring | null

Hotel name in English.

starLevelnumber | null

Star rating, 0–5.

brandstring | null

Brand.

countrystring | null

Country.

provincestring | null

Province or state.

citystring | null

City.

districtstring | null

District.

addressstring | null

Address.

addressEnstring | null

Address in English.

latitudenumber | null

Latitude. GCJ-02 in mainland China, about 500 m off WGS 84.

longitudenumber | null

Longitude.

telephonestring | null

Phone number.

websitestring | null

Website.

openedOnstring | null

Opening date.

renovatedOnstring | null

Last renovation date.

floorsnumber | null

Floors.

totalRoomsnumber | null

Rooms in the hotel.

introstring | null

Description.

introEnstring | null

Description in English.

checkInobject

Check-in window, "HH:mm".

checkIn.fromstring | null

Earliest check-in.

checkIn.tostring | null

Latest check-in.

checkOutobject

Check-out window, "HH:mm".

checkOut.fromstring | null

Earliest check-out.

checkOut.tostring | null

Latest check-out.

breakfastServiceboolean | null

The hotel serves breakfast. Says nothing about whether a rate includes it.

depositobject

Deposit taken at the hotel.

deposit.requiredboolean | null

Whether a deposit is required.

deposit.amountnumber | null

Deposit amount.

deposit.currencystring | null

Deposit currency.

policiesobject[]

Hotel policies. Only topics with text are returned.

policies[].topicstring

checkIn, importantNotices, booking, bookingTips, checkInOut, checkInTips, reception, deposit, meal, extraBed, pets, surroundings, meetings or nonSmoking.

policies[].zhstring | null

Policy text in Chinese.

policies[].enstring | null

Policy text in English.

facilitiesobject[]

Facilities. These names work as facilities in search.

facilities[].namestring

Facility name.

facilities[].nameEnstring | null

Facility name in English.

photosobject[]

Up to 8 hotel photos.

photos[].urlstring

HTTPS image URL. Treat it as opaque; it may go through Fortrip's image proxy.

photos[].titlestring | null

Caption.

roomsobject[]optional

Catalogue rooms. Present only with includeRooms / --with-rooms.

rooms[].roomIdstring | null

Room id, matching rooms[].roomId in rates. null when it has no match.

rooms[].namestring | null

Room name.

rooms[].nameEnstring | null

Room name in English.

rooms[].areaMinnumber | null

Smallest area, m².

rooms[].areaMaxnumber | null

Largest area, m².

rooms[].floorMinnumber | null

Lowest floor.

rooms[].floorMaxnumber | null

Highest floor.

rooms[].window"No window" | "Window" | "Partial window" | null

Window type.

rooms[].maxOccupancynumber | null

Most guests the room sleeps.

rooms[].bedsstring | null

Bed setup, e.g. "1 King Bed".

rooms[].nonSmokingboolean | null

Non-smoking room.

rooms[].extraBedFeenumber | null

Extra bed fee.

rooms[].extraBedFeeCurrencystring | null

Currency of extraBedFee.

rooms[].standardRoomboolean

Standardised room type.

Rates result

From fortrip rates and get_rates. Prices are converted and rounded up to the cent one by one, so the nightly prices can add up to a few cents more or less than totalPrice.

checkInstring

Check-in date, yyyy-MM-dd.

checkOutstring

Check-out date, yyyy-MM-dd.

currency"CNY" | "USD"

Currency of every price except fees.

fxobject | null

How prices were converted to currency. null when no conversion was needed.

fx.fromstring

Currency the prices were quoted in.

fx.ratenumber

Units of currency per unit of from.

fx.source"stripe" | "fallback"

stripe: Stripe's live rate. fallback: a fixed rate, used when Stripe could not quote.

hotelsobject[]

One entry per hotel with live rates.

hotels[].hotelIdnumber

Hotel id.

hotels[].namestringoptional

Hotel name.

hotels[].nameEnstringoptional

Hotel name in English.

hotels[].roomsobject[]

Cheapest rooms first, up to maxRoomsPerHotel.

hotels[].rooms[].roomIdstring

Room id. Pass it to booking.

hotels[].rooms[].namestringoptional

Room name.

hotels[].rooms[].nameEnstringoptional

Room name in English.

hotels[].rooms[].ratesobject[]

The cheapest rate for each meal plan × free-cancellation option, cheapest first.

hotels[].rooms[].rates[].ratePlanCodestring

Rate id. Pass it to booking.

hotels[].rooms[].rates[].boardCodestring

Meal plan: RO, BB, HB, FB, BL, BD, HBBL, HBLD or AI.

hotels[].rooms[].rates[].boardCountnumber

Guests per room the meal plan covers. Fewer than adults per room means the meals don't cover everyone.

hotels[].rooms[].rates[].adultsnumber

Adults per room.

hotels[].rooms[].rates[].childrenAgesnumber[]optional

Children's ages.

hotels[].rooms[].rates[].isInstantConfirmboolean

Confirmed instantly after payment.

hotels[].rooms[].rates[].confirmByMinsnumber | nulloptional

Minutes the hotel takes to confirm, when not instant.

hotels[].rooms[].rates[].totalPricenumber

Total for the stay, in currency. Compare this, not the sum of dailyPrices.

hotels[].rooms[].rates[].dailyPricesobject[]

Price per night.

hotels[].rooms[].rates[].dailyPrices[].datestring

Night, yyyy-MM-dd.

hotels[].rooms[].rates[].dailyPrices[].pricenumber

Price per room for the night.

hotels[].rooms[].rates[].dailyPrices[].status0 | 1

1 bookable, 0 not bookable.

hotels[].rooms[].rates[].nationalityRule1 | 2optional

1: only nationalityCodes may book. 2: everyone except them.

hotels[].rooms[].rates[].nationalityCodesstring[]optional

Country codes for nationalityRule.

hotels[].rooms[].rates[].cancellationPoliciesobject[]optional

Cancellation fee steps.

hotels[].rooms[].rates[].cancellationPolicies[].amountnumber

Fee if cancelled from from on.

hotels[].rooms[].rates[].cancellationPolicies[].fromstring

ISO 8601 date-time the fee starts.

hotels[].rooms[].rates[].feesobject[]optional

Fees paid at the hotel, in their own currency.

hotels[].rooms[].rates[].fees[].typestring

Fee type, e.g. ResortFee.

hotels[].rooms[].rates[].fees[].isMandatoryboolean

Whether the hotel always charges it.

hotels[].rooms[].rates[].fees[].amountnumber

Amount, in the fee's own currency.

hotels[].rooms[].rates[].fees[].currencystring

Currency of amount.

hotels[].rooms[].rates[].refundableboolean

Can be cancelled for a refund.

hotels[].rooms[].rates[].freeCancelUntilstring | null

Free cancellation ends at this ISO 8601 date-time.

hotels[].rooms[].rates[].freeCancellationboolean

Can still be cancelled free of charge right now.

hotels[].rooms[].staticobject | null

Catalogue facts for the room. null when the catalogue has none.

hotels[].rooms[].static.catalogueRoomIdstring

Catalogue room id.

hotels[].rooms[].static.namestring | null

Room name.

hotels[].rooms[].static.nameEnstring | null

Room name in English.

hotels[].rooms[].static.areaMinnumber | null

Smallest area, m².

hotels[].rooms[].static.areaMaxnumber | null

Largest area, m².

hotels[].rooms[].static.floorMinnumber | null

Lowest floor.

hotels[].rooms[].static.floorMaxnumber | null

Highest floor.

hotels[].rooms[].static.window"No window" | "Window" | "Partial window" | null

Window type.

hotels[].rooms[].static.maxOccupancynumber | null

Most guests the room sleeps.

hotels[].rooms[].static.bedsstring | null

Bed setup, e.g. "1 King Bed".

hotels[].rooms[].static.nonSmokingboolean | null

Non-smoking room.

hotels[].rooms[].static.extraBedFeenumber | null

Extra bed fee.

hotels[].rooms[].static.extraBedFeeCurrencystring | null

Currency of extraBedFee.

hotels[].rooms[].static.standardRoomboolean

Standardised room type.

hotels[].rooms[].static.photosstring[]

Up to 3 HTTPS photo URLs. Often empty.

hotels[].coverageobject

Room and rate counts before and after filtering.

hotels[].coverage.roomsnumber

Rooms offered.

hotels[].coverage.ratesnumber

Rates offered.

hotels[].coverage.matchedRoomsnumber

Rooms left after filters.

hotels[].coverage.matchedRatesnumber

Rates left after filters.

hotels[].coverage.returnedRoomsnumber

Rooms returned.

hotels[].coverage.returnedRatesnumber

Rates returned.

Booking result

From fortrip book and create_booking. Show the user the amount, currency, the stay and every item in terms, and ask them to confirm before you share paymentUrl.

{
  "agentOrderId": "c451cff9324ee6f7eaafda5d39aff423",
  "paymentUrl": "https://fortrip.ai/booking-status?session_id=cs_...",
  "amount": 372.78,
  "currency": "USD",
  "orderUrl": "https://fortrip.ai/orders/c451...",
  "statusUrl": "https://fortrip.ai/booking-status?session_id=cs_...",
  "stay": {
    "hotelId": 266000,
    "hotelName": "Anantara Riverside Bangkok Resort",
    "roomName": "Deluxe Room",
    "checkIn": "2026-11-10",
    "checkOut": "2026-11-12",
    "nights": 2,
    "rooms": 1,
    "adultsPerRoom": 2,
    "childrenAgesPerRoom": []
  },
  "terms": {
    "boardCode": "BB",
    "boardCount": 2,
    "refundable": true,
    "freeCancelUntil": "2026-11-09T12:00:00.000+07:00",
    "cancellation": [{ "amount": 372.78, "from": "2026-11-09T12:00:00.000+07:00" }],
    "isInstantConfirm": true,
    "confirmByMins": null,
    "payAtHotelFees": [{ "type": "ResortFee", "isMandatory": true, "amount": 30, "currency": "THB" }]
  }
}
agentOrderIdstring

Order id. The same user and stay always get the same order.

paymentUrlstring

Fortrip page that recaps the booking and continues to payment. Anyone holding it can pay, so share it only with the user. Valid for about 3 h 45 min.

amountnumber | null

Amount charged. null only when the order can't be read back.

currencystring

Currency charged, usually USD. May differ from the currency shown by rates.

orderUrlstring

Order page on fortrip.ai. Requires sign-in.

statusUrlstringoptional

Public booking status page, the same page as paymentUrl. No sign-in needed.

stayobject

The stay as the order recorded it. Read it back to the user with the terms. Every room has the same occupancy.

stay.hotelIdnumber

Hotel id.

stay.hotelNamestring | null

English name, or the Chinese name when there is none.

stay.roomNamestring | null

Room name.

stay.checkInstring

yyyy-MM-dd.

stay.checkOutstring

yyyy-MM-dd.

stay.nightsnumber

Nights in the stay.

stay.roomsnumber

Rooms booked.

stay.adultsPerRoomnumber

Adults in each room.

stay.childrenAgesPerRoomnumber[]

Children's ages in each room.

termsobject | null

The terms the user accepts by paying. Show them before sharing paymentUrl. null only when the order can't be read back.

terms.boardCodestring

Meal plan.

terms.boardCountnumber

Guests per room the meal plan covers.

terms.refundableboolean

Can be cancelled for a refund.

terms.freeCancelUntilstring | null

Free cancellation ends at this ISO 8601 date-time.

terms.cancellationobject[]

Cancellation fee steps.

terms.cancellation[].amountnumber

Fee if cancelled from from on.

terms.cancellation[].fromstring

ISO 8601 date-time the fee starts.

terms.isInstantConfirmboolean

Confirmed instantly after payment.

terms.confirmByMinsnumber | null

Minutes to confirm, when not instant.

terms.payAtHotelFeesobject[]

Fees paid at the hotel.

terms.payAtHotelFees[].typestring

Fee type, e.g. ResortFee.

terms.payAtHotelFees[].isMandatoryboolean

Whether the hotel always charges it.

terms.payAtHotelFees[].amountnumber

Amount, in the fee's own currency.

terms.payAtHotelFees[].currencystring

Currency of amount.

nextStepstringoptional

MCP only. Reminds the model to confirm the terms with the user first.

The amount charged is in the booking's own currency, usually USD, and can differ from the CNY or USD figure shown by rates. Calling again for the same stay returns the same link while it is valid, or a new one when the price or terms changed. See Errors & limits for the 409 and 422 cases.

PreviousInstallationNextErrors & limits

On this page

  • Search result
  • Hotel details
  • Rates result
  • Booking result
Fortrip

Opinionated trip planning, built for real itineraries.

Plan

  • AI Trip Planner
  • Validator
  • Transport
  • Stays

Company

  • Pricing
  • About
  • Team
  • Blog
  • Decision Optimization
  • Itinerary Selection
  • News

Resources

  • Explore Destinations
  • Brand Assets
  • Responsible Travel
  • vs ChatGPT
  • Best AI travel planner
  • FAQ

© 2026 FortripAI, Inc.

PrivacyTerms
info@fortrip.ai+1-650-272-16121111b South Governors Ave, Dover, DE 19904
Skip to main content
Fortrip Logo
HomeExplorePlanningPricing
CLIMCPDocs
Saved0