Skip to main content
POST
Create a bus 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 bus 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 from and to with the locations endpoint. To book a result, open the item for its segments and seat map, then create a trip with the item’s id as searchItemId, the segments’ id as segmentId and a bookable seat’s number as seatNumber. An error the travel provider reports about the request — an unknown station, 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
from
string
required

Origin bus station: its id or its slug from the locations endpoint. Must differ from to.

Minimum string length: 1
Example:

"terminal-rodoviario-tiete"

to
string
required

Destination bus station: its id or its slug from the locations endpoint. Must differ from from.

Minimum string length: 1
Example:

"rodoviaria-novo-rio"

departureDate
string
required

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

Minimum string length: 1
Example:

"2026-11-02"

returnDate
string

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

Minimum string length: 1
Example:

"2026-11-05"

serviceClass
string

Preferred service class: SLEEPER_BED, BED, SEMI_BED, EXECUTIVE, CONVENTIONAL or UNDEFINED. Omit it to search every class.

Minimum string length: 1
Example:

"EXECUTIVE"

Response

Successful response

A search just created for bus trips. 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_Fg4Ju9SaPe2Wx6TnCi5Oz"

searchParams
object
required

What the search was made for.

type
enum<string>
required

Always BUS.

Available options:
BUS
Example:

"BUS"

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 (companies, service classes, price ranges). null until the search completes.

createdAt
string<date-time>
required

When the search was created.

Example:

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