Skip to main content
POST
Create an air search
Searches are asynchronous: this answers 202 at once with the search in PROCESSING status while the travel suppliers answer in the background. Poll the search with its id until status is COMPLETED — or FAILED — to read the results. A flight search lasts 15 minutes (see ttl); after that, create it again. Creating the same search again while it lasts returns the same id, and only your organization can read the searches it created. Find origin and destination with the locations endpoint. To book a result, open the item for its fares, then create a trip with the item’s id as searchItemId and the chosen fare’s id as fareId. An error the travel provider reports about the request — an unknown airport, say — is returned with its own status, code and message.

Path Parameters

realmId
string<uuid>
required

ID of your realm.

Format: UUID

organizationId
string<uuid>
required

ID of your organization.

Format: UUID

Body

application/json
departureDate
string
required

Outbound flight date (YYYY-MM-DD). Today or later.

Minimum string length: 1
Example:

"2026-11-02"

origin
string
required

Origin airport: its 3-letter IATA code or its id from the locations endpoint. Must differ from destination.

Minimum string length: 1
Example:

"GRU"

destination
string
required

Destination airport: its 3-letter IATA code or its id from the locations endpoint. Must differ from origin.

Minimum string length: 1
Example:

"GIG"

passengers
enum<string>[]
required

Who is traveling, one entry per traveler, at least one: ADULT, CHILD, INFANT or SENIOR.


Example: ["ADULT"]

Minimum array length: 1
Available options:
ADULT,
CHILD,
INFANT,
SENIOR
returnDate
string

Return flight date (YYYY-MM-DD), on or after departureDate. Omit it for a one-way trip.

Minimum string length: 1
Example:

"2026-11-05"

cabin
string

Cabin to search: ECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST_CLASS or UNDEFINED. Defaults to ECONOMY.

Minimum string length: 1
Example:

"ECONOMY"

Response

Successful response

A search just created for flights. Results come later: poll the search.

id
string
required

ID of the search. The same search parameters, within the time the search lasts, return the same ID.

Example:

"srch_V1StGXR8Z5jdHi6BmyT2k"

searchParams
object
required

What the search was made for.

type
enum<string>
required

Always AIR.

Available options:
AIR
Example:

"AIR"

status
enum<string>
required

PROCESSING right after creation. It becomes COMPLETED or FAILED on its own: poll the search.

Available options:
PROCESSING,
FAILED,
COMPLETED
Example:

"PROCESSING"

warning
object | null
required

How the search went across the suppliers. null while it is processing.

ttl
number
required

Seconds until the search expires.

Example:

900

facets
object | null
required

Facets to build filters from (price ranges, airlines). null until the search completes.

createdAt
string<date-time>
required

When the search was created.

Example:

"2026-10-19T15:00:00.000Z"