Check if a station is actually closed

While it’s possible to check the opening and closing times of a station that is operational for less hours than usual (for example Temple, Borough, Bermondsey, etc due to the virus), I cannot find a way to tell when other stations close for the night. If you check the status API at about 1 or 2am, all the lines are reported as closed and that service will resume later in the morning, but if you check the status of any station on that line, they’re all reported as open.

While this seems correct when you’re only looking for disruptions to normal service so it would make sense to get this result, is there any way to find out when a station opens and closes on a normal day without any incidents?

@arturs

Isn’t the data in this call https://api.tfl.gov.uk/StopPoint/Mode/tube,dlr,overground,tflrail,tram/Disruption ?

That endpoint only reports a closure if it’s due to some sort of disruption, but continues to say stations are open during the night when there is no service and the stations are actually closed.
Same goes for the TrackerNet feed at http://cloud.tfl.gov.uk/TrackerNet/StationStatus

I suppose I would assume that the logic is that the station is open from the time of the first service until the last? The first and last data is listed for each station and line combined.

Temple (your example) has it Temple Underground Station - Transport for London

image

Hmm, that certainly does seem like the best option at the moment. Do you know how I could get this information through the API?

I’ve tried calling https://api.tfl.gov.uk/Line/district/Timetable/940GZZLUTMP/, but that just presents disambiguation options, listing all the possible inbound/outbound routes on the district line. Following the URI of any of these routes, for example https://api.tfl.gov.uk/Line/district/Timetable/940GZZLUTMP/outbound, results in a 404.

OK… There is a way

But it’s not pretty!

Oh yeah that seems like quite a challenge.
Luckily I don’t care about the direction or destination of the first/last train, so I think I’m going to have to settle with just checking if the arrivals list is empty for the station in question.

1 Like