Is there a way of finding whether or not a station is currently opened or closed
Iâd like to be proved wrong here but Iâm not sure there is. The âdisruptionsâ API call will report if a station has been closed due to a problem, but if itâs scheduled to be closed (eg on a Sunday or outside Peak Hours) then I donât think it will show up.
Oh thats unfortunate
Tube stations generally open 10 minutes before the first train and close 10 minutes after the last train.
We publish PDFs of first/last train times, and this is also available in our timetable data via the Unified API and TransXChange.
Of course, you may also need to factor in any closures as a result of disruption.
Most TfL stations have a first-and-last board Grange Hill, for example
I ended up using the https://tfl.gov.uk/tfl/syndication/feeds/journey-planner-timetables.zip (type=tube) file to work them out so I could display something if the live feeds fail. So you get on a Wednesday
(for Night Tube nights)
Thereâs a list of âplanned and unplanned closuresâ at Tube, Overground, Elizabeth line, DLR & Tram status updates - Transport for London which you can grab using http://cloud.tfl.gov.uk/TrackerNet/StationStatus (more XML)
I forgot about that StationStatus feed!
By the way, the documentation for that can be found at:
Thank you, got it working now
Forgive me for being ignorant I donât really know what Iâm doing, but what does a âNo step free accessâ mean, when im accessing the description part of the response for a certain station.
I think it means that the station usually has step free access (e.g. for wheelchair users), but currently doesnât (usually because of a faulty lift).
Hm, so it doesnt seem like description identifies the status of a station then?
Hm it seems i should be looking at the CssClass instead.
I think the CssClass is a bit misleading. Just because it says âClosedâ doesnât mean the station is closed. Those âNo Step Free Accessâ stations all have a CssClass of âClosedâ even though theyâre actually open.
I see, what should i be looking at then?
From the manual
- CssClass - A text code representing the general status of the station e.g. Open, Closed
- Description - A description of the status of the station e.g. No Step Free Access
Yeah? But neither are exact always, for the status of a station.
@Ja123 Iâm sorry, you not being very specific with âneither are exact alwaysâ.
Iâm happy to help but your not being clear.
I suppose the point is that saying âNo Step Free Accessâ doesnât indicate whether the station is open or closed.
To be honest, Iâm not sure whether that StationStatus feed actually indicates whether a station is closed because service has ended for the day, or if it only indicates disruptions.
Yeah, my point is that it doesnât seem like thereâs a real way of finding out whether or not a station is opened or closed. As since mentioned above, an open station can have a description of âNo step free accessâ and have a cssclass value of closed.