Train/tube status/disruption details?

Which API should we use to get the status/disruption details?

This one doesn’t have details:
https://api.tfl.gov.uk/Line/Mode/national-rail/Status

For example, I can see there is ‘minorDelays’ for ‘thameslink’ line, and under ‘disruption’, the ‘additionalInfo’ is ‘Minor delays on some routes.’, but there is no more details, the ‘affectedStops’ and ‘affectedRoutes’ are empty.

In the mean time, I can see these details from other app:
“Minor delays
London Bridge: Disruption between London Bridge and New Cross Gate / Peckham Rye expected until 16:00”

Please advise.

Welcome @xcoder20090203

I would suggest popping over the the Darwin service from National Rail Enquires and getting the data direct from the Disruptions Webservice

Or, if you in a more hacking mood, you can scrape this

image

from here

Thanks a lot for your reply.

What about for Tubes? Can we get details from this endpoint:
https://api.tfl.gov.uk/Line/Mode/tube/Disruption

Thanks

I use https://api.tfl.gov.uk/line/mode/tube,overground,dlr,tflrail,tram/status to get the status.

When there are problems in sections of the service, rather than the whole thing, there is some text in the section called routeSections.

These are always wording generated by TfL control, rather than pointers to NAPTAN codes: they are for public display.

What they can be depends on the service. On services with actual whole sub-lines they will be split like that (“Gospel Oak to Barking”). On TfL Rail they can be ad-hoc (“Stratford to Liverpool Street”) as can the trams. The tube-lines depends on if the service is can be broken up, which has to do with a mixture of reversible sidings/points** and RRBS.

This being a unevenly upgraded 159-year-old system, I suspect this is the best we can probably expect…

for ** see Detailled London transport map (track, depot, ...)