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

# /despegar/hotels/search

> Search Despegar hotels and accommodations in a city. Returns properties with id, name, distance from the city centre, star rating, guest rating, nightly from-price (and pre-discount price with discount label), currency, free-cancellation flag, loyalty points, amenities, main photo, photo gallery and the hotel detail URL. Pass a destination city id (resolve it via places search) and optionally check-in/check-out dates and room occupancy for dated pricing. Results are the curated 'from-price' shelf offers Despegar surfaces for the city (popular/best/by-star/with-breakfast shelves, deduplicated per hotel) — a discovery listing, not an exhaustive filterable availability board; star/price/amenity facets are not accepted as inputs.

**Price:** 10 credits

**⚠️ Common errors:** 412: City not found or no hotels available for the given destination



## OpenAPI

````yaml /openapi/travel-hospitality.json post /api/despegar/hotels/search
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/despegar/hotels/search:
    post:
      tags:
        - /despegar
      summary: /despegar/hotels/search
      description: >-
        Search Despegar hotels and accommodations in a city. Returns properties
        with id, name, distance from the city centre, star rating, guest rating,
        nightly from-price (and pre-discount price with discount label),
        currency, free-cancellation flag, loyalty points, amenities, main photo,
        photo gallery and the hotel detail URL. Pass a destination city id
        (resolve it via places search) and optionally check-in/check-out dates
        and room occupancy for dated pricing. Results are the curated
        'from-price' shelf offers Despegar surfaces for the city
        (popular/best/by-star/with-breakfast shelves, deduplicated per hotel) —
        a discovery listing, not an exhaustive filterable availability board;
        star/price/amenity facets are not accepted as inputs.


        **Price:** 10 credits


        **⚠️ Common errors:** 412: City not found or no hotels available for the
        given destination
      operationId: __api_despegar_hotels_search_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DespegarHotelsSearchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DespegarSearchHotel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DespegarHotelsSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        region:
          $ref: '#/components/schemas/DespegarRegion'
          default: AR
        destination:
          type: string
          minLength: 1
        check_in:
          anyOf:
            - type: string
              format: date
            - type: 'null'
        check_out:
          anyOf:
            - type: string
              format: date
            - type: 'null'
        adults:
          type: integer
          maximum: 8
          minimum: 1
          default: 2
        children_ages:
          items:
            type: integer
          type: array
          default: []
        rooms:
          type: integer
          maximum: 8
          minimum: 1
          default: 1
        count:
          type: integer
          minimum: 1
      type: object
      required:
        - destination
        - count
    DespegarSearchHotel:
      properties:
        '@type':
          type: string
          default: DespegarSearchHotel
        id:
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
        distance_text:
          anyOf:
            - type: string
            - type: 'null'
        stars:
          anyOf:
            - type: number
            - type: 'null'
        rating:
          anyOf:
            - type: number
            - type: 'null'
        price:
          anyOf:
            - type: number
            - type: 'null'
        original_price:
          anyOf:
            - type: number
            - type: 'null'
        currency:
          anyOf:
            - type: string
            - type: 'null'
        discount_label:
          anyOf:
            - type: string
            - type: 'null'
        has_free_cancellation:
          anyOf:
            - type: boolean
            - type: 'null'
        is_promoted:
          anyOf:
            - type: boolean
            - type: 'null'
        is_flexible:
          anyOf:
            - type: boolean
            - type: 'null'
        loyalty_points:
          anyOf:
            - type: integer
            - type: 'null'
        reference_date:
          anyOf:
            - type: string
            - type: 'null'
        city_id:
          anyOf:
            - type: string
            - type: 'null'
        url:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        images:
          items:
            type: string
          type: array
          default: []
        amenities:
          items:
            type: string
          type: array
          default: []
      type: object
      required:
        - id
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    DespegarRegion:
      type: string
      enum:
        - AR
        - BO
        - CL
        - CO
        - CR
        - EC
        - SV
        - GT
        - MX
        - NI
        - PA
        - PY
        - PE
        - PR
        - US
        - UY
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````