Discover/railyatri.in API
live

railyatri.in APIrailyatri.in

Access live train status, PNR checks, seat availability, timetables, and trains between stations from RailYatri via a single REST API.

Endpoints
7
Updated
10d ago
Try it
Partial train number or name to search for
api.parse.bot/scraper/3dba3431-db8a-42f9-b36f-788630e9c873/<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/3dba3431-db8a-42f9-b36f-788630e9c873/search_train_autocomplete?query=rajdhani' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 7 totalclick to expand

Search for trains by number or name for autocomplete suggestions. Returns a list of matching trains with their numbers and names.

Input
ParamTypeDescription
queryrequiredstringPartial train number or name to search for
Response
{
  "type": "object",
  "fields": {
    "trains": "array of objects with train_number and train_name"
  },
  "sample": {
    "data": {
      "trains": [
        {
          "train_name": "HOWRAH - NEW DELHI Rajdhani Express",
          "train_number": "12301"
        },
        {
          "train_name": "NEW DELHI - HOWRAH Rajdhani Express",
          "train_number": "12302"
        }
      ]
    },
    "status": "success"
  }
}

About the railyatri.in API

The RailYatri API exposes 7 endpoints covering Indian Railways data including live train tracking, static timetables, PNR lookups, seat availability with fare breakdowns, and station-to-station train searches. The get_live_train_status endpoint returns real-time position, delay, and per-station arrival and departure data for any active train. Autocomplete endpoints for both trains and stations make it straightforward to resolve names to the codes and numbers required by other endpoints.

Core Endpoints and Data

The API centers on two real-time lookups and two static ones. get_live_train_status accepts a 5-digit train_number and returns a train_info object with current_station, delay, and is_run_day, plus an stations array of upcoming stops with per-station arrival/departure times and delay figures, and a full_route covering every stop on the route. get_train_timetable returns the static schedule for the same train: each station in the stations array carries arrival, departure, halt, day, distance, and platform, along with top-level days_of_run indicating which days the service operates.

Availability and PNR

get_seat_availability takes a train_number, from_code, to_code, and optionally date, quota (e.g. GN, TQ), and class_type (1A, 2A, 3A, SL, CC, 2S). It returns an availability array with one object per upcoming date, each containing availablity_status, ticket_fare, total_fare, and seat_avl_text for the chosen class and quota. A last_updated timestamp indicates data freshness. get_pnr_status accepts a 10-digit pnr_number and returns a status boolean indicating whether PNR data was located.

Search and Autocomplete

search_trains_between_stations takes from_code, to_code, and a date in YYYY-MM-DD format and returns a trains array with per-train departure, arrival, duration, run_days, train_type, and total_trains count. The two autocomplete endpoints — search_train_autocomplete and search_station_autocomplete — accept partial names or codes. The station endpoint is especially useful because it returns lat, lng, and city alongside station_code, which other endpoints require as input.

Common use cases
  • Display live delay and current position for a train on a journey-tracking dashboard using get_live_train_status.
  • Show seat availability and fares across Tatkal and General quota for a specific train and class before booking.
  • Build a train-search interface for a given origin-destination pair and travel date using search_trains_between_stations.
  • Provide a PNR status checker widget that confirms whether a booking record exists.
  • Render a full station-by-station timetable including platform numbers and halt durations for a selected train.
  • Power autocomplete inputs for both station and train name fields using station codes and coordinates from the search endpoints.
  • Alert travelers when a train's delay value from get_live_train_status exceeds a defined threshold.
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 RailYatri have an official public developer API?+
RailYatri does not publish a documented public developer API or offer API keys to third-party developers. The Parse API is the structured way to access this data programmatically.
What does get_pnr_status actually return beyond a boolean?+
Currently it returns a status boolean indicating whether PNR data was found — passenger names, coach/berth assignments, and booking-class details are not included in the response. You can fork this API on Parse and revise it to add those fields if they become available.
Does the live train status endpoint work when a train is not running on a given day?+
The train_info object includes an is_run_day field that indicates whether the train is scheduled to operate on the current date. When the train is not actively running, real-time position and delay data will not be populated, but static route data in full_route is still returned.
Can I retrieve historical train running data or delays over past dates?+
The API does not expose historical running records or delay archives. get_live_train_status reflects current-day status and get_train_timetable returns static scheduled times. You can fork the API on Parse and revise it to add an endpoint if RailYatri exposes historical data on the source site.
How do I get the station codes required by get_seat_availability and search_trains_between_stations?+
search_station_autocomplete accepts a partial station name or code in the query parameter and returns matching stations with their station_code values. Pass those codes as from_code and to_code in the availability and train-search endpoints.
Page content last updated . Spec covers 7 endpoints from railyatri.in.
Related APIs in TravelSee all →
opentable.ca API
Search and discover restaurants on OpenTable, view detailed information like menus and reviews, and check real-time dining availability across metro areas. Find top-rated restaurants in your location and instantly see which tables are open for your preferred date and time.
fandango.com API
Search for movies and retrieve nearby theater listings with showtimes by ZIP code and date, plus showtimes for a specific movie at nearby theaters.
data.lime.bike API
Access real-time availability data for Lime bikes and scooters, including station locations, vehicle status, system alerts, and geofencing zones across multiple cities. Monitor micromobility inventory and service information to find nearby vehicles or plan your trips effectively.
turo.com API
Search for peer-to-peer car rentals across Turo by location and dates to browse available vehicles with pricing, specifications, and real-time availability. Get detailed information on specific cars to compare features and make rental decisions.
reservation.pc.gc.ca API
Access real-time campground availability and reservation data from the Parks Canada booking system. Search locations, retrieve available campsites and cabins, filter by equipment type, and review operating date schedules across the national park network. Includes detailed resource metadata and map-based availability overviews.
bahn.com API
Search German train schedules and stations, find connections between destinations, and compare ticket prices across Deutsche Bahn routes. Get real-time station information and transit association details to plan your train journey efficiently.
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.
thetrainline.com API
Search UK train stations and find the cheapest fares across date ranges, then generate direct booking links to complete your purchase on Trainline.com. Get real-time journey information to compare prices and book your tickets in seconds.