Read the content of many hotels by id
Reads the content FX-Port holds for up to 200 hotels at once, by id.
/api/v1/hotels/searchWith detail_level=minimal (alias mini) each hotel is the MINI card of search_advanced: 13 fields, about 5 KB. Without it each hotel is the FULL document: 31 fields with every room type, about 35 KB. Use the mini form for lists and the full form (or get_hotel_info) for one hotel the user opened. The answer is a bare JSON array of snake_case hotels, not in the order you asked; an id that has no cached content is left out and queued for loading, it is not reported (use missing_hotel_ids of the search, or get_hotel_info, for those). An id made of digits (a JSON integer or text) is also looked up as the supplier's numeric hid; a hotel reached by both comes back once, and a digits-only id that matches nothing is not queued. fields returns only the top-level fields you list (id is always added). images_limit keeps the first N photos of each mini card. The call reads FX-Port's cache only: it never asks the supplier.
curl 'https://api.fx-port.com/api/v1/hotels/search?detail_level=minimal' \
-H "Authorization: Bearer fxp_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"hotel_ids": [
"test_hotel_do_not_book",
"hotel_honduras_maya_6"
]
}'[
{
"id": "test_hotel_do_not_book",
"hid": 8473727,
"name": "Test Hotel (Do Not Book) test",
"kind": "Apartment",
"address": "Avenida Roble, Frente al Mall Multiplaza, Tegucigalpa",
"latitude": 14.079872,
"longitude": -87.21677,
"postal_code": null,
"region": {
"id": 3421,
"country_code": "HN",
"iata": "TGU",
"name": "Tegucigalpa",
"type": "City",
"type_v2": "city"
},
"star_rating": 0,
"images": [
"https://cdn.worldota.net/t/{size}/extranet/b5/d3/b5d3d33394494c68321246882c1bd93a6832dcd5.jpeg",
"https://cdn.worldota.net/t/{size}/extranet/15/44/15440558c952ec4c3488730d1563dc9e8d25832c.JPEG"
],
"serp_filters": [
"has_internet",
"has_parking",
"has_spa",
"has_pets",
"has_jacuzzi",
"kitchen"
],
"amenity_groups": [
{
"amenities": [
"24-hour reception",
"Early check-in",
"Late check-out"
],
"non_free_amenities": [],
"group_name": "General"
},
{
"amenities": [
"Concierge services",
"Dry-cleaning",
"Shoe shine"
],
"non_free_amenities": [
"Dry-cleaning",
"Shoe shine"
],
"group_name": "Services and amenities"
}
]
}
][
{
"id": "test_hotel_do_not_book",
"hid": 8473727,
"name": "Test Hotel (Do Not Book) test",
"kind": "Apartment",
"hotel_chain": "No chain",
"address": "Avenida Roble, Frente al Mall Multiplaza, Tegucigalpa",
"postal_code": null,
"latitude": 14.079872,
"longitude": -87.21677,
"region": {
"id": 3421,
"country_code": "HN",
"iata": "TGU",
"name": "Tegucigalpa",
"type": "City",
"type_v2": "city"
},
"star_rating": 0,
"star_certificate": null,
"email": "[email protected]",
"phone": "+15555550123",
"check_in_time": "14:00:00",
"check_out_time": "12:00:00",
"front_desk_time_start": "00:00:00",
"front_desk_time_end": "00:00:00",
"images": [
"https://cdn.worldota.net/t/{size}/extranet/b5/d3/b5d3d33394494c68321246882c1bd93a6832dcd5.jpeg"
],
"amenity_groups": [
{
"amenities": [
"24-hour reception",
"Early check-in",
"Late check-out"
],
"non_free_amenities": [],
"group_name": "General"
}
],
"serp_filters": [
"has_internet",
"has_parking",
"kitchen"
],
"description_struct": [
{
"title": "Location",
"paragraphs": [
"A perfect fit for a big group of travellers: apartment «Test Hotel (Do Not Book)» ..."
]
}
],
"metapolicy_struct": {
"internet": [
{
"inclusion": "included",
"price": "0.00",
"currency": null,
"price_unit": "unspecified",
"internet_type": "unspecified",
"work_area": "hotel"
}
],
"meal": [
{
"inclusion": "not_included",
"price": "300.00",
"currency": "USD",
"meal_type": "breakfast"
}
],
"children_meal": [
{
"inclusion": "not_included",
"price": "200.00",
"currency": "USD",
"meal_type": "breakfast",
"age_start": 0,
"age_end": 5
}
],
"extra_bed": [
{
"inclusion": "not_included",
"price": "100.00",
"currency": "ALL",
"price_unit": "per_guest_per_night",
"amount": 1
}
],
"cot": [
{
"inclusion": "not_included",
"price": "0.00",
"currency": "USD",
"price_unit": "per_room_per_night",
"amount": 1
}
],
"pets": [
{
"inclusion": "not_included",
"price": "560.00",
"currency": "USD",
"price_unit": "per_room_per_stay",
"pets_type": "unspecified"
}
],
"shuttle": [
{
"inclusion": "not_included",
"price": "100.00",
"currency": "EUR",
"shuttle_type": "one_way",
"destination_type": "train"
}
],
"parking": [
{
"inclusion": "not_included",
"price": "100.00",
"currency": "USD",
"price_unit": "per_car_per_night",
"territory_type": "unspecified"
}
],
"children": [
{
"age_start": 0,
"age_end": 3,
"price": "500.00",
"currency": "CHF",
"extra_bed": "available"
}
],
"visa": {
"visa_support": "support_enable"
},
"deposit": [
{
"availability": "available",
"price": "123.00",
"currency": "HNL",
"price_unit": "per_room_per_stay",
"pricing_method": "fixed",
"payment_type": "cash",
"deposit_type": "unspecified"
}
],
"no_show": {
"availability": "available",
"time": "09:00:00",
"day_period": "after_midday"
},
"add_fee": [],
"check_in_check_out": []
},
"metapolicy_extra_info": "Front desk is open 24/7.",
"room_groups": [
{
"room_group_id": 95,
"name": "Standard Double room full double bed",
"name_struct": {
"main_name": "Standard Double room",
"bedding_type": "full double bed",
"bathroom": "shared bathroom"
},
"rg_ext": {
"class": 3,
"quality": 2,
"sex": 0,
"bathroom": 1,
"bedding": 3,
"family": 0,
"capacity": 2,
"club": 0,
"bedrooms": 0,
"balcony": 0,
"floor": 0,
"view": 0
},
"room_amenities": [
"bath",
"heating"
],
"images": [
"https://cdn.worldota.net/t/{size}/extranet/b5/d3/b5d3d33394494c68321246882c1bd93a6832dcd5.jpeg"
]
}
],
"facts": {
"floors_number": null,
"rooms_number": null,
"year_built": null,
"year_renovated": null,
"electricity": {
"frequency": [
60
],
"voltage": null,
"sockets": [
"a",
"b"
]
},
"register": null
},
"payment_methods": [
"visa",
"maestro",
"cash"
],
"keys_pickup": {
"type": "lockbox",
"phone": "+15555550123",
"email": "[email protected]",
"apartment_office_address": null,
"apartment_extra_information": "The keys are in the box by the front door.",
"is_contactless": true
},
"is_closed": false,
"is_gender_specification_required": false,
"deleted": false
}
]Request
Query parameters
detail_levelstringminimal (alias mini): the compact card. full (default): the whole document.
One of minimal, mini, full. Default full.
fieldsstringA comma separated list of top-level fields to return instead of a detail level, at most 40 (id,name,star_rating). Nested paths are not supported.
images_limitintegerWith detail_level=minimal and no fields: keep only the first N photos of each hotel, 0 to 30. In any other case it is ignored and the answer carries a coerced_value warning. A number outside 0 to 30 answers 400 invalid_images_limit.
Between 0 and 30.
detailLevelstringdeprecatedLegacy name, still accepted. Use detail_level instead.
The detail level, in its older spelling. Use detail_level.
imagesLimitintegerdeprecatedLegacy name, still accepted. Use images_limit instead.
The photo limit, in its older spelling. Use images_limit.
Body
Required, JSON.
hotel_idsarray of stringrequiredThe ids of the hotels, at most 200. An id made of digits is also looked up as the supplier's numeric hid: [8473727] finds the hotel. Spaces around an id are trimmed. Duplicates are dropped; the answer does not follow your order.
At most 200 items.
hotelIdsarray of stringdeprecatedLegacy name, still accepted. Use hotel_ids instead.
The hotel ids, in their older spelling. Use hotel_ids.
idsarray of stringdeprecatedLegacy name, still accepted. Use hotel_ids instead.
The hotel ids, in their older spelling. Use hotel_ids.
Response
200The hotels found: mini cards with detail_level=minimal, full documents otherwise. The X-Results-Count header counts them.
Errors
| Status | Code | Example message |
|---|---|---|
| 400 | invalid_detail_level | 'detail_level' must be 'minimal' (alias 'mini') or 'full' (got 'tiny'). |
| 400 | invalid_body | 'body' can hold at most 200 hotel ids per request. |
| 400 | invalid_images_limit | 'images_limit' must be an integer from 0 to 30. |
The shape of the error body depends on the endpoint. See Errors for every shape and code.