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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
stationCode | ARGUMENT | string | YES | Station code such as ASN or NDLS |
date | ARGUMENT | string | NO | Optional 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