Indian Railways API
for developers.
RailKit is an unofficial IRCTC API with live train tracking, PNR status, seat availability, fares, and station data. Start with the free Node.js SDK plan.
import { configure, checkPNRStatus, trackTrain }
from "railkit"
// one-time setup
configure(process.env.RAILKIT_API_KEY)
const pnr = await checkPNRStatus("1234567890")What it includes
19 methods.
Every use case.
Look up Indian Railways train schedules, find direct trains between stations, or build a live station board. Each endpoint links to its request and response examples.
checkPNRStatus()Get complete PNR status with passenger details, journey route, and confirmation updates.
getTrainInfo()Look up an Indian Railways train schedule by train number. Get the route, scheduled stops, arrival and departure times, running days, travel classes, and station codes.
trackTrain()Look up live train running status with a train number and journey date. The NTES response includes reported delays, stop times, route progress, distance, and coach details. Hindi station names and coach layout changes appear when available.
trackTrainV2()Track live movement using the WIMT-backed v2 endpoint, with expanded route points, current location, halt summaries, delay, speed, and coach-position data.
getTrainHistory()Look up a completed Indian Railways journey by five-digit train number and the date it departed its origin. RailKit returns scheduled and actual arrival and departure times, reported delays by stop, and final coach positions when available.
getTrainDelays()Check train punctuality by station. RailKit calculates average arrival and departure delays from completed journeys in the last three calendar months and excludes missing delay values.
getLiveTrainMap()Scale plan exclusive. Get current running-train positions for map clients, with location coordinates, snapshot time, and freshness flag.
liveAtStation()Build a live arrivals and departures board by station code. Choose a 2-, 4-, or 8-hour window for upcoming and passing trains, with reported delays and platform details when available.
searchTrainBetweenStations()Find direct Indian Railways trains between two station codes, with optional journey date filtering. Results include scheduled departures and arrivals, travel time, distance, and running days.
getAvailability()Check availability forecasts and detailed fare breakup by quota and class.
fareLookup()Look up an Indian Railways train fare by train number, station pair, date, class, and quota. The fare breakdown can include reservation and superfast charges, catering, GST, dynamic fare, and the total.
cancelList()Get today's IST snapshot of fully and partially cancelled trains plus diversions. Includes routes, affected segments, reasons, and scan coverage.
trainTimetableAtStation()Find scheduled trains at an Indian railway station by station code, with arrival and departure times, running days, and travel classes. Omit the date for the full timetable, or filter by yesterday, today, or tomorrow (IST).
stationByCode()Resolve a station code to its name and coordinates.
stationAmenities()Get station facilities in a readable structure, including platforms, passenger amenities, counts, and facility availability.
stationsByName()Find up to 10 matching stations by partial name.
stationRoutes()Find railway paths between two station codes from recorded train routes. Results list the stations along each path and rank paths by the number of trains that serve them, then distance.
trainByNumber()Find up to 10 stored trains matching a train-number prefix.
trainsByName()Find up to 10 trains matching a partial train name.
Implementation guides
Build with real railway data.
Follow request, response, error, and data freshness examples for common integrations.
PNR Status API Guide
Read booking and current status, passenger details, and chart status from a 10-digit PNR.
Read guideLive Train Tracking API Guide
Show reported delays, station times, and the last update for a train journey.
Read guideTrain Seat Availability API Guide
Check seat availability by class and quota, and display reported fare and waitlist details.
Read guideHow developers use it
Small surface.
Built for backends.
Works in API routes, background jobs, support tools, or mobile app backends. One key, one import, 19 methods.
- Predictable response shape
- Works with any server-side framework
- Usage plans and developer dashboard
- TypeScript types included
import { configure,
checkPNRStatus, trackTrain }
from "railkit"
// one-time setup
configure(process.env.RAILKIT_API_KEY)
export async function getJourney(pnr: string) {
const status = await
checkPNRStatus(pnr)
const live = await
trackTrain("12342", "06-12-2025")
return { status, live }
}Ready to build?
Add railway data to your app.
Create an account, get your key, and start calling railway endpoints from your own backend in minutes.
Get API keyView on GitHubQuestions, answered
Frequently asked
questions.
Everything developers ask before integrating railway data — PNR status, live tracking, seat availability and more.
How do I check PNR status with an API?
Create a RailKit API key, then use checkPNRStatus with the 10-digit PNR number. The response includes booking status, coach and berth details, boarding point, and chart status.
How do I track a train live and get its running status?
Send the five-digit train number and journey date to the live tracking endpoint. RailKit returns the train’s route, stop times, and running progress. Hindi station names appear when available from NTES.
How do I search for trains between two stations?
Pass the source and destination station codes, plus a date if needed. Results include matching trains, departure and arrival times, running days, train type, and available classes.
Is there a free plan for this unofficial IRCTC API?
Yes. RailKit has a free plan with usage limits for the Node.js SDK. Direct REST API access requires the Advance or Scale plan. See the pricing page for current limits, then create an account to get an API key.
Is RailKit an official IRCTC or Indian Railways API?
No. RailKit is an unofficial, independent railway data API. It is not affiliated with or endorsed by IRCTC, CRIS, or Indian Railways.
Can I build a live railway station board with RailKit?
Yes. Use liveAtStation for reported arrivals, departures, delays, and platforms. Use trainTimetableAtStation for scheduled trains at a station.
Does RailKit support train seat availability and fare enquiry?
Yes. Enter the train number, station pair, journey date, travel class, and quota to check seat availability or get a fare breakdown. Use getAvailability or fareLookup in the Node.js SDK. Direct REST access requires Advance or Scale.
Does RailKit support Node.js and TypeScript?
Yes. Install the package with npm install railkit. It works with Node.js and includes TypeScript types for requests and responses.