> ## Documentation Index
> Fetch the complete documentation index at: https://docs.selfbook.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Destinations Search

> Returns a list of geographic destinations and/or specific hotel properties based on a search query.
Objects in the `results` array may be a Destination (geographic area) or a Hotel (specific property),
distinguished by their `type` field.




## OpenAPI

````yaml get /rest/v1/destinations/search
openapi: 3.0.4
info:
  title: Selfbook Travel API
  version: '1.0'
  description: |
    This is the OpenAPI specification for `Selfbook Travel API`.
servers:
  - url: https://sandbox.travel.selfbook.com
    description: Sandbox server
  - url: https://travel.selfbook.com
    description: Production
security: []
paths:
  /rest/v1/destinations/search:
    get:
      summary: Search for destinations or hotels
      description: >
        Returns a list of geographic destinations and/or specific hotel
        properties based on a search query.

        Objects in the `results` array may be a Destination (geographic area) or
        a Hotel (specific property),

        distinguished by their `type` field.
      operationId: SearchDestinations
      parameters:
        - name: query
          in: query
          required: true
          description: The search term. An empty string triggers a wildcard search.
          schema:
            type: string
          example: hawaii
        - name: category
          in: query
          required: false
          description: Filters results by a specific category (e.g., Beach, Spotlights).
          schema:
            type: string
          example: Beach
        - name: type
          in: query
          required: false
          description: Limits the result types returned.
          schema:
            type: string
            enum:
              - destinations
              - hotels
      responses:
        '200':
          description: A successful search response
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/Destination'
                        - $ref: '#/components/schemas/Hotel'
        '400':
          description: Bad request — invalid parameters or the search failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/REST-401'
      security:
        - BasicAuthentication: []
components:
  schemas:
    Destination:
      type: object
      description: A geographic location result (country, state, or city).
      properties:
        objectID:
          type: string
          description: Unique slug-based ID (e.g., country:state:city).
          example: united-states:new-york:new-york-city
        type:
          type: string
          enum:
            - destination
          example: destination
        name:
          type: string
          description: Full display string for the location.
          example: New York City, New York, United States
        city:
          type: string
          nullable: true
          description: City name. May be null for state- or country-level destinations.
          example: New York City
        state:
          type: string
          nullable: true
          description: State or province name. May be null for country-level destinations.
          example: New York
        country:
          type: string
          example: United States
        country_code:
          type: string
          nullable: true
          description: ISO 3166-1 alpha-2 country code.
          example: US
        hotels_count:
          type: integer
          description: Number of properties available in this location.
          example: 44
        hotels:
          type: array
          description: List of unique chain-prefixed Property IDs belonging to this area.
          items:
            type: string
          example:
            - YX_95353
            - MO_55033
            - PH_91096
    Hotel:
      type: object
      description: A specific hotel property result.
      properties:
        objectID:
          type: string
          description: Unique hexadecimal identifier for the property.
          example: 6983fb6f13fb8aab147d81a7
        type:
          type: string
          enum:
            - hotel
          example: hotel
        name:
          type: string
          description: Full marketing name of the hotel.
          example: Four Seasons Hotel at The Surf Club, Surfside, Florida
        chain_code:
          type: string
          description: Chain code identifier for the property.
          example: FS
        property_code:
          type: string
          description: Property code identifier within the chain.
          example: B7273
        brand:
          type: string
          nullable: true
          description: Brand or collection the property belongs to. May be null.
          example: Four Seasons
        address_line1:
          type: string
          nullable: true
          description: First line of the street address.
          example: 9011 Collins Ave
        address_line2:
          type: string
          nullable: true
          description: Second line of the street address. Often null.
          example: null
        full_address:
          type: string
          description: Full formatted address.
          example: 9011 Collins Ave, Surfside, FL 33154
        city:
          type: string
          nullable: true
          example: Surfside
        state:
          type: string
          nullable: true
          description: State, province, or region. May be null for locations without one.
          example: Florida
        postal_code:
          type: string
          nullable: true
          example: '33154'
        country:
          type: string
          nullable: true
          example: United States
        country_code:
          type: string
          nullable: true
          description: ISO 3166-1 alpha-2 country code. May be null.
          example: US
        description:
          type: string
          nullable: true
          description: Editorial description of the property.
          example: >-
            An icon reborn on Miami's shoreline, Four Seasons at The Surf Club
            blends historic glamour with modern restraint...
        amenities:
          type: array
          description: List of amenity descriptions. May be empty.
          items:
            type: string
          example:
            - Restaurant
            - Hot breakfast
            - High speed internet access
            - Room service
        phone:
          type: string
          nullable: true
          example: 1 305-381-3333
        email:
          type: string
          nullable: true
          description: Reservations/contact email. Often null.
          example: null
        timezone:
          type: string
          nullable: true
          description: IANA timezone identifier for the property.
          example: America/New_York
        rating:
          type: integer
          nullable: true
          description: Star rating of the property. May be null when unrated.
          example: 5
        check_in_time:
          type: string
          nullable: true
          description: Local check-in time in HH:MM:SS format. May be null.
          example: '16:00:00'
        check_out_time:
          type: string
          nullable: true
          description: Local check-out time in HH:MM:SS format. May be null.
          example: '12:00:00'
        image_url:
          type: string
          format: uri
          nullable: true
          description: Primary hero image for the property.
          example: >-
            https://www.fourseasons.com/alt/img-opt/publish/content/dam/fourseasons/images/web/MFL/MFL_1008_original.jpg
        images:
          type: array
          description: Gallery of image URLs for the property.
          items:
            type: string
            format: uri
          example:
            - >-
              https://www.fourseasons.com/alt/img-opt/publish/content/dam/fourseasons/images/web/MFL/MFL_1008_original.jpg
            - >-
              https://i.travelapi.com/lodging/17000000/16200000/16199900/16199864/1a63e9ca_w.jpg
        category:
          type: string
          nullable: true
          description: >-
            Category grouping used to organize search results (e.g., Spotlights,
            Beach).
          example: Spotlights
        priority_rank:
          type: integer
          nullable: true
          description: >-
            Ordering rank within the category. Lower ranks first; 9999 indicates
            unranked.
          example: 1
        coordinates:
          type: object
          nullable: true
          description: Geographic coordinates of the property.
          properties:
            latitude:
              type: number
              format: double
              example: 25.877778
            longitude:
              type: number
              format: double
              example: -80.121111
    Error:
      type: object
      properties:
        code:
          type: integer
          description: Numeric error code.
          example: 2001
        details:
          type: array
          description: One or more additional details about error condtion.
          items:
            type: object
            properties:
              message:
                description: A more detailed error message.
                type: string
                example: check_out_date is missing
              field:
                description: >-
                  Included for validation errors. Indicating the path to the
                  problem field.
                type: array
                items:
                  type: string
                  example: check_out_date
        message:
          type: string
          description: A summary of the error.
          example: >-
            Unable to process your request. Missing or invalid request
            parameters.
        type:
          type: string
          enum:
            - APPLICATION_ERROR
            - BOOKING_CANCELLATION_ERROR
            - BOOKING_CREATION_ERROR
            - BOOKING_ERROR
            - PAYMENT_PROCESSING_ERROR
            - VALIDATION
          example: VALIDATION
  responses:
    REST-401:
      description: |
        Unauthorized
        the API key token is missing, invalid, or expired
  securitySchemes:
    BasicAuthentication:
      type: http
      description: |
        Basic authentication where:
          - user-id is a partner account ID
          - user-password is an API key token associated with the partner account
      scheme: basic

````