Get Train Details (Legacy)

GET/v1/legacy/trains/{number}

Legacy train data endpoint

Description

Backward compatibility layer preserving the old API structure for existing clients. Returns the legacy TrainData format inside the standard envelope.

Parameters

NameInTypeRequiredDescription
numberpathstringYes5-digit train number
journeyDatequerystringNoJourney start date (YYYY-MM-DD). Auto-detected if omitted.
dataTypequeryfull | static | liveNoType of data to return. Default: `full` Default: full
dataProviderqueryrailradar | NTESNoData provider preference. Default: `railradar` Default: railradar
userIdquerystringNoUser ID for tracking/analytics

Code Examples

CURL
curl -X GET "https://api.railradar.in/v1/legacy/trains/12919?dataType=full" \
  -H "Authorization: Bearer rr_live_YOUR_API_KEY"

Example Response

JSON200 OK
{
  "success": true,
  "data": {
    "train": {
      "number": "12919",
      "name": "Malwa SF Express",
      "type": "Superfast Express",
      "runDays": [
        "mon",
        "tue",
        "wed",
        "thu",
        "fri",
        "sat",
        "sun"
      ],
      "sourceCode": "INDB",
      "destinationCode": "SVDK"
    },
    "route": [
      {
        "stationCode": "INDB",
        "stationName": "Indore Junction",
        "sequence": 1,
        "scheduledArrival": null,
        "scheduledDeparture": "23:55",
        "actualArrival": null,
        "actualDeparture": "23:55",
        "delayMinutes": 0,
        "isHalt": true,
        "platform": "4"
      },
      {
        "stationCode": "UJN",
        "stationName": "Ujjain Junction",
        "sequence": 2,
        "scheduledArrival": "00:55",
        "scheduledDeparture": "01:00",
        "actualArrival": "01:07",
        "actualDeparture": "01:12",
        "delayMinutes": 12,
        "isHalt": true,
        "platform": "1"
      }
    ],
    "liveData": {
      "trainNumber": "12919",
      "journeyDate": "2026-03-14",
      "lastUpdatedAt": "2026-03-14T11:42:00+05:30",
      "currentLocation": {
        "stationCode": "UJN",
        "status": "departed",
        "segmentProgress": 0.45
      },
      "overallDelayMinutes": 12,
      "dataSource": "external",
      "route": [],
      "exceptionInfo": null
    },
    "metadata": {
      "generatedAt": "2026-06-22T12:30:00+05:30",
      "lastLiveUpdate": "2026-03-14T11:42:00+05:30"
    }
  },
  "meta": {
    "traceId": "550e8400-e29b-41d4-a716-446655440000",
    "timestamp": "2026-06-22T12:30:00+05:30",
    "executionTime": 38,
    "source": "database"
  }
}

Try it Out

Login to test this endpoint

Sign in to pre-fill your API key and send live requests directly from the browser.

Sign in →

Error Codes

StatusMeaning
400Bad Request — invalid or missing parameter
401Unauthorized — missing or invalid Authorization Bearer token
404Not Found — train/station not found (or no results)
429Too Many Requests — rate limit exceeded
503Service Unavailable — upstream data source temporarily down

Error Response Examples

JSON Error Envelope404 Not Found
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found (e.g. Train 12919 not found on journey date 2026-06-22)"
  },
  "meta": {
    "traceId": "9772f1c9-6ec6-4d9f-b269-a5210f33ec73",
    "timestamp": "2026-06-22T08:14:00+05:30",
    "executionTime": 5,
    "source": "database"
  }
}