Fare Lookup
fareLookup(trainNo, fromStnCode, toStnCode, date, travelClass, quota)Description
Get the full fare breakdown for a journey — base fare, reservation, superfast, catering, GST, dynamic fare, and total collectible amount.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
trainNo | PATH | string | YES | 5-digit train number |
fromStnCode | PATH | string | YES | Origin station code |
toStnCode | PATH | string | YES | Destination station code |
date | PATH | string | YES | Journey date in DD-MM-YYYY |
travelClass | PATH | string | YES | 1A · 2A · 3A · 3E · CC · EC · EA · FC · SL · 2S · VS · CH · HS · VC · VA |
quota | PATH | string | YES | GN · TQ · PT · LD · DF · FT · LB · YU · DP · HP · PH · SS |
Code Example
javascript
const result = await fareLookup(
"12904", "NZM", "BDTS",
"01-09-2026", "3A", "GN"
);
if (result.success) {
const d = result.data;
console.log(`${d.trainName} (${d.trainNo})`);
console.log(`${d.from} → ${d.to} | ${d.distance} km`);
console.log(`Base: ₹${d.baseFare} GST: ₹${d.gst} Total: ₹${d.totalFare}`);
}Response Example