Discover/margdarshi.upsrtcvlt.com API
live

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.

Endpoints
7
Updated
14d ago
Try it

No input parameters required.

api.parse.bot/scraper/5c402f3d-5581-4190-93ad-2ec6c19c90c2/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Use it in your codegrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/5c402f3d-5581-4190-93ad-2ec6c19c90c2/get_routes' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 7 totalclick to expand

Get all bus routes/lines operated by UPSRTC. Returns the complete catalog of routes with IDs, line names, descriptions, and directional information.

Input

No input parameters required.

Response
{
  "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.

Common use cases
  • Build a journey planner that queries get_buses_between_stops to show available direct UPSRTC services between two cities on a given date.
  • Display live bus arrival boards for a specific stop using get_realtime_arrivals with a stop_code.
  • Generate full route timetables for a travel app by combining get_routes and get_route_timetable.
  • Power an autocomplete stop-search field using search_stops to resolve user-typed city names to stop IDs.
  • Filter available buses by service class (e.g., VOLVO or AC SLEEPER) using the service_type parameter in get_buses_between_stops.
  • Map the UPSRTC stop network geographically using the easting and northing fields from get_stops.
  • Track deviation and cancellation rates per route by aggregating deviation_status and total_cancelled from get_realtime_arrivals.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000250 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.

Frequently asked questions
Does UPSRTC or Margdarshi have an official public developer API?+
UPSRTC does not publish a documented public API for developers. Margdarshi (margdarshi.upsrtcvlt.com) is the official passenger information portal, but no SDK or API documentation is offered to third parties.
What does `get_realtime_arrivals` return, and how do I distinguish running from cancelled trips?+
The endpoint returns separate 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?+
No. 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?+
Not currently. The API covers routes, timetables, stop data, bus types, and real-time arrivals, but none of the endpoints expose fare amounts or pricing tables. You can fork this API on Parse and revise it to add a fare-lookup endpoint if that data becomes accessible from the Margdarshi system.
What happens when I query `get_route_timetable` for a route with no trips?+
The response includes a 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.
Page content last updated . Spec covers 7 endpoints from margdarshi.upsrtcvlt.com.
Related APIs in TravelSee all →
culturetrip.com API
Discover travel inspiration and plan your next adventure by browsing curated travel articles, destination guides, and bookable trips organized by region and city. Search for specific destinations, compare trip dates and prices, and explore popular cities to find the perfect getaway.
sevenrooms.com API
Search for available restaurant tables across any SevenRooms venue, view venue details and open dates, and complete reservations all in one place. Whether you're planning ahead or booking last-minute, you can check real-time availability and secure your table at thousands of restaurants on the SevenRooms platform.
delta.com API
Look up Delta Airlines flight schedules, check real-time flight status, and retrieve detailed trip information to plan your travel. Find your nearest airport and access the data you need to monitor flights and make booking decisions.
customs.gov.mv API
Check import/export duties, tariff classifications, and exchange rates for Maldives customs compliance, plus track vessel movements, company registrations, and declaration statuses. Get real-time data directly from the official customs portal to streamline your trade and logistics operations.
comedymothership.com API
Browse upcoming Comedy Mothership shows across different rooms, check real-time ticket availability, and get detailed information about Kill Tony events and seating options. Find venue details, FAQs, and track specific performances to plan your comedy night.
burningman.org API
Access comprehensive Burning Man information including Black Rock City event schedules, ticketing details, themed activities, playa events, volunteering opportunities, and mutant vehicle listings. Search global Burning Man events, stay updated with news and stories, and find preparation resources all in one place.
breckenridge.com API
Check real-time snow conditions, weather forecasts, lift operations, and trail status at Breckenridge Ski Resort to plan your day on the mountain. View live mountain cameras and get up-to-the-minute updates on slopes, lifts, and weather before you head out.
united.com API
Search United Airlines flights, check real-time flight status, and view detailed seat maps to plan your perfect trip. Compare fare options and use airport autocomplete to quickly find your departure and arrival cities.