Discover/Upsrtcvlt API
live

Upsrtcvlt 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.

Endpoint health
verified 3d ago
get_route_timetable
get_stops
search_stops
get_buses_between_stops
get_realtime_arrivals
7/7 passing latest checkself-healing
Endpoints
7
Updated
26d ago

What is the Upsrtcvlt 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.

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.
Call it over HTTPgrab 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'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace margdarshi-upsrtcvlt-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

from parse_apis.upsrtc_margdarshi_bus_information_api import Margdarshi, ServiceType

client = Margdarshi()

# Search for stops to find origin and destination IDs
for result in client.stops.search(query="lucknow"):
    print(result.name, result.id, result.classification)

# List available bus types
for bus_type in client.bustypes.list():
    print(bus_type.name, bus_type.short_name, bus_type.speed_limit)

# Find buses between two cities with a service type filter
for bus in client.busservices.between_stops(
    origin_id=8,
    destination_id=5,
    service_type=ServiceType.ORDINARY,
):
    print(bus.from_stop_name, bus.to_stop_name, bus.from_arrival_time, bus.depot_name)

# List all routes and inspect timetable for the first one
for route in client.routes.list(limit=3):
    print(route.id, route.description, route.line_name)
    for trip in route.timetable.list(limit=2):
        print(trip.trip_code, trip.service_type_name, trip.total_stops)
        for stop_time in trip.stop_times:
            print(stop_time.stop_area_name, stop_time.arrival_time, stop_time.departure_time)
All endpoints · 7 totalmissing one? ·

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

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 Upsrtcvlt API

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.

Reliability & maintenanceVerified

The Upsrtcvlt API is a managed, monitored endpoint for margdarshi.upsrtcvlt.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when margdarshi.upsrtcvlt.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official margdarshi.upsrtcvlt.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
3d ago
Latest check
7/7 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
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,000100 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 →
megabus.com API
Search for coach trips and compare fares across Megabus UK routes, view available stops and route information, and check real-time seat availability and fare calendars. Retrieve cheapest-price calendars and vacancy data across multiple departure dates and destinations.
redbus.in API
Search and explore bus and train services on redBus.in. Look up city and station suggestions, find available routes, check schedules, and view seat layouts and fare details.
reise.ruter.no API
Access real-time bus arrivals and departures for Oslo's public transit network (Ruter). Search for stops by name and retrieve live schedules with up-to-the-minute tracking across buses, trams, and metro lines.
railyatri.in API
Search trains between stations and get real-time information including live train status, timetables, seat availability, and PNR confirmation details. Find the perfect journey by autocompleting station and train names while checking current availability and train schedules.
gtt.to.it API
Access GTT (Turin) public transport data including available service basins, line routes and stop lists, full-day timetables by route and date, stop search, and real-time arrivals with accessibility details.
citymapper.com API
Get real-time transit information including live stop arrivals, service status, and line details across major cities worldwide. Search for nearby transit options and stay informed with service alerts to plan your commute efficiently.
enquiry.indianrail.gov.in API
Search for trains between Indian stations, check schedules, and look up station details to plan your rail journeys. Get real-time train information with support for captcha-protected searches to ensure reliable access to Indian Railways data.
mbta.com API
Track real-time subway, bus, and commuter rail departures across Greater Boston, check schedules and service alerts, and find detailed information about routes and stops. Plan your commute with up-to-the-minute MBTA transit data and never miss your connection.