margdarshi.upsrtcvlt.com APImargdarshi.upsrtcvlt.com ↗
Access UPSRTC bus routes, timetables, real-time arrivals, stop data, and bus-between-stops search via the Margdarshi passenger information system API.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/5c402f3d-5581-4190-93ad-2ec6c19c90c2/get_routes' \ -H 'X-API-Key: $PARSE_API_KEY'
Get all bus routes/lines operated by UPSRTC. Returns the complete catalog of routes with IDs, line names, descriptions, and directional information.
No input parameters required.
{
"type": "object",
"fields": {
"total": "integer - total number of routes",
"routes": "array of route objects with id, line_name, marketing_name, description, outbound_description, inbound_description, direction, line_colour"
},
"sample": {
"data": {
"total": 8803,
"routes": [
{
"id": 1,
"direction": null,
"line_name": "1",
"description": "DHAMPUR-NOORPUR",
"line_colour": "rgb(0, 0, 0)",
"marketing_name": "1",
"inbound_description": "",
"outbound_description": "DHAMPUR TO NOORPUR"
}
]
},
"status": "success"
}
}About the margdarshi.upsrtcvlt.com API
This API provides structured access to UPSRTC (Uttar Pradesh State Road Transport Corporation) bus data across 7 endpoints, covering the full network of routes, stops, timetables, and live arrival status. The get_buses_between_stops endpoint lets you query direct bus services between any two locations by origin and destination IDs, while get_realtime_arrivals returns running and cancelled trip data with deviation status for a given stop or route.
Route and Stop Discovery
The get_routes endpoint returns the complete UPSRTC route catalog, including each route's id, line_name, marketing_name, and directional descriptions (outbound_description, inbound_description). These route IDs feed directly into get_route_timetable, which returns all trips on that route with fields like vehicle_journey_id, trip_code, service_type_name, garage_name, and total_stop. The get_stops endpoint exposes the full stop network with geographic fields (easting, northing), stop_area_type, and administrative_area_code.
Searching and Filtering Services
Use search_stops with a text query (e.g., 'lucknow' or 'agra') to retrieve matching stop groups and stop areas, each with a classification of either GROUP or STOP_AREA. Pass those IDs and classifications directly to get_buses_between_stops as origin_id, destination_id, origin_classification, and destination_classification. That endpoint also accepts an optional date parameter (YYYY-MM-DD) and a service_type filter covering types like SHATABDI, VOLVO, AC SLEEPER, ORDINARY, and several others. Results include depot_name, route_origin, route_destination, and trip identifiers.
Bus Types and Real-Time Data
The get_bus_types endpoint lists all UPSRTC service classes — including JANRATH 2X3, JANRATH 2X2, PINK EXPRESS, RAJDHANI, and ENFORCEMENT — with speed_limit, primary_color, secondary_color, and Hindi translations for each. For live operations, get_realtime_arrivals accepts either a stop_code (from get_stops) or a route_id (from get_routes) and returns running_trips and cancelled_trips arrays alongside a deviation_status object that maps each bus registration_number to a flag indicating normal or deviated operation.
- Build a journey planner that queries
get_buses_between_stopsto show available direct UPSRTC services between two cities on a given date. - Display live bus arrival boards for a specific stop using
get_realtime_arrivalswith astop_code. - Generate full route timetables for a travel app by combining
get_routesandget_route_timetable. - Power an autocomplete stop-search field using
search_stopsto resolve user-typed city names to stop IDs. - Filter available buses by service class (e.g., VOLVO or AC SLEEPER) using the
service_typeparameter inget_buses_between_stops. - Map the UPSRTC stop network geographically using the
eastingandnorthingfields fromget_stops. - Track deviation and cancellation rates per route by aggregating
deviation_statusandtotal_cancelledfromget_realtime_arrivals.
| 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 UPSRTC or Margdarshi have an official public developer API?+
What does `get_realtime_arrivals` return, and how do I distinguish running from cancelled trips?+
running_trips and cancelled_trips arrays with counts total_running and total_cancelled. Each running trip includes a registration_number, route_description, and timing data. The deviation_status object maps each registration_number to 0 (on normal path) or 1 (deviated route). You can supply either a stop_code or a route_id — at least one is required.Does `get_buses_between_stops` return stop-by-stop intermediate timings for a trip?+
get_buses_between_stops returns trip-level fields like depot_name, service_type_name, route_origin, and route_destination, but not intermediate stop sequences or per-stop arrival times. Stop-by-stop timing data is available through get_route_timetable using the route's ID. You can fork this API on Parse and revise it to add an endpoint that joins trip results with full timetable detail.Is fare or ticket pricing data available through this API?+
What happens when I query `get_route_timetable` for a route with no trips?+
message field explaining that no trips exist for the route, along with the route_id that was queried and total_trips set to zero. The trips array will be empty. This can occur for routes that are defined in the system but have no currently scheduled services.