Skip to main content
POST
Search hotels from one sentence, with follow-ups
Send the traveller’s request in one sentence. The answer comes within about 20 seconds with 200: the hotels, or a question to answer in the same conversation. When the search takes longer, the answer is 202 with the early reply and a Location to read until the task ends. Continue the conversation with its context_id.
New to hotel AI search? The Hotel AI search guide walks through the whole flow: the first call, the questions it asks, follow-ups, 202 and streaming, and booking a result.

Authorizations

X-API-Key
string
header
required

Headers

Idempotency-Key
string

Makes a retried message safe: a retry with the same key answers the first message again instead of sending a second one. Keys are scoped to the caller, not to the conversation, and the retried body is not compared: a different message needs a new key. 1–200 characters.

Required string length: 1 - 200
Prefer
string

wait=N (RFC 7240): answer after at most N seconds, never more than 20, with 202 and the early reply if the task has not ended by then. wait=0 answers at once. Without it the wait is 20 seconds. The wait applied is returned in Preference-Applied.

Maximum string length: 200
Example:

"wait=0"

Body

application/json
text
string
required

The traveller's request in one sentence, or the answer to the question asked in the previous turn.

Required string length: 1 - 2000
Example:

"A hotel in Paris next weekend for 2 adults with breakfast included"

timezone
string
required

The traveller's IANA time zone. Relative dates such as "next weekend" or "tonight" are computed in it.

Example:

"Europe/Paris"

context_id
string

The conversation to continue, from an earlier answer. Omit to start a new conversation.

Required string length: 1 - 100
Example:

"ctx_example"

task_id
string

The task of that conversation the message answers. Optional: without it, a message continues the task waiting for an answer, or starts a new one.

Required string length: 1 - 100
Example:

"atk_example"

currency
string

Currency of the prices (ISO 4217).

Pattern: ^[A-Za-z]{3}$
Example:

"EUR"

guest_nationality
string

Nationality of the guests (ISO 3166-1 alpha-2).

Pattern: ^[A-Za-z]{2}$
Example:

"FR"

effort
enum<string>

How much the search may do before it answers. low answers soonest; high checks the most and searches the most options. Defaults to medium.

Available options:
low,
medium,
high
Example:

"medium"

Response

The task ended this turn; or, with Accept: text/event-stream, the turn as it happens.

context_id
string | null
required

The conversation; send it with the next message to continue.

Example:

"ctx_example"

task_id
string
required
Example:

"atk_example"

status
enum<string>
required

working: the search is still running, read the task again. input_required: the message asks a question; answer it in the same conversation. completed: the hotels are in the answer. failed: see error. canceled: a later message or a cancel replaced it.

Available options:
working,
input_required,
completed,
failed,
canceled
message
string

The reply to show the traveller.

Example:

"Found 37 hotels in Paris for Oct 24–25 (1 night, 2 adults, 1 room)."

question
string

What the reply asks for, when status is input_required.

Example:

"dates"

criteria
object

The search the request was understood as, in the hotel_search request fields, plus board_types and refundable_only for the rate filters applied to the results.

notes
object[]

Assumptions and adjustments made while understanding the request.

hotels
object[]
has_more
boolean

More hotels are available; ask for more in the same conversation.

reference
boolean

The hotels are a 1-night reference search shown while the check-out date is asked.

error
object

Why the task failed, when status is failed.

superseded_by
string

The task that replaced this one, when status is canceled.

charge
object

What a turn was charged to the organization's balance, once the turn has ended (completed, input_required, failed or canceled); every amount is 0 when the turn cost nothing. Absent while the task is working. Carried on JSON answers only: an event stream does not carry it, so read it with GET /v1/hotel_ai_search/tasks/{task_id}.