POST /api/redbus/trips/search
Price: 20 credits
Search redBus bus trips between two cities on a date, private operators and state transport (RTC) buses alike: operator, bus type, departure and arrival times, boarding and dropping points, fares by seat type, seat availability, rating, cancellation rules and offers, with AC, seat type, time window, operator, boarding point, highlight and feature filters
Get city ids from redbus/cities/search. Pass a trip's id, operator_id and journey_date with the two city ids to redbus/trips/seats for the seat map, or id and operator_id to redbus/trips/reviews.
access-token string requiredtimeout integer — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)from_city_id integer required — Departure city id (examples: 122; min: 1)to_city_id integer required — Arrival city id (examples: 123; min: 1)date integer required — Travel date, unix seconds (examples: 1792434600; min: 0)ac array — Air-conditioning classes to keep (default: []; one of: "ac", "non_ac")seat_types array — Seat kinds to keep (default: []; one of: "seater", "sleeper", "single_seat")departure_windows array — Departure hour windows to keep (default: []; one of: "00-06", "06-12", "12-18", "18-24")arrival_windows array — Arrival hour windows to keep (default: []; one of: "00-06", "06-12", "12-18", "18-24")operator_ids array — Bus operator ids to keep (default: []; examples: [35668,33000])boarding_point_ids array — Boarding point ids to keep (default: []; examples: [66008])dropping_point_ids array — Dropping point ids to keep (default: []; examples: [66065])only array — Trip highlights to keep (default: []; one of: "high_rated", "deals", "primo", "free_cancellation")features array — Bus features to keep (default: []; one of: "on_time", "toilet", "free_date_change", "lounge", "business_class", "highly_rated_by_women")sort string — Result order (default: "relevance"; one of: "relevance", "price_low", "price_high", "departure_earliest", "departure_latest", "rating_high")count integer required — Max number of results (min: 1)@type string (default: "RedbusTrip")id integer requiredoperator_id integer nullableoperator_name string nullableoperator_logo_url string nullableservice_id string nullableservice_name string nullablebus_type string nullablebus_type_id integer nullablesub_bus_type_id integer nullablejourney_date integer nullabledeparture_at integer nullablearrival_at integer nullablefirst_boarding_at integer nullableduration_minutes integer nullableboarding_point_name string nullableboarding_point_id integer nullabledropping_point_name string nullabledropping_point_id integer nullableboarding_point_count integer nullabledropping_point_count integer nullableboarding_stop_id integer nullableboarding_stop_name string nullabledropping_stop_id integer nullabledropping_stop_name string nullablevia string nullableis_direct boolean (default: false)is_ac boolean (default: false)is_non_ac boolean (default: false)is_seater boolean (default: false)is_sleeper boolean (default: false)is_rtc boolean (default: false)is_premium boolean (default: false)is_electric boolean (default: false)is_new_operator boolean (default: false)is_sponsored boolean (default: false)has_rest_stop boolean (default: false)has_seat_layout boolean (default: false)mticket_enabled boolean (default: false)flexi_ticket boolean (default: false)rating number nullablereview_count integer nullablebus_score number nullablecurrency string nullablefares array (default: [])fares_by_seat_type array (default: [])@type string (default: "RedbusSeatTypeFare")seat_type string requiredprice number nullablediscounted_price number nullableseat_count integer nullabletotal_seats integer nullableavailable_seats integer nullableavailable_window_seats integer nullableavailable_aisle_seats integer nullableavailable_single_seats integer nullableavailable_upper_seats integer nullableavailable_lower_seats integer nullablemax_seats_per_booking integer nullablecancellation_policy array (default: [])@type string (default: "RedbusCancellationRule")from_hours integer nullableto_hours integer nullablecharge_percent number nullablepartial_cancellation_allowed boolean nullabledate_change_allowed boolean (default: false)date_change_hours integer nullabledate_change_fee string nullablefeatures array (default: [])offers array (default: [])@type string (default: "RedbusOffer")code string nullabledescription string nullablelabel string nullabledeal_type string nullablediscount_kind string nullablediscount number nullablediscount_amount number nullablefor_women boolean nullableterms array (default: [])rtc_group string nullablefrom_city_id integer nullableto_city_id integer nullable422 — The date is in the past Check the fields against this schema. A URN with the wrong prefix is the most common cause.408 — The request ran past its time limit Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.412 — The entity was not found, or a precondition failed Retrying will not help: either the entity does not exist, or the input points at a different one.429 — Too many requests: a rate limit or a usage window is exhausted When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.500 — Something broke on our side Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.529 — Rate limit reached, or the endpoint is overloaded Wait at least 30 seconds, then retry.X-Error — Error message text (present only on error)X-Request-ID — Unique request identifierX-Execution-Time — Execution time in secondsX-Result-Count — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.X-Total-Available-Results — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.X-Warning — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.X-Retry-After — Seconds to wait before retrying. Present only on 429.