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

# Get a hotel search and its results

> Returns a hotel search and, once it has finished, one page of its hotels.

Searches are asynchronous: while `status` is `PROCESSING` only the search itself comes back, so poll until it is `COMPLETED`, then read `items`. A `FAILED` search has no results. A hotel search expires after its `ttl` (30 minutes) and then answers `404 SEARCH_NOT_FOUND`. Only the organization that created a search can read it.

Results come in pages. Sort them with `order` and `orderBy`, narrow them with `minAmount`, `maxAmount`, `starRating`, `hotelIds`, `latitude`, `longitude` and `radius`, then walk the pages with `limit` and the `next` cursor each response returns (`null` on the last page). A filter that takes several values accepts them repeated or comma-separated (`?starRating=4&starRating=5` or `?starRating=4,5`). Amounts are integers in cents: `98700` is R\$ 987,00.

Each item is a summary with its cheapest fare. To book one, open it with the hotel search item endpoint for everything a trip needs, and create the trip with the item's `id` as `searchItemId`. To place the hotels on a map, read the same search as map points with the map endpoint. An error the travel provider reports about the request — a filter value it does not accept, say — is returned with its own status, `code` and `message`.


## OpenAPI

````yaml /api-reference/travel.openapi.json get /realms/{realmId}/organizations/{organizationId}/hotel/searches/{searchId}
openapi: 3.0.3
info:
  title: Travel
  version: 1.0.0
  description: >-
    Portão 3 travel API. Every endpoint requires a bearer token in the
    Authorization header (Authorization: Bearer <token>) unless its page states
    otherwise; see the Authentication guide. That requirement is not repeated
    per endpoint. Generated by tools/openapi from code (routes + security) and
    the hand-written spec (request/response bodies). Passenger directory, trips
    and the search proxy (air/hotel/bus/vehicle). Every route validates path,
    query and body through a zod Input class (`travel/src/domain/*/input`),
    which documents its parameters and body; responses are the named interfaces
    in `travel/src/domain/*/response.ts`. Confidence tiers: generated:typed=53
    copied:manual=0 unknown=0.
servers:
  - url: https://api.travel.v2.portao3.com.br/
    description: production
  - url: https://api.travel.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Passengers
  - name: Trips
  - name: Air search
  - name: Hotel search
  - name: Bus search
  - name: Vehicle search
