{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Hotel search","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"hotel-search","__idx":0},"children":["Hotel search"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Spotnana APIs provide the hotel search functionality using the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/hotelapi/hotel/hotelsearch"},"children":["get hotel search results"]}," endpoint. The endpoint contains search parameters (e.g., occupancy dates) and filters (e.g., price range) to refine the search results displayed."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"hotel-search-parameters","__idx":1},"children":["Hotel search parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Using the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/hotelapi/hotel/hotelsearch"},"children":["get hotel search results"]}," endpoint, you can search by providing the following parameters in the request:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"40%","data-label":"Fields"},"children":["Fields "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["occupancyDates"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The occupancy details required to search for hotels.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["occupancyDates"]}," object contains ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["occupancy.numAdults"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["occupancy.numChildren"]},"."," ","These fields will require the number of adults and children staying in the hotel room."," ","To execute a search, the value of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["numAdults"]}," must be equal to or greater than ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]},"."," ","However, the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["numChildren"]}," field can be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},". ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkInDate"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkoutDate"]}," fields will require the date when the traveler wishes to check in and checkout from the hotel."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["searchBy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The geographical location where you'd like to search for hotels. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"You can search by the following criteria: ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["airport"]},": Search using an airport code to list the hotels in close proximity to that airport. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["coordinates"]},": Search using a latitude and longitude coordinate to list the hotels in that vicinity. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hotelCode"]},": Search using a specific hotel code to list that hotel's availability and nearby hotels in the results. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hotelCodes"]},": Search using one or more hotel codes to list the availability of those hotels and nearby hotels in the results."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's a sample request for the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/hotelapi/hotel/hotelsearch"},"children":["hotel search"]}," API containing the search parameters:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","data-title":"/v2/hotel/search","header":{"title":"/v2/hotel/search","controls":{"copy":{}}},"source":"// ... payload truncated for focus\n{\n  \"searchParams\": {\n    \"occupancyDates\": {\n      \"occupancy\": [\n        {\n          \"numAdults\": 1\n        }\n      ],\n      \"checkInDate\": {\n        \"iso8601\": \"2026-03-10T15:00\"\n      },\n      \"checkOutDate\": {\n        \"iso8601\": \"2026-03-15T10:00\"\n      }\n    },\n    \"searchBy\": {\n      \"searchType\": \"AIRPORT\",\n      \"airport\": \"JFK\"\n    }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"hotel-search-filters","__idx":2},"children":["Hotel search filters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["filters"]}," field in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/hotelapi/hotel/hotelsearch"},"children":["hotel search"]}," API provides several optional filters to refine the hotel search results."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Some important filters include:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["prepaidQualifier"]},": Sets the search to include hotels with prepaid booking options."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["priceRange"]},": Shows hotels with an ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/guides/hotel_guides/hotel_price_guide#average-nightly-rate"},"children":["average nightly rate"]}," within a certain price range (e.g., between $200 to $400) of the local currency (as set in the traveler's legal entity)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amenities"]},": Filters hotels based on the preferred hotel amenities (e.g., free Wi-Fi, breakfast inclusive, etc)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["starRatings"]},": Filters hotels based on a specific star rating rating (e.g., list only 3-star and 4-star hotels)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nameQuery"]},": Searches based on the text entered in this field. Enter the name of the hotel you wish to be displayed in the search results."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eligibleForLoyalty"]},": Displays hotels where a traveler can earn loyalty points."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payByPoints"]},": Displays hotels that accept loyalty points as a form of payment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["modifiableOnly"]},": Displays hotels that allow the traveler to make changes to their booking post-reservation. See the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/spotnana/hotel_modify_workflow"},"children":["modifying a hotel booking workflow"]}," for more information."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["preferredOnly"]},": Shows the preferred hotels as configured in the company policy by the administrators."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["radius"]},": Displays the available hotels within the search radius provided. For example, assume the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["searchType"]}," was set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AIRPORT"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["searchBy"]}," was set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DXB"]},". If the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["radius"]}," filter is set to 10 miles, then the results would display hotels within a 10-mile radius of the search location (i.e., DXB airport)."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can view all the available filters within the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["filters"]}," field of the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/hotelapi/hotel/hotelsearch"},"children":["hotel search"]}," API."]}]},"headings":[{"value":"Hotel search","id":"hotel-search","depth":1},{"value":"Hotel search parameters","id":"hotel-search-parameters","depth":2},{"value":"Hotel search filters","id":"hotel-search-filters","depth":2}],"frontmatter":{"seo":{"title":"Hotel search"}},"lastModified":"2025-12-10T11:09:33.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/hotel_guides/hotel_search_guide","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}