Skip to main content
GET
Get a bus search and its results
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 bus search expires after its ttl (15 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, type, serviceClass, company, departureOriginName, departureDestinationName, departureTimePeriod, returnOriginName, returnDestinationName, returnTimePeriod and routeDirection, 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 (?serviceClass=EXECUTIVE&serviceClass=SEMI_BED or ?serviceClass=EXECUTIVE,SEMI_BED). 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 bus search item endpoint for everything a trip needs, and create the trip with the item’s id as searchItemId. 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.

Path Parameters

realmId
string<uuid>
required

ID of your realm.

Format: UUID

organizationId
string<uuid>
required

ID of your organization.

Format: UUID

searchId
string
required

ID of the bus search, as returned when it was created.

Pattern: ^srch_[0-9A-Za-z]{21}$

Query Parameters

order
enum<string>

Sort direction applied to orderBy: ASC lists the cheapest results first, DESC the most expensive first.

Available options:
ASC,
DESC
orderBy
string

Field to sort the results by. Currently only amount is supported.

Minimum string length: 1
next
string

Cursor returned as next by the previous page. Omit for the first page.

Minimum string length: 1
limit
integer

Maximum number of items per page, from 1 to 100.

Required range: 1 <= x <= 100
minAmount
number

Only results costing at least this amount, in the same unit as the amount of the results (cents).

Required range: x >= 0
maxAmount
number

Only results costing at most this amount, in the same unit as the amount of the results (cents).

Required range: x >= 0
type
string[]

Only trips of these types: DIRECT, CONNECTION or ONE_STOP.


Example (comma-separated list): ?type=DIRECT,ONE_STOP

serviceClass
string[]

Only these service classes: SLEEPER_BED, BED, SEMI_BED, EXECUTIVE, CONVENTIONAL or UNDEFINED.


Example (comma-separated list): ?serviceClass=EXECUTIVE,SEMI_BED

company
string[]

Only trips run by these bus companies, by name.


Example (comma-separated list): ?company=Viação Aurora,Expresso Litoral

departureOriginName
string[]

Only outbound trips leaving from these stations, by name.


Example (comma-separated list): ?departureOriginName=Terminal Rodoviário Tietê,Terminal Barra Funda

departureDestinationName
string[]

Only outbound trips arriving at these stations, by name.


Example (comma-separated list): ?departureDestinationName=Rodoviária Novo Rio,Terminal Américo Fontenelle

departureTimePeriod
string[]

Only outbound trips leaving in these periods of the day: DAWN, MORNING, AFTERNOON or NIGHT.


Example (comma-separated list): ?departureTimePeriod=MORNING,AFTERNOON

returnOriginName
string[]

Only return trips leaving from these stations, by name.


Example (comma-separated list): ?returnOriginName=Rodoviária Novo Rio,Terminal Américo Fontenelle

returnDestinationName
string[]

Only return trips arriving at these stations, by name.


Example (comma-separated list): ?returnDestinationName=Terminal Rodoviário Tietê,Terminal Barra Funda

returnTimePeriod
string[]

Only return trips leaving in these periods of the day: DAWN, MORNING, AFTERNOON or NIGHT.


Example (comma-separated list): ?returnTimePeriod=NIGHT,DAWN

routeDirection
string

Only trips in one direction: DEPARTURE (outbound) or RETURN. Omit it to get both.

Minimum string length: 1

Response

Successful response

A bus search with, once it is COMPLETED, one page of its trips.

id
string
required

ID of the search.

Example:

"srch_V1StGXR8Z5jdHi6BmyT2k"

status
enum<string>
required

PROCESSING while the suppliers answer, then COMPLETED or FAILED. Only COMPLETED carries items.

Available options:
PROCESSING,
FAILED,
COMPLETED
Example:

"COMPLETED"

warning
object | null
required

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

createdAt
string<date-time>
required

When the search was created.

Example:

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

searchParams
object
required

What the search was made for, as sent.

type
enum<string>
required

Always BUS.

Available options:
BUS
Example:

"BUS"

ttl
number
required

Seconds until the search expires (a bus search lasts 15 minutes).

Example:

640

facets
object | null
required

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

next
string | null

Cursor for the next page. null on the last page. Present only once the search is COMPLETED.

Example:

"eyJwIjoyfQ=="

totalCount
number

Number of results that match the filters, across every page. Present only once the search is COMPLETED.

Example:

1

items
object[]

The bus trips of this page, filtered and sorted by the query parameters. Present only once the search is COMPLETED.