Download OpenAPI specification:
API for UK Rail journey planning
Returns transfer patterns (route skeletons) between stations
| origin required | string Example: origin=TBW NLC, TIPLOC or CRS code of journey origin |
| destination required | string Example: destination=EUS NLC, TIPLOC or CRS code of journey destination |
| dateTime | string Default: "now" Example: dateTime=2025-11-12T12:34 Date and time for pattern lookup (ISO 8601 format, e.g., '2025-11-12T12:34'). Timezone is assumed to be Europe/London. Defaults to the current time if not provided. |
| via | string Example: via=EUS,KGX Comma-separated NLC, TIPLOC or CRS codes of stations to pass through. Each code is one via. For a group station (e.g. the London Terminals NLC), any one of its stations satisfies the via. |
| avoid | string Example: avoid=EUS,KGX Comma-separated NLC, TIPLOC or CRS codes of stations to avoid passing through. When specified, uses the Raptor algorithm for dynamic pattern calculation instead of pre-calculated database patterns. |
{- "status": "success",
- "data": [
- {
- "path": "EUS,EDB,FTW",
- "calendar": {
- "start": "2025-01-01",
- "end": "2025-12-31",
- "days": [
- 1,
- 2,
- 3,
- 4,
- 5
]
}, - "hours": [
- 8,
- 9,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 16,
- 17,
- 18
], - "occurrences": 0
}
]
}Returns the current real-time state of a scheduled service
| origin required | string Example: TBW Origin station code |
| destination required | string Example: LBG Destination station code |
| departure required | string Example: 2025-11-12T12:34 Original departure date and time (ISO 8601 format, e.g., '2025-11-12T12:34'). Timezone is assumed to be Europe/London. |
| arrival required | string Example: 2025-11-12T13:23 Original arrival date and time (ISO 8601 format, e.g., '2025-11-12T13:23'). Timezone is assumed to be Europe/London. |
| rsid required | string^[A-Z]{2}[0-9]{4,6}$ Example: SE228000 Original RSID of the service |
{- "status": "success",
- "data": {
- "type": "timetabled",
- "source": "dtd",
- "mode": "train",
- "origin": "EUS",
- "destination": "EUS",
- "originNlc": "1072",
- "destinationNlc": "1072",
- "departure": 1747685700,
- "arrival": 1747685700,
- "realTime": {
- "departure": 1747685700,
- "departureType": "scheduled",
- "arrival": 1747685700,
- "arrivalType": "scheduled"
}, - "scheduledDeparture": 0,
- "scheduledArrival": 0,
- "service": "/service/139:C00465",
- "stops": [
- {
- "station": "EUS",
- "stationNlc": "1072",
- "departure": 1747685700,
- "arrival": 1747685700,
- "realTime": {
- "departure": 1747685700,
- "departureType": "scheduled",
- "arrival": 1747685700,
- "arrivalType": "scheduled"
}, - "scheduledDeparture": 0,
- "scheduledArrival": 0,
- "cancelled": true,
- "delayed": true,
- "platform": "1",
- "platformSource": "darwin",
- "platformIsSuppressed": true,
- "platformChangedFromDtd": true,
- "platformDtd": "15",
- "pickup": true,
- "dropoff": true
}
], - "distance": 0,
- "co2": {
- "train": 37,
- "petrolCar": 132,
- "flight": 248
}, - "isDelayed": true,
- "isCancelled": true,
- "disruptionReason": "string",
- "rid": "string",
- "duration": 0,
- "originInterchange": 0,
- "destinationInterchange": 0
}, - "links": { }
}Returns count of services per Train Operating Company (TOC)
| from | string Example: from=TBW Origin station code (optional filter) |
| to | string Example: to=EUS Destination station code (optional filter). If not provided, defaults to the origin station code. |
{- "status": "success",
- "data": {
- "2025-01-20": {
- "CS": 45,
- "GW": 120,
- "LN": 89
}, - "2025-01-21": {
- "CS": 45,
- "GW": 120,
- "LN": 89
}
}
}Returns detailed information about a specific train service
| tuid required | string^[A-Z]{1}[0-9]{5}$ Example: P19701 Service TUID |
| date required | string <date> Example: 2025-11-12 Service date (YYYY-MM-DD) |
{- "status": "success",
- "data": {
- "operator": "CS",
- "tuid": "C49393",
- "rsid": "CS1234",
- "headcode": "1A23",
- "reservationCode": "R",
- "reservation": "recommended",
- "isSleeper": true,
- "facilitiesCode": "CFH",
- "facilities": {
- "standardClass": true,
- "firstClass": true,
- "firstClassMeal": true,
- "firstClassRestaurant": true,
- "hotFood": true,
- "buffet": true,
- "restaurant": true,
- "trolley": true,
- "wheelchair": true
}
}
}