For Developers


Pull

Realtime Trains allows you to take its data to use in your own projects. It's totally free for sole personal use. For public non-commercial use, it's free up to a certain usage limit - we have to do this to ensure we can ensure the ongoing sustainability of the service for all. For commercial use, I'm afraid there's a fee - but don't worry, it's pretty small.

The pull feed is built to be similar to a REST API, but not completely. It operates over HTTPS, and you will need access credentials in order to gain access to this. You can request them from us by email. All results are returned in a JSON format, although we can provide an XML version if you would rather have that.

In order to reduce bandwidth, responses are all sent with gzip compression by our server and any fields that are not the 'default' (don't worry, this is detailed in the documentation) are not sent at all. Some messages, therefore, may be tiny. The API contains nearly all the data shown on our website.

Given that you can do exactly the same as what we get with the data, we don't really mind what you use it for. We will, however, refuse requests that we believe are for reasons that can be perceived to be for criminal use.

Push

The Realtime Trains firehose. This feed contains all updates that the system makes to services in realtime via a message queue feed. It isn't recommended unless you have a server that can cope with it!

Every minute, around 1000 services are updated in the off peak - up to 2000 in the peak. This creates a message quantity of between 5000 and 15000 per minute.

More information

More information is available at the documentation page.

FAQs

What happens if there's a problem with the data? We'll tell you in the responses. Realtime Trains monitors itself continuously to see where input data may be considered to be unreliable. If we think it is, we either use it (with corrections) or we put up a message saying that. You can then choose what you want to display.

Some other sources show different information? We know about this - and we, sadly, can't do much about it right now. Realtime Trains uses open data sources which don't contain all the information we'd like. Our predictions are calculated using data we've collected ourselves. Cancellation information is the biggest problem, though - but we're working on making that more accurate.