-
-
Notifications
You must be signed in to change notification settings - Fork 137
Delays
The delays API endpoint performs calculations server side to easily let you know with a simple response if there are problems on a particular route. It checks if trains are Delayed
, Cancelled
or more than 5 minutes late (configurable in the Web.config
file). It also checks if there are no trains and rail replacement buses instead or if there are any National Rail Communication Centre (NRCC) disruption messages.
Statistics and a list of delayed trains are returned.
As with the other endpoints, you can use a CRS code or station name as the location and/or filter location.
Also, this endpoint will accept LON
or London
as a filter CRS to find trains going to or coming from any London Terminal.
The London Terminals are:
- Blackfriars (BFR)
- Cannon Street (CST)
- Charing Cross (CHX)
- City Thameslink (CTK)
- Euston (EUS)
- Fenchurch Street (FST)
- King's Cross (KGX)
- Liverpool Street (LST)
- London Bridge (LBG)
- Marylebone (MYB)
- Moorgate (MOG)
- Old Street (OLD)
- Paddington (PAD)
- St. Pancras (STP)
- Vauxhall (VXH)
- Victoria (VIC)
- Waterloo (WAT)
- Waterloo East (WAE)
More information on London Terminals.
Additionally, you can also pass in a single or comma separated list of 24 hour train times to filter on. If times are provided then Darwin will only be queried from 2 hours before to one hour after each train.
/delays/gtw/to/clj/25
/delays/balham/to/clj/25
/delays/gtw/to/london/25
- [
/delays/east croydon/to/london victoria/50
](https://huxley.apphb.com/delays/east croydon/to/london victoria/50?accessToken=) - [
/delays/btn/to/london victoria/50/0729
](https://huxley.apphb.com/delays/btn/to/london victoria/50/0729?accessToken=) /delays/btn/to/london/50/0729,0744,0748
This project to build a Train Disruption Indicator with a Blinky Tape RGB LED Strip and Raspberry Pi makes use of the delays API.
Sample Response (for [/delays/clapham junction/from/london/20
](https://huxley.apphb.com/delays/clapham junction/from/london/20?accessToken=)):
{
"generatedAt": "2015-05-08T11:28:33.7187169+01:00",
"locationName": "Clapham Junction",
"crs": "CLJ",
"filterLocationName": "London",
"filtercrs": "LON",
"delays": true,
"totalTrainsDelayed": 1,
"totalDelayMinutes": 16,
"totalTrains": 12,
"delayedTrains": [
{
"origin": [
{
"locationName": "London Waterloo",
"crs": "WAT",
"via": null,
"futureChangeTo": null,
"assocIsCancelled": false
}
],
"destination": [
{
"locationName": "London Waterloo",
"crs": "WAT",
"via": null,
"futureChangeTo": null,
"assocIsCancelled": false
}
],
"currentOrigins": null,
"currentDestinations": null,
"sta": null,
"eta": null,
"std": "11:20",
"etd": "11:28",
"platform": "3",
"operator": "South West Trains",
"operatorCode": "SW",
"isCircularRoute": false,
"serviceID": "F4GbTDZuLjb4VlXEYDuakg==",
"adhocAlerts": null
}
]
}