Hotels API
Search hotels and vacation rentals the way you would on a travel site, then open a property for rates, amenities, and booking offers.
Hotels API
We built hotel search so you can ask "what's available in this city for these
dates?" and get priced, rated properties back — then open one property for
the full page: amenities, photos, nearby places, and booking offers with
links. Same authenticated API as the rest of Fiber; billed per request via
chargeInfo.
What you get back is what you'd see on a major online travel agency (inventory, nightly rates, guest ratings, and booking links), returned as JSON instead of a booking-site page. Need Booking.com listings specifically? See Booking.com search.
There is no start/poll pair. Search and property detail are both synchronous.
Search, then open. Get propertyToken from a hotels search. Pass the
same stay (dates, guests, currency, market, language) into the property
detail call, or the rates will not match the list you showed the user.
What it does
- Search a destination for hotels or vacation rentals on a check-in / check-out window.
- Filter by price, guest rating, star class, amenities, brands, or (for rentals) bedrooms and bathrooms.
- Open one property for address, phone, photos, amenity detail, typical price range, and booking offers.
Typical agent prompt this answers: "Find a well-rated hotel under $200 in Austin next week, then give me the booking links."
Operations
The API reference is the
primary spec. Each operation also has markdown for agents at
/ai-docs/<operationId>.md.
| Job | Operation | HTTP | Agents |
|---|---|---|---|
| Search | hotelSearch | POST /v1/hotels/search | ai-docs |
| Property detail | hotelProperty | POST /v1/hotels/property | ai-docs |
| Amenity IDs | getHotelAmenities | GET /v1/enums/hotels/amenities | ai-docs |
| Property-type IDs | getHotelPropertyTypes | GET /v1/enums/hotels/property-types | ai-docs |
| Brand IDs | getHotelBrands | GET /v1/enums/hotels/brands | ai-docs |
Enum GETs are free. Search and property lookups are chargeable.
Search
Required: query, checkInDate, checkOutDate (ISO YYYY-MM-DD). Check-out
must be at least one calendar day after check-in. Check-in must be today or a
future date.
Defaults: adults: 2, children: 0, currencyCode: "USD",
searchMarketCountryCode: "USA" (ISO 3166-1 alpha-3), languageCode: "en".
Prices are not always USD. Pass currencyCode as an ISO 4217 code
(EUR, GBP, CAD, …). Every rate object and typicalPriceRange repeats
that code as currencyCode, and the search/property envelope also returns a
top-level currencyCode. Default is USD when you omit it.
import { hotelSearch } from "@fiberai/sdk";
const result = await hotelSearch({
body: {
apiKey: process.env.FIBER_API_KEY!,
query: "Hotels in Austin Texas",
checkInDate: "2027-06-10",
checkOutDate: "2027-06-12",
adults: 2,
sortBy: "lowestPrice",
minRating: "4.0",
priceRange: { maxPerNight: 200 },
category: {
propertyCategory: "hotel",
hotelStarClasses: [4, 5],
amenities: [35],
freeCancellation: true,
},
},
});
console.log("Matches:", result.data?.output.searchInformation?.totalResultCount);
console.log("First stay total:", result.data?.output.properties[0]?.totalRate);
console.log("Cost:", result.data?.chargeInfo);Equivalent REST body:
{
"apiKey": "YOUR_API_KEY",
"query": "Hotels in Austin Texas",
"checkInDate": "2027-06-10",
"checkOutDate": "2027-06-12",
"adults": 2,
"sortBy": "lowestPrice",
"minRating": "4.0",
"priceRange": { "maxPerNight": 200 },
"category": {
"propertyCategory": "hotel",
"hotelStarClasses": [4, 5],
"amenities": [35],
"freeCancellation": true
}
}Hotels vs vacation rentals
category picks the listing type. Omit it and you get a hotel search.
propertyCategory | Extra filters | Party size cap |
|---|---|---|
hotel (default) | hotelStarClasses (2–5), propertyTypes, amenities (all listed IDs must be present), brands, freeCancellation, specialOffers, ecoCertified | 6 guests (adults + children) |
vacationRental | minBedrooms, minBathrooms | 10 guests |
Hotel-only filters do not apply to vacation rentals, and bedroom/bathroom minimums do not apply to hotels.
Star class is how upscale the property is, not the guest review score.
Guest rating is minRating on input ("3.5" | "4.0" | "4.5") and
rating (0–5) on each result.
Sort and locale
sortBy: relevance (default), lowestPrice, highestRating,
mostReviewed.
languageCode is a BCP-47 tag such as en, pt-BR, or ja — it affects
names and amenity labels. searchMarketCountryCode sets the search market
(regional pricing and availability), not a geographic fence around query.
When children is greater than zero, childrenAges must have exactly that
many ages, each 1–17.
What a search result contains
Each item in properties includes propertyToken, name, optional
description/URL/coordinates/city/countryCode, check-in/out times (HH:mm),
ratePerNight and totalRate, guest rating / reviewCount /
reviewsBreakdown, hotelStarClass, amenity lists, images, nearby places,
and optional deal labels. Vacation rentals may also return essentialInfo
(for example "Entire apartment", "Sleeps 4").
Rates use whole currency units in the requested currencyCode:
allInCost— taxes and fees included, when availablebaseCost— pre-tax; not the final amount charged to a guest
Search also returns brands (useful for subsequent brand filters; empty on
vacation-rental-only searches), currencyCode, and
searchInformation.totalResultCount (approximate). Major groups you can
narrow to via the brand ID list include Marriott, Hilton, Hyatt,
and IHG (and their sub-brands).
Pagination
Hotels search pages with
nextPageToken (not the nextCursor used on people/company
search). Pass the token from the previous response on
the next request, with the same query and filters. Omit it (or pass null)
for the first page. Null means there are no more pages. Each page is a
separate charged search.
Property detail
Get propertyToken from a hotels search result, then pass it here. Do not
invent one.
import { hotelProperty } from "@fiberai/sdk";
const detail = await hotelProperty({
body: {
apiKey: process.env.FIBER_API_KEY!,
propertyToken: "PROPERTY_TOKEN_FROM_SEARCH",
checkInDate: "2027-06-10",
checkOutDate: "2027-06-12",
adults: 2,
},
});
const property = detail.data?.output.property;
console.log(property?.address, property?.phone);
console.log("Offers:", property?.offers.length);The detail payload extends the search property with:
address, E.164phone,directionsUrlamenitiesDetailedoffers— booking sources (sourceName,url,isOfficial, nightly and stay totals). Theurlis an external booking link; Fiber does not complete the reservation.typicalPriceRange(lowerBound/upperBound, pluscurrencyCode)ratingsBreakdown(counts of 1-star through 5-star reviews)
HTTP 404 means that propertyToken did not match a property. Hotels still
bill that lookup — it is not refunded. (A 404 is not "you forgot to search
first"; search does not require a token.)
Filter enums
These lists are what the enum endpoints return today. Prefer the live endpoints if you need a fresh copy.
Property types
GET /v1/enums/hotels/property-types
returns the property-type IDs. Pass id values in category.propertyTypes.
| ID | Name |
|---|---|
| 12 | Beach hotels |
| 13 | Boutique hotels |
| 14 | Hostels |
| 15 | Inns |
| 16 | Motels |
| 17 | Resorts |
| 18 | Spa hotels |
| 19 | Bed and breakfasts |
| 20 | Other |
| 21 | Apartment hotels |
| 22 | Minshuku |
| 23 | Japanese-style business hotels |
| 24 | Ryokan |
Amenities
GET /v1/enums/hotels/amenities
returns the amenity IDs. Pass id values in category.amenities; every
listed ID must be present on the property.
| ID | Name |
|---|---|
| 1 | Free parking |
| 3 | Parking |
| 4 | Indoor pool |
| 5 | Outdoor pool |
| 6 | Pool |
| 7 | Fitness center |
| 8 | Restaurant |
| 9 | Free breakfast |
| 10 | Spa |
| 11 | Beach access |
| 12 | Child-friendly |
| 15 | Bar |
| 19 | Pet-friendly |
| 22 | Room service |
| 35 | Free Wi-Fi |
| 40 | Air-conditioned |
| 52 | All-inclusive available |
| 53 | Wheelchair accessible |
| 61 | EV charger |
Brand groups
GET /v1/enums/hotels/brands
returns the brand IDs. Pass a group id or a child id in category.brands.
The endpoint also returns children (sub-brands).
| ID | Group |
|---|---|
| 33 | Accor Live Limitless |
| 18 | Best Western International |
| 20 | Choice Hotels |
| 289 | Four Seasons |
| 28 | Hilton Honors |
| 37 | Hyatt |
| 202 | IHCL |
| 17 | IHG Hotels & Resorts |
| 46 | Marriott Bonvoy |
| 174 | Melia Hotels International |
| 169 | NH Hotel Group |
| 311 | Omni Hotels & Resorts |
| 353 | OYO |
| 163 | RIU Hotels & Resorts |
| 424 | Sonesta Hotels |
| 493 | Starwood Hotels |
| 312 | Westgate Resorts |
| 53 | Wyndham Hotels & Resorts |
Using it effectively
- Pull filter IDs from the enum endpoints above instead of hard-coding guessed numbers.
- Tighten with
priceRange,minRating, andfreeCancellationbefore you page. Broad destination queries plus many pages burn credits fast. - Keep
queryas a destination or property name people would type ("Hotels in Manhattan New York"), not a paragraph of constraints — put constraints in the typed filters. - Honor HTTP 429 (this route allows 120 requests / minute). Temporary
failures return 503 with a retry message and an
errorCodefor support. - Wire these into MCP if an agent should search stays and open a property without leaving the editor.
Use cases
- Travel-app backends: search a city → show a list → property page with booking links.
- Per-trip price checks: same query and dates on a schedule; compare
totalRate.allInCost. Each check is a paid call, so pick a cadence that matches how often you actually need a new quote. - Agent workflows: "hotel under $200, 4.0+, free cancellation, Austin".
- Deal research: filter
specialOffersor readdeal/dealDescriptionon results.
Credits
| Operation | Default credits |
|---|---|
hotelSearch (agents) | 2 per search page |
hotelProperty (agents) | 2 per property lookup |
| Hotel enum GETs | FREE |
Empty result pages still bill as a search. Trust chargeInfo on the response
for the amount charged. See Billing & credits.
Related: Market intelligence · MCP · SDKs
Market Intelligence APIs
Hotels, Booking.com stays, flights and fare deals, live market quotes, and North American real estate listings, returned as JSON from the same Fiber API.
Yelp
Search Yelp businesses, pull a full business page, and page through reviews — ratings, hours, services, and normalized contact data.