Query UK National Rail live departure boards, arrivals, delays, and train services. Use when asked about train times, departures, arrivals, delays, platforms, or "when is the next train" for UK railways. Supports all GB stations via Darwin/Huxley2 API.
Query National Rail Darwin API for live train departures and arrivals.
Requires free Darwin API token:
NATIONAL_RAIL_TOKEN in environment (or configure in skills.entries.uk-trains.apiKey)# Departures
./scripts/trains.py departures PAD
./scripts/trains.py departures PAD to OXF --rows 5
# Arrivals
./scripts/trains.py arrivals MAN
./scripts/trains.py arrivals MAN from EUS
# Station search
./scripts/trains.py search paddington
./scripts/trains.py search kings
Use 3-letter CRS codes:
PAD = London PaddingtonEUS = London EustonKGX = London Kings CrossVIC = London VictoriaWAT = London WaterlooMAN = Manchester PiccadillyBHM = Birmingham New StreetEDB = Edinburgh WaverleyGLC = Glasgow CentralBRI = Bristol Temple MeadsLDS = LeedsLIV = Liverpool Lime StreetRDG = ReadingOXF = OxfordCBG = CambridgeJSON with:
locationName, crs - Station infomessages[] - Service alertstrainServices[] - List of trains:
std/sta - Scheduled departure/arrival timeetd/eta - Expected time ("On time", "Delayed", or actual time)platform - Platform numberoperator - Train operating companydestination[].name - Final destinationisCancelled, cancelReason, delayReason - Disruption infoUse this compact format for WhatsApp/chat responses:
🚂 {Origin} → {Destination}
*{dep} → {arr}* │📍{platform} │ 🚃 {coaches}
{status}
*{dep} → {arr}* │📍{platform} │ 🚃 {coaches}
{status}
🚂 Hemel Hempstead → Euston
*20:18 → 20:55* │📍4 │ 🚃 4
✅ On time
*20:55 → 21:30* │📍4 │ 🚃 12
✅ On time
*21:11 → 21:41* │📍4 │ 🚃 8
✅ On time
To show arrival times, make two API calls:
departures {origin} to {dest} — get departure times + service IDsarrivals {dest} from {origin} — get arrival timesMatch services by the numeric prefix in serviceID (e.g., 4748110HEMLHMP_ matches 4748110EUSTON__).
⚠️ Delayed (exp 20:35)