Fortrip
HTTP APIReference

Search hotels

Find hotels by destination and/or text, with an indicative per-room-night price when a stay is given.

The full rules agents follow for this call are on its MCP tool's page, search_hotels.

POST
/v1/hotels/search

Authorization

bearerAuth
headerAuthorizationBearer <token>

A Fortrip OAuth access token from the device authorization flow (RFC 8628). GET /v1/auth/config returns the flow's endpoints.

Request Body

application/json
  1. body
destination?||||

Where to search. A first page needs this or text.

text?string

Hotel name, brand or area to match, 1 to 128 characters. A first page needs this or destination.

Length1 <= length <= 128
stay?

Dates and party. Needed for indicative prices. Search uses only the dates when the rooms differ.

pricing?string

indicative adds an approximate price per hotel and needs a stay; none skips prices. Default: indicative with a stay, otherwise none.

Value in"indicative""none"
filters?

Filters every hotel in the answer must pass.

sort?string

Result order. distance needs a destination, relevance needs text, price_asc and price_desc need indicative pricing. Default: relevance with text, otherwise distance.

Value in"distance""relevance""stars_desc""price_asc""price_desc"
limit?integer

Hotels per page, 1 to 50. Default 20.

Range1 <= value <= 50
cursor?string

nextCursor from the previous response. A next page is the cursor and, optionally, limit; nothing else.

Length1 <= length
locale?string

Language for names and text in the response: en or zh.

Value in"en""zh"
displayCurrency?string

Currency to show prices in, USD or CNY. It never changes what is charged: payment is in USD.

Value in"USD""CNY"

Response Body

Search hotels

application/json
  1. response
destination*|||null
text*|null
stay*|null
pricing*
sort*|string
coverage*
data*array<>
nextCursor*|

Pass it back as cursor for the next page; null on the last page.

notes*array<>
[key: string]?unknown
Example Request
curl -X POST 'https://api.fortrip.ai/v1/hotels/search' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "destination": {    "kind": "place",    "place": {      "placeId": "string",      "name": "string",      "names": {        "en": "string",        "zh": "string",        "property1": null,        "property2": null      },      "kind": "country",      "scope": "area",      "cityLike": true,      "population": -9007199254740991,      "region": {        "placeId": "string",        "name": "string",        "names": {          "en": "string",          "zh": "string",          "property1": null,          "property2": null        },        "property1": null,        "property2": null      },      "countryCode": "string",      "location": {        "lat": 0,        "lng": 0,        "property1": null,        "property2": null      },      "property1": null,      "property2": null    },    "resolution": "only_match",    "otherMatches": -9007199254740991,    "scope": "area",    "center": {      "location": {        "lat": 0,        "lng": 0,        "property1": null,        "property2": null      },      "place": {        "placeId": "string",        "name": "string",        "names": {          "en": "string",          "zh": "string",          "property1": null,          "property2": null        },        "property1": null,        "property2": null      },      "basis": "seat",      "property1": null,      "property2": null    },    "radiusMeters": 0,    "radiusSource": "default",    "property1": null,    "property2": null  },  "text": {    "value": "string",    "match": "exact",    "property1": null,    "property2": null  },  "stay": {    "checkIn": "string",    "checkOut": "string",    "rooms": [      {        "adults": -9007199254740991,        "childrenAges": [          -9007199254740991        ],        "property1": null,        "property2": null      }    ],    "property1": null,    "property2": null  },  "pricing": {    "mode": "indicative",    "scope": "page",    "status": "ok",    "property1": null,    "property2": null  },  "sort": "distance",  "coverage": {    "matched": -9007199254740991,    "priced": -9007199254740991,    "withPrice": -9007199254740991,    "poolRadiusMeters": 0,    "excludedNoPrice": -9007199254740991,    "excludedNoFacilityData": -9007199254740991,    "withinMaxRadius": -9007199254740991,    "textAnywhere": -9007199254740991,    "localities": {      "items": [        {          "place": {            "placeId": "string",            "name": "string",            "names": {              "en": "string",              "zh": "string",              "property1": null,              "property2": null            },            "property1": null,            "property2": null          },          "count": -9007199254740991,          "total": -9007199254740991,          "includes": [            {              "place": {                "placeId": "string",                "name": "string",                "names": {                  "en": "string",                  "zh": "string",                  "property1": null,                  "property2": null                },                "property1": null,                "property2": null              },              "members": -9007199254740991,              "property1": null,              "property2": null            }          ],          "property1": null,          "property2": null        }      ],      "unassigned": -9007199254740991,      "more": -9007199254740991,      "property1": null,      "property2": null    },    "nameAsText": -9007199254740991,    "property1": null,    "property2": null  },  "data": [    {      "hotelId": "string",      "name": "string",      "names": {        "en": "string",        "zh": "string",        "property1": null,        "property2": null      },      "stars": 0,      "address": {        "line": {          "text": "string",          "locale": "en",          "property1": null,          "property2": null        },        "countryCode": "string",        "region": {          "placeId": "string",          "name": "string",          "names": {            "en": "string",            "zh": "string",            "property1": null,            "property2": null          },          "property1": null,          "property2": null        },        "property1": null,        "property2": null      },      "location": {        "lat": 0,        "lng": 0,        "property1": null,        "property2": null      },      "timeZone": "string",      "distanceMeters": 0,      "price": {        "kind": "indicative",        "basis": "lowest_unit",        "fromPerRoomNight": {          "amount": "string",          "currency": "string",          "property1": null,          "property2": null        },        "fromPerRoomStay": {          "amount": "string",          "currency": "string",          "property1": null,          "property2": null        },        "approx": {          "fromPerRoomNight": {            "amount": "string",            "currency": "string",            "property1": null,            "property2": null          },          "fromPerRoomStay": {            "amount": "string",            "currency": "string",            "property1": null,            "property2": null          },          "rateDate": "string",          "property1": null,          "property2": null        },        "property1": null,        "property2": null      },      "photo": {        "url": "string",        "caption": {          "text": "string",          "locale": "en",          "property1": null,          "property2": null        },        "property1": null,        "property2": null      },      "property1": null,      "property2": null    }  ],  "nextCursor": "string",  "notes": [    {      "code": "indicative_prices",      "message": "string",      "property1": null,      "property2": null    }  ],  "property1": null,  "property2": null}