paths:
  /realms/{realmId}/organizations/{organizationId}/hotel/searches/{searchId}:
    get:
      tags:
        - Hotel search
      summary: Get a hotel search and its results
      description: >-
        Returns a hotel search and, once it has finished, one page of its
        hotels.
      operationId: getRealmsByRealmIdOrganizationsByOrganizationIdHotelSearchesBySearchId
      parameters:
        - name: realmId
          in: path
          required: true
          description: |-
            ID of your realm.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
        - name: organizationId
          in: path
          required: true
          description: |-
            ID of your organization.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
        - name: searchId
          in: path
          required: true
          description: ID of the hotel search, as returned when it was created.
          schema:
            type: string
            pattern: ^srch_[0-9A-Za-z]{21}$
          example: srch_V1StGXR8Z5jdHi6BmyT2k
        - name: order
          in: query
          required: false
          description: >-
            Sort direction applied to `orderBy`: `ASC` lists the cheapest
            results first, `DESC` the most expensive first.
          schema:
            type: string
            enum:
              - ASC
              - DESC
          example: ASC
        - name: orderBy
          in: query
          required: false
          description: Field to sort the results by. Currently only `amount` is supported.
          schema:
            type: string
            minLength: 1
          example: amount
        - name: next
          in: query
          required: false
          description: >-
            Cursor returned as `next` by the previous page. Omit for the first
            page.
          schema:
            type: string
            minLength: 1
          example: eyJwIjoyfQ==
        - name: limit
          in: query
          required: false
          description: Maximum number of items per page, from 1 to 100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
          example: 20
        - name: minAmount
          in: query
          required: false
          description: >-
            Only results costing at least this amount, in the same unit as the
            `amount` of the results (cents).
          schema:
            type: number
            minimum: 0
          example: 20000
        - name: maxAmount
          in: query
          required: false
          description: >-
            Only results costing at most this amount, in the same unit as the
            `amount` of the results (cents).
          schema:
            type: number
            minimum: 0
          example: 100000
        - name: starRating
          in: query
          required: false
          description: |-
            Only hotels with these star ratings, from `1` to `5`.

            ---

            Example (comma-separated list): `?starRating=4,5`
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
        - name: hotelIds
          in: query
          required: false
          description: >-
            Only these hotels, by ID (`hotelId` in the results). A hotel that
            appears more than once in the search keeps all of its items.


            ---


            Example (comma-separated list):
            `?hotelIds=htl_Pd4Mx9TgUa6Rj1WnKc3Sv,htl_Ek8Bn2VqLt5Hy7DwXu1Zo`
          schema:
            type: array
            items:
              type: string
              pattern: ^htl_[0-9A-Za-z]{21}$
          style: form
          explode: false
        - name: latitude
          in: query
          required: false
          description: >-
            Latitude of the center of a circle to search in, in decimal degrees
            (-90 to 90). Send it together with `longitude` and `radius`.
          schema:
            type: number
          example: -23.5721
        - name: longitude
          in: query
          required: false
          description: >-
            Longitude of the center of a circle to search in, in decimal degrees
            (-180 to 180). Send it together with `latitude` and `radius`.
          schema:
            type: number
          example: -46.6684
        - name: radius
          in: query
          required: false
          description: >-
            Radius of the circle around `latitude` and `longitude`, in meters (1
            to 100000). Hotels whose position is unknown are never inside it.
            Send it together with `latitude` and `longitude`.
          schema:
            type: integer
            minimum: 1
            maximum: 100000
          example: 5000
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID of the search.
                    example: srch_V1StGXR8Z5jdHi6BmyT2k
                  status:
                    type: string
                    enum:
                      - PROCESSING
                      - FAILED
                      - COMPLETED
                    description: >-
                      `PROCESSING` while the suppliers answer, then `COMPLETED`
                      or `FAILED`. Only `COMPLETED` carries `items`.
                    example: COMPLETED
                  warning:
                    description: >-
                      How the search went across the suppliers. `null` while it
                      is processing.
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - ALL_FAILED
                          - PARTIAL_SUCCESS
                          - ALL_SUCCESS
                        description: >-
                          `ALL_SUCCESS`: every supplier answered.
                          `PARTIAL_SUCCESS`: some suppliers failed, so the
                          results may be incomplete. `ALL_FAILED`: no supplier
                          answered.
                        example: ALL_SUCCESS
                      message:
                        type: string
                        description: Human-readable explanation.
                        example: All suppliers answered.
                    required:
                      - code
                      - message
                    nullable: true
                  createdAt:
                    type: string
                    description: When the search was created.
                    example: '2026-10-19T15:00:00.000Z'
                    format: date-time
                  next:
                    type: string
                    nullable: true
                    description: >-
                      Cursor for the next page. `null` on the last page. Present
                      only once the search is `COMPLETED`.
                    example: eyJwIjoyfQ==
                  totalCount:
                    type: number
                    description: >-
                      Number of results that match the filters, across every
                      page. Present only once the search is `COMPLETED`.
                    example: 1
                  searchParams:
                    type: object
                    properties:
                      checkInDate:
                        type: string
                        description: Check-in date, as sent.
                        example: '2026-11-02'
                      checkOutDate:
                        type: string
                        description: Check-out date, as sent.
                        example: '2026-11-05'
                      destinationId:
                        type: string
                        description: Destination, as sent.
                        example: sao-paulo-sp
                      rooms:
                        type: array
                        items:
                          type: object
                          properties:
                            adults:
                              type: number
                              description: Number of adults staying in the room.
                              example: 2
                            children:
                              type: number
                              description: >-
                                Number of children staying in the room. Omitted
                                when there are none.
                              example: 1
                          required:
                            - adults
                          description: The occupancy of one room of a hotel search.
                        description: Rooms, as sent.
                    required:
                      - checkInDate
                      - checkOutDate
                      - destinationId
                      - rooms
                    description: What the search was made for, as sent.
                  type:
                    type: string
                    enum:
                      - HOTEL
                    description: Always `HOTEL`.
                    example: HOTEL
                  ttl:
                    type: number
                    description: >-
                      Seconds until the search expires (a hotel search lasts 30
                      minutes).
                    example: 1500
                  facets:
                    description: >-
                      Facets to build filters from (star ratings, price ranges).
                      `null` until the search completes.
                    type: object
                    additionalProperties: {}
                    nullable: true
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: >-
                            ID of the item. Send it as `searchItemId` when you
                            create a trip, and use it to load the item.
                          example: srch_item_Zt5Hk2NwQe8Lr3VcXb1Ya
                        searchId:
                          type: string
                          description: ID of the search the item belongs to.
                          example: srch_Qm8Zt3LwXc1Ry7NvB0kHd
                        hotel:
                          type: object
                          properties:
                            id:
                              type: string
                              description: >-
                                ID of the hotel; the same property keeps it
                                across searches.
                              example: htl_Pd4Mx9TgUa6Rj1WnKc3Sv
                            name:
                              type: string
                              description: Name of the hotel.
                              example: Hotel Paulista Plaza
                            shortAddress:
                              type: string
                              nullable: true
                              description: >-
                                The address in a single line. `null` when
                                unknown.
                              example: Av. Paulista, 1000, Bela Vista, São Paulo, SP
                            starRating:
                              type: string
                              enum:
                                - '0'
                                - '1'
                                - '2'
                                - '3'
                                - '4'
                                - '5'
                              description: Star rating, `0` to `5`.
                              example: '4'
                            mainImageUrl:
                              type: string
                              description: URL of the main image.
                              example: >-
                                https://example.com/hotels/paulista-plaza/main.jpg
                            chain:
                              type: object
                              properties:
                                brandName:
                                  type: string
                                  nullable: true
                                  description: Brand within the chain. `null` when unknown.
                                  example: Aurora Express
                                chainName:
                                  type: string
                                  nullable: true
                                  description: Chain. `null` for an independent hotel.
                                  example: Grupo Aurora
                                logo:
                                  type: string
                                  nullable: true
                                  description: >-
                                    URL of the chain's logo. `null` when there
                                    is none.
                                  example: https://example.com/logos/aurora.svg
                              required:
                                - brandName
                                - chainName
                                - logo
                              description: Chain and brand of the hotel.
                            amenities:
                              type: array
                              items:
                                type: string
                                example: WIRELESS_INTERNET_CONNECTION_IN_PUBLIC_AREAS
                              description: >-
                                Amenities the hotel advertises, as codes.


                                ---


                                Example:
                                `["WIRELESS_INTERNET_CONNECTION_IN_PUBLIC_AREAS","RESTAURANT"]`
                          required:
                            - id
                            - name
                            - shortAddress
                            - starRating
                            - mainImageUrl
                            - chain
                            - amenities
                          description: The hotel.
                        checkIn:
                          type: string
                          description: Check-in date (`YYYY-MM-DD`).
                          example: '2026-11-02'
                        checkOut:
                          type: string
                          description: Check-out date (`YYYY-MM-DD`).
                          example: '2026-11-05'
                        cheapestFare:
                          type: object
                          properties:
                            fare:
                              type: object
                              properties:
                                originalAmount:
                                  type: number
                                  description: Price before discounts and fees, in cents.
                                  example: 135000
                                discountAmount:
                                  type: number
                                  description: >-
                                    Discount applied to the original amount, in
                                    cents.
                                  example: 15000
                                feeAmount:
                                  type: number
                                  description: Fees added to the rate, in cents.
                                  example: 5000
                                amount:
                                  type: number
                                  description: >-
                                    Total rate charged: `originalAmount -
                                    discountAmount + feeAmount`, in cents
                                    (`125000` is R$ 1.250,00).
                                  example: 125000
                                currency:
                                  type: string
                                  description: Currency of the amounts (ISO 4217).
                                  example: BRL
                                boardType:
                                  type: string
                                  enum:
                                    - ONLY_ROOM
                                    - BREAKFAST
                                    - HALF_BOARD
                                    - FULL_BOARD
                                    - ALL_INCLUSIVE
                                  description: >-
                                    Meal plan: `ONLY_ROOM`, `BREAKFAST`,
                                    `HALF_BOARD`, `FULL_BOARD` or
                                    `ALL_INCLUSIVE`.
                                  example: BREAKFAST
                                cancellationPolicies:
                                  type: object
                                  properties:
                                    refundable:
                                      type: boolean
                                      description: >-
                                        Whether the fare allows any refund at
                                        all.
                                      example: true
                                    immediateFine:
                                      type: boolean
                                      description: >-
                                        Whether a fine is charged for cancelling
                                        right after booking.
                                      example: false
                                    penalties:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          from:
                                            type: string
                                            description: >-
                                              Date (`YYYY-MM-DD`) from which this tier
                                              applies.
                                            example: '2026-10-30'
                                          currency:
                                            type: string
                                            description: Currency of the penalty (ISO 4217).
                                            example: BRL
                                          fineAmount:
                                            type: number
                                            description: >-
                                              Penalty charged when cancelling or
                                              changing from `from` onward, in cents.
                                            example: 15000
                                        required:
                                          - from
                                          - currency
                                          - fineAmount
                                        description: >-
                                          One tier of a cancellation or change
                                          penalty schedule.
                                      description: >-
                                        Penalty schedule, in effect from each
                                        tier's date. Empty or omitted when no
                                        scheduled penalty applies.
                                  required:
                                    - refundable
                                    - immediateFine
                                  description: >-
                                    Cancellation rules of the rate. Only in the
                                    item detail, not in the search results.
                              required:
                                - originalAmount
                                - discountAmount
                                - feeAmount
                                - amount
                                - currency
                                - boardType
                              description: The rate of the cheapest room.
                          required:
                            - fare
                          description: The lowest rate available at this hotel.
                      required:
                        - id
                        - searchId
                        - hotel
                        - checkIn
                        - checkOut
                        - cheapestFare
                      description: >-
                        A hotel in the search results, with the cheapest room
                        found. Load the item for every room.
                    description: >-
                      The hotels of this page, filtered and sorted by the query
                      parameters. Present only once the search is `COMPLETED`.
                required:
                  - createdAt
                  - facets
                  - id
                  - searchParams
                  - status
                  - ttl
                  - type
                  - warning
                description: >-
                  A hotel search with, once it is `COMPLETED`, one page of its
                  hotels.
        '404':
          description: >-
            `SEARCH_NOT_FOUND` — The search doesn't exist, has expired, was
            created by another organization or is not a hotel search.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - SEARCH_NOT_FOUND
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - TRAVEL
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: SEARCH_NOT_FOUND
                origin: TRAVEL
                message: Search not found
        '422':
          description: >-
            `BAD_REQUEST` — A path parameter is not a valid ID or a query
            parameter is invalid; `fields` lists each one.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - TRAVEL
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                  fields:
                    type: array
                    description: >-
                      One entry per invalid request field (validation errors
                      only).
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            Path of the invalid field, e.g. `label` or
                            `values[0].value`.
                          example: label
                        message:
                          type: string
                          description: Why the field was rejected.
                          example: label is required
                        code:
                          type: string
                          description: >-
                            `<FIELD>_<REASON>` — e.g. `LABEL_REQUIRED`,
                            `TYPE_ONE_OF`, `VALUES_VALUE_TYPE_ERROR`.
                          example: LABEL_REQUIRED
                        values:
                          type: array
                          items:
                            type: string
                          description: >-
                            The accepted values, when the field is an
                            enumeration.
                      required:
                        - field
                        - message
                        - code
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BAD_REQUEST
                origin: TRAVEL
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: order
                    message: 'Invalid option: expected one of "ASC"|"DESC"'
                    code: ORDER_ONE_OF
        '503':
          description: >-
            `PROVIDER_UNAVAILABLE` — The travel provider could not be reached.
            Retry later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - PROVIDER_UNAVAILABLE
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - TRAVEL
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: PROVIDER_UNAVAILABLE
                origin: TRAVEL
                message: Travel provider temporarily unavailable, please retry.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.