38ms avg
GET|/api/v1/trains/:trainNo

Train Schedule & Route Halts API

Fetch the complete timetable for any 5-digit Indian Railways train: sequential station halts, arrival/departure timings, halt durations, distance, and lat/long coordinates.

Live Protocol Demo

Production headers and authentic PRS gateway response.

GET/api/v1/trains/26502
curl -X GET "https://api.irctc.dev/api/v1/trains/26502" \
-H "x-api-key: your_api_key"
200 OK·application/json
latency: 38ms avg
{
"success": true,
"data": {
"trainNo": "26502",
"trainName": "VANDE BHARAT EXP",
"trainType": "VANDE_BHARAT",
"runningDays": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sun"
],
"totalDistance": 384,
"originCode": "GKP",
"destinationCode": "PPTA",
"stations": [
{
"seq": 1,
"code": "GKP",
"name": "GORAKHPUR JN",
"departure": "05:40",
"haltMinutes": 0,
"distanceKm": 0,
"lat": 26.7596,
"lng": 83.3818
},
{
"seq": 2,
"code": "CPJ",
"name": "KAPTANGANJ JN",
"arrival": "06:24",
"departure": "06:26",
"haltMinutes": 2,
"distanceKm": 40,
"lat": 26.9262,
"lng": 83.699
},
{
"seq": 3,
"code": "BTH",
"name": "BETTIAH",
"arrival": "08:36",
"departure": "08:38",
"haltMinutes": 2,
"distanceKm": 187,
"lat": 26.8053,
"lng": 84.5223
},
{
"seq": 4,
"code": "MFP",
"name": "MUZAFFARPUR JN",
"arrival": "10:45",
"departure": "10:50",
"haltMinutes": 5,
"distanceKm": 310,
"lat": 26.1223,
"lng": 85.3779
},
{
"seq": 5,
"code": "PPTA",
"name": "PATLIPUTRA",
"arrival": "12:45",
"haltMinutes": 0,
"distanceKm": 384,
"lat": 25.6216,
"lng": 85.0688
}
]
},
"source": "irctc-api",
"_time": 0.038
}

Engineered for Railway Throughput

High-throughput PRS reservation engine connectivity with sub-second Redis caches and 99.9% uptime reliability.

Direct Gateway Architecture

Multi-hop routing & telemetry
Dedicated PRS Socket

Queries route through high-speed edge clusters across Indian data center zones with direct PRS gateway connectivity and sub-millisecond dispatch.

HOP_TELEMETRY // DEDICATED_SOCKETTOTAL_BUDGET: 38ms avg
01Edge Ingress
12ms
02Edge Router
< 2ms
03Central PRS Tunnel
38ms avg
Ingress: ~15%Edge: <5%PRS Core: ~80%

Production SLAs & Latency

Deterministic throughput backed by enterprise uptime guarantees.

Latency Benchmark38ms avg
Uptime SLA99.95%
Rate Limits1,000 req/min
Cache Strategy7d Static Rake Cache
01 // Capability

Geospatial Lat & Lng Data

Every station halt contains precise geographic coordinates for direct plotting on Mapbox, Google Maps, or Leaflet.

02 // Capability

Halt Minutes & Day Offset

Explicit halt duration (e.g. 5 minutes) and day offsets for accurate scheduling on trans-continental express trains.

03 // Capability

Comprehensive 8,500 Station Network

Over 13,000 passenger, superfast, mail express, Rajdhani, and Vande Bharat train routes indexed.

Parameters Specification

Query and path parameters for /api/v1/trains/:trainNo

trainNostringin: PATH
required

5-digit Indian Railways train number (e.g. 26502 for Vande Bharat).

Example:26502
Response Status:
200 OK 400 Bad Request 404 Not Found 503 Upstream Maintenance

Frequently Asked Questions

Technical specs regarding IRCTC session lifetime, authentication, and quotas.

Yes! Every station in the stations array has lat and lng coordinates ready for map visualization.
Route & Halts Guide

How to Build a WhatsApp Train Running Status & PNR Bot in Node.js

Combine complete train timetable halts with live satellite GPS updates for real-time passenger tracking.

Read Tutorial

Related Railway Endpoints

$npm i irctc-api

Integrate Train Schedule & Route Halts API

Integrate live Indian Railways data into your production or staging stack. 10,000 free sandbox calls included.