Station Timetable API

trainTimetableAtStation(stationCode: string, date?: string)

Description

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

Parameters

NameInTypeRequiredDescription
stationCodeARGUMENTstringYESStation code such as ASN or NDLS
dateARGUMENTstringNOOptional DD-MM-YYYY date; only today, yesterday, or tomorrow is accepted

Code Example

javascript
import { configure, trainTimetableAtStation } from "railkit";

configure(process.env.RAILKIT_API_KEY);

const result = await trainTimetableAtStation( "ASN","03-12-2026" );

if (result.success) {
  console.log(result.data.totalTrains);
  console.log(result.data.trains[0].trainName);
}

Response Example

JSON response
200JSON
{
  "success": true,
  "data": {
    "summary": "168 Trains scheduled at ASN - ASANSOL JN. on 28-Aug-2026",
    "station": "ASN",
    "date": "28-Aug-2026",
    "totalTrains": 168,
    "trains": [
      {
        "trainNo": "15052",
        "trainName": "GKP KOAA EXP",
        "source": "GKP",
        "sourceName": "Gorakhpur Jn",
        "destination": "KOAA",
        "destinationName": "Kolkatta Terminal",
        "trainType": "Mail Express",
        "classes": "1A,2A,3A,SL,GEN,PWD",
        "runningDays": "",
        "arrival": "00:01",
        "departure": "00:11"
      }
    ]
  }
}