Station Train Timetable
trainTimetableAtStation(stationCode: string, date?: string)Description
Get the complete scheduled train timetable for a station on a nearby running date.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
stationCode | PATH | string | YES | Station code such as ASN or NDLS |
date | QUERY | string | NO | Optional DD-MM-YYYY date; only today, yesterday, or tomorrow is accepted |
Code Example
javascript
const result = await fetch(
"/api/station/ASN/timetable?date=28-08-2026"
).then((res) => res.json());
if (result.success) {
console.log(result.data.totalTrains);
console.log(result.data.trains[0].trainName);
}Response Example