redbus.in APIredbus.in ↗
Search buses and trains on redBus.in via API. Get seat layouts, schedules, boarding points, fares, and city/station suggestions across 7 endpoints.
curl -X GET 'https://api.parse.bot/scraper/35a9b6fe-4009-43dd-89e2-993f11b60ad0/get_city_suggestions?limit=10&query=Mumbai' \ -H 'X-API-Key: $PARSE_API_KEY'
Get city suggestions and IDs for bus search autocomplete. Returns matching cities with their IDs, location names, and boarding point lists.
| Param | Type | Description |
|---|---|---|
| limit | integer | Max results to return |
| queryrequired | string | Search query for city name (e.g. 'Mumbai', 'Pune') |
{
"type": "object",
"fields": {
"response": "object containing numFound (integer) and docs (array of city objects with ID, Name, locationName, region, BpList)"
},
"sample": {
"data": {
"response": {
"docs": [
{
"ID": 462,
"cc": "IND",
"Name": "Mumbai",
"BpList": [
{
"ID": 66571,
"Name": "Mumbai Central, Mumbai",
"locationName": "Mumbai Central"
}
],
"region": "Maharashtra and Goa",
"locationName": "Mumbai (All Locations)",
"locationType": "CITY"
}
],
"numFound": 7
},
"responseHeader": {
"status": 0
}
},
"status": "success"
}
}About the redbus.in API
The redBus.in API covers 7 endpoints for querying bus and train services listed on redBus.in, returning operator details, seat-level availability, boarding/dropping points, and complete train schedules. The search_buses endpoint returns paginated inventories with fare lists, available seat counts, departure and arrival times per operator. The get_bus_seat_layout endpoint maps each seat by X/Y coordinates along with per-seat fares and availability status.
Bus Search and Route Data
Use get_city_suggestions with a query string to retrieve matching city objects, each carrying an ID, locationName, region, and a BpList of boarding points. Pass the returned ID values as from_city_id and to_city_id in search_buses, along with a doj (date of journey in DD-Mon-YYYY format). The response includes a metaData object with totalCount for pagination and an inventories array containing travelsName, busType, fareList, availableSeats, departureTime, and arrivalTime per service. Use offset and limit parameters to page through results.
Bus Details and Seat Layouts
get_bus_details accepts a route_id from the search response and returns two separate arrays: BPLt (boarding points) and DPLt (dropping points), each with Id, Address, BpTm, and name. It also returns services objects that include operator info, amenities, and cancellation policy. For seat-level data, get_bus_seat_layout takes the same route_id plus an operator_id and returns a seatlist where each entry has Id, IsAvailable, fares, and X/Y grid coordinates — enough to reconstruct the physical seat map. Boarding and dropping point details with LatLong coordinates are also included in BPInformationList and DPInformationList.
Train Search and Schedules
get_train_suggestions searches by train name or number and returns trainNo, trainName, srcStationCode, and destStationCode. Feed station codes into search_trains using src, dst, and a doj in YYYYMMDD format. Results come back in trainBtwnStnsList with departureTime, arrivalTime, duration, distance, avlClasses, and tbsAvailability. For a full stop-by-stop itinerary, get_train_schedule accepts a train_no and returns a Schedule array where each stop includes StationName, StationCode, ArrivalTime, DepartureTime, Day, and DistanceFromOrigin.
- Build a bus fare comparison tool using
fareListandavailableSeatsfromsearch_buses - Render an interactive seat-selection map using X/Y coordinates from
get_bus_seat_layout - Show boarding and dropping point locations on a map using
LatLongfromBPInformationList - Display a complete train route with all stops and timings using
get_train_schedule - Autocomplete city or station inputs in a travel app using
get_city_suggestionsorget_train_suggestions - Monitor seat availability across multiple bus operators for a given route and date
- Build a train class availability checker using
avlClassesandtbsAvailabilityfromsearch_trains
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does redBus.in have an official public developer API?+
What does `get_bus_seat_layout` return beyond seat availability?+
seatlist array where each seat object includes Id, IsAvailable, per-seat fares, and X/Y grid coordinates. It also returns BPInformationList and DPInformationList with stop names, addresses, times, and LatLong values for boarding and dropping points.Does the API support booking or ticketing on redBus?+
How does pagination work in `search_buses`?+
limit and offset integer parameters. The metaData object in the response includes totalCount, which tells you how many total results exist for the route and date so you can calculate how many pages to fetch.Does the API return live PNR status or train running status?+
get_train_schedule. Live running status and PNR lookup are not included. You can fork the API on Parse and revise it to add those endpoints.