About the Network Rail feeds
What are the feeds?
The following feeds are available:
|RTPPM||Real-time low volume||Real Time Public Performance Measure. This shows the performance of trains against the timetable, measured as the percentage of trains arriving at destination on time, and is updated every minute|
|Train Movements||Real-time high-volume||Messaging from the TRUST system, containing reports of train movements past timetabled calling and passing points|
|TD||Real-time high-volume||Berth-level data from the Train Describer system, showing raw data with train movements in more detail than the Train Movements feed|
|VSTP||Real-time low-volume||Late-notice train schedules which are not available through the Schedule feed|
|TSR||Low-volume||Temporary Speed Restriction data as published in the Weekly Operating Notice|
|SCHEDULE||Static data||Extracts of train schedules from ITPS in JSON format|
There are also several sets of reference data which are helpful when working with the data.
How do I get the data?
Register for an account by visiting http://datafeeds.networkrail.co.uk. You will receive a confirmation email - follow the instructions: log in and change your password. When your account is active, you can connect to the service. Your account may be in one of three states.
Schedule data is available as a separate download.
There is no formal technical support from Network Rail for using this service.
Check the FAQ to see if anyone else has had the same issue.
This wiki contains a wealth of useful information, and the openraildata-talk group on Google Groups has many people who can offer informal help and advice.
Please bear in mind the following points when you use the service - they're here to make sure everyone gets a good service:
- Sign up with one account - it gives an accurate reflection of how many people are actually using the service.
- Connect to the service once - you can receive multiple feeds in a single connection. If you need to access the data more than once, you can do so - but be sensible!
- Don't leave a failed client running - if you can connect but get an authentication or authorization error, stop your client, don't leave it continually trying.
- Make sure your client handles failures - if your client fails to connect or is disconnected, use an exponential backoff and wait 1s, 2s, 4s, 8s, 16s etc. before trying to reconnect. Service problems sometimes occur, and if everyone tries to reconnect every second, the service will not recover quickly.
- Use a durable subscriber - if you want data to be queued in case you disconnect, request a durable subscription when you connect.
It may be useful to understand the background to the sources of some of these data feeds. These links will help:
Example code is available for several common languages:
NOTE: This code has been written by members of the community as a starting point, and may not be a complete solution.