Train Crossing FAQ

27/9/26: New - community art experiment. Inspired by something Reddit did a few years ago, work with others in the local community on a 900 pixel canvas to draw pictures together to achieve a common goal. The canvas will reset each day at midnight with a new challenge. As always, feedback welcome. IMPORTANT: This is for passengers/pedestrians only! It's unlawful to operate a mobile phone, even when sat waiting for the crossing. Always follow the law.

UPDATE: 12/9/26 - Improved to include more freight trains for better accuracy. Also added a new look to the 'detail' page. Learn about the trains you're watching go past.

What is this?
The various pages show the times at which trains are expected through that particular crossing. New data is pulled from the excellent RailData API website once every 2 minutes. The closer to the present time, the more accurate the prediction.
UPDATE: 16/8/26 - Performance upgrade. Further diagnostic tweaking to catch a couple of trains that were being missed. Added the times the crossing closes to the detailed view.
UPDATE: 14/8/26 - Performance upgrade. Have upgraded to a Raspberry Pi 4, increased how often new data are picked up and looked only 60mins into the future so everything is faster. Should result in more accuracy now. Also added a visual tweak to the detailed view, so it provides live visual updates. If you want even more detail, this is very cool.
UPDATE: 29/6/26 - Mega upgrade. Doing it properly now - RailData API data now, so it should (in theory) be the most accurate it's every been. Despite the familiar look and feel, this is a total re-write, so there might be a bit of teething trouble.
UPDATE: 5/7/26 - Visual upgrade. New full-screen mobile friendly homepage & finally enabled SSL. Perfect for when all you really care about is, "How long am I going to be sat here?". The 'classic' layout is still available. Do feel free to drop me a line with any feedback.

How do I use it?
If you live nearby a busy crossing and want to maximise your chance of getting through without having to stop, identify one of the green times (i.e. those with at least 5 minutes between trains) and aim to get to the crossing about a minute or so after the train.

Worst case, if you do get caught, at least you'll have a sense of how long you'll need to wait. You'll also look like a psychic when you know which direction the train is coming from and can win family games of 'guess how many cars there are on the next one'.


How accurate is it?
In my experience, reasonably - I've found they tend the trains near the top of the page tend to arrive within about 1-2mins of the estimated time. Remember that if it's a freight rain with a lot of cars, it might take longer to get through than normal. On any day, for any reason, any train can run a bit late (or early, I've found).


Could I get this data for myself?
Absolutely... Just visit the raildata.org.uk website, search sign up for an API key and away you go. It's not for the faint of heart though. ChatGPT and I had one heck of a time getting this to work.


What's next?
I'd wondered about a side-project to show the arrival and departure boards for Peterborough and Stamford now I've got the API key; something for another day perhaps.

This is really handy. Can I buy you a coffee?
If it's helped you, that'd be a thoughtful gesture!




Home | Updated: 27/9/26