National Rail Enquiries Have Killed My UK Train Times App

About a year ago I wrote a simple web application to present UK train times in a simple format for mobile phone users.

It’s best described by the instructions.  The app was deliberately spartan, really just a list of upcoming trains between a collection of stations you specified in the URL.  Data came from a free API which National Rail (a body representing the UK’s train companies) has run for years.  Output was presented in the cleanest way possible – people on the move don’t want to be encumbered with advertising or excessive page furniture!

One neat feature was multiple start/end points.  Say you live halfway between two stations (I do) and don’t care which station you travel from.  The app would look up departures from both, combine and reorder them then produce a unified table of all services you could catch.  When I wrote the app none of the official train timetable sites could do this and I don’t believe any can now.

Useful, huh?  And all for free.  I only wrote it to scratch an itch, so that rather than wading through the cluttered National Rail site I could click a bookmark on my phone and immediately know when the next train into town was.  To reiterate – I built this because it was convenient and would be useful to others.  Not to make a profit.

…and today National Rail killed it.

So who runs this SOAP service?

The API is supplied within a website operated by National Rail – a brand of ATOC, the grandly titled “Association of Train Operating Companies”.  Their name is confusingly similar to “Network Rail”, a publicly owned organisation which owns and maintains all the infrastructure.  Network Rail own the track, members of National Rail / ATOC run trains on it for a profit.  Confused?  Good, you’re probably supposed to be.

The Live Departure Board API has existed for a few years and I’m not the only person using it.  Some kind soul even wrote a CPAN module.  The API is well-documented, publicly accessible and presented as something freely usable by the public.  A lot of people were doing neat things with it.

It was even listed on the London Datastore site – a state-run list of open data feeds which developers are encouraged to use to provide data to web users in new and innovative ways.  There was a lot of buzz around open data like this around the time of the last election.

Edit: the page on London Datastore has now been locked.  “Access Denied”.  Possibly because a lot of discussion appeared on there which was critical of ATOC’s decision to extract money from users of the service.  Here’s the page from before ATOC’s bombshell in Google’s cache and in case that evaporates too here’s a pdf.

After writing the web app last year I had the idea of doing an Android widget to show departure times from the user’s nearest station.  It would locate a user from the phone’s GPS, look up their nearest rail station then query the LDB web service to get a list of the next handful of trains they might catch.  It even got as far as a Spec for Train Time Autofinder2 – complete with mockups of the widget and definitions of its functionality.  Since I’m no Android programmer it’d necessitate paying a developer and I hoped to recoup that cost by selling the app for a nominal fee.  I wrote to ATOC asking whether this would be okay.  A month later when they hadn’t replied I wrote again, this time by registered post.  Their eventual response:

“I can confirm the National Rail Enquiries Website is for personal and non-commercial use only.  Therefore, the suggestion made in your letter, to utilise the data to build an Android application is expressly prohibited.  I’m sorry that we cannot be of any further assistance.”

Note this carefully.  A unequivocal statement that the API exists for the public and that it is not to be used commercially.  National Rail / ATOC were clearly aware that the API was being used by the public and did not say any license was required, or even that one was available.  Had one been I’d have tried to arrange one for my Android widget and the damn thing would have been built!

They didn’t want to know.  I gave up on the idea of an Android application and left the free “Simple UK Train Times” app running on my server.

Kaboom! “You’ve always needed a license, we just didn’t tell you they existed even when you asked”

Spin on a year.  The simple app is still running on my webserver and a few people are still using it as a shortcut to find times for their train journeys.  All seems good.  Until…

The Google Groups thread says it all.  On October 26th the following text was added to the LDB service’s documentation:

“With affect [sic] from Tuesday the 23rd of November, National Rail Enquiries will be introducing tokens in to SOAP header of the Darwin Webservice for licenced users of the system. For more information on licencing and obtaining a token, please contact”

Despite the misspelling (don’t they teach English anymore?) it’s genuine.

I only discovered this because a friend pointed it out.  ATOC don’t seem to have made any attempt to contact users of the service telling them about the change.  Presumably they expected everyone’s apps would suddenly break on November 23rd and we’d all rush to them for licenses.

So I dutifully emailed…

Hi there,

I’ve noticed the following text has appeared on your instructions page for the Live Departure Board web service:

[blah blah]

I’d like to obtain a token for use by a web application.  It’s strictly not for profit and free to users, not even ad-supported.  The intention is to provide a highly simplified interface for smartphone users displaying train times in the next hour or two from local stations.

It’s only by accident I discovered this upcoming licensing change.  Is there any way I can sign up to get updates and major changes to the service rather than risking missing them?

Alex Hewson.

Positive, I figured.  I’m doing something good for the world and want to go on doing it.  Their response the following day could not have been colder:


There has always been a requirement for a licence to use this service. If you are using the service for anything at the moment can you please cease and we can enter into discussions over a licence.

It is highly likely that any licence will include a charge.

Derek Parlour

What requirement is that?  I asked ATOC about the service a year ago and got that written response where they declined to offer a license and made it clear that the service was for noncommercial use only!

Hi Derek,

It seems perverse that you would try to make me pay for providing a not-for-profit service which seeks to ease and encourage rail usage.  Can you confirm this really is your intention and that even knowing no profit is being made and the tool is of value to many rail users you want me to stop providing the service?  Can we not come to an arrangement for non-commercial usage without disrupting it?

I’m afraid I’ll have to pick you up on one of your points.  A year ago I contacted National Rail […] about using the LDB service as a source of data for a mobile application, something which as a result of the lack of licensing options I did not build.  I’ve attached a copy of my letter.  In it I asked:

”I’ve checked your website’s terms and conditions but they’re unclear on whether this is a reasonable use of the service.  Can you clarify National Rail’s position on third party applications using its API?”

After waiting a month and sending another copy of the letter recorded delivery I had a response from the Customer Relations Manager, Melanie Marsh:

“I can confirm the National Rail Enquiries Website is for personal and non-commercial use only.  Therefore, the suggestion made in your letter, to utilise the data to build an Android application is expressly prohibited.  I’m sorry that we cannot be on any further assistance.”

This indicates that your organisation has been very much aware of noncommercial uses of the data feed.  Melanie did not mention the availability of licenses, and in fact she expressly told me the data could not be used for commercial purposes at all.  This rather disproves your assertion that “There has always been a requirement for a licence to use this service” – I tried to use the data for commercial purposes and was told I could not!

So I’ve been told in writing that the data is solely for non-commercial use and no mention of licenses was made.  This completely contradicts what you’re telling me.  How do you explain this?

Alex Hewson.

I sent that on the morning of 2010-10-29.  No response yet.  I’m really curious to see how they square “There has always been a requirement for a licence to use this service” with “is for personal and non-commercial use only” as they claimed last year.

Until National Rail deign to answer I’m left with no choice but to suspend the app.  If you’re a user of the application and disagree with National Rail’s greed in trying to make money out of a data source which was hitherto free, I can only suggest you email and express your concerns.

[Edit: there’s a followup post about later developments here.]

59 thoughts on “National Rail Enquiries Have Killed My UK Train Times App

  1. The current LibCon government seems to be terribly keen on the liberation of data held by public bodies. TfL has already begrudgingly towed the line, and Royal Fail have been told that their post-code data should be freely available in future.

    I suggest a strongly worded letter to your MP and to the Phil Hammond MP – Secretary of State. There is no reason whatsoever why ATOC should be attempting to screw money out of 3rd parties for this.

    Another avenue worth perusing is the Freedom Of Information Act. Repeated requested may change attitudes.

    1. Contact Rail Regulator as well. Dont forget Network Rail and many ATOC members are supported by Government, sorry your, taxes.

    2. You might include a reference in the rendered page indicating the source of the information. It would provide free unabtrusive advertising to National Rail

  2. Similar thing happened a little while ago with London underground data from OK, it was a beta, but the service was simply pulled without warning.

    1. The tube feed wasn’t “pulled”; TfL were struggling with the demand, so it’s been temporarily suspended to allow them to increase their capacity. There hasn’t been any official talk of TfL taking an NRE-style approach and, if the timescale in the London Datastore’s latest blog post is accurate, the feed should be freely available very, very soon:

      Fingers crossed!

  3. Silly you. Information on services between Oceania and Eurasia were never available for noncommercial use!
    Seriously though, what a stupid shortsighted action for them to take. I hope their mendacity is exposed widely and they backtrack on this.

  4. You are not alone, I had a similar experience with a Rail organisation which seemed to be doing everything possible to stop people getting to its data.
    I wrote a small app for Italian train times – using live web scraping to respond to queries. The official site is horribly difficult to use and has mad terms and conditions – for example expressly prohibiting deep linking. This precluded me from making a direct link to the checkout page for buying tickets – something that would have brought them business.

  5. The cynic in me can’t help but think that the powers that be at National Rail have decided there is money to be made in the app market…. :(

    1. They haven’t “just” realised it, they’ve been mugging iPhone users of £4.99 for their app for a while now – where previously there was a free one. That app’s maker was told he’d need to pay an extortionate amount to continue getting a data feed.

  6. I explored using the ATOC API a while back and had an e-mail exchange with Derek Parlour, who is/was their head of commercial. It was quite clear that they see the API as a money-spinner (the UK Train Times app for the iPhone is £4.99).

    Technically, they are correct in that a licence (explicit or implied) is required to use the service. And since they prohibit any use that isn’t personal and non-commercial you would probably fall foul of the first condition (personal use) by making the app generally available.

    I agree that it’s pretty disgraceful that ATOC are taking such a cynical approach in how they manage this data, particularly as it’s been funded at least in part by public money.

    The team at the Guardian (e.g. @charlesarthur on Twitter) might be interested to hear from you as they recently covered an issue that a developer had with the Transport for London API

    Good luck.

    1. This is still a personal use of the data. The application is a viewer, but the data is provided personally to the viewing party for their viewing pleasure. You may as well argue that glasses make for a non-personal use of the data because they alter the personal view of the data.

      Wait, I don’t want to give those people ideas if they’re monitoring this thread.

    1. National Rail, or rather *Network* Rail, know the position of each train with varying accuracy depending on the line. Signallers know which track circuit(s) a train is occupying, however the amount of data this generates is vast and generally unnecessary knowledge except on a local level.

      NR have a system called TRUST (Train Running System on TOPS – Total Operations Processing System) which reports trains and what time they passed particular ‘reporting points’. That’s as much as is generally possible at the moment. ETRMS may increase the accuracy of train positions to silly levels, but that’s several years off.

      1. TRUST provides one view of real-time train movements – essentially train performance between contractual locations such as stations, sidings, and junctions – but you can also derive much finer grain location info from signalling systems such as SMART.

        TOCs are also using GPS on vehicles to report real-time locations, but this still requires business logic to reconcile vehicles to schedules, and hence trains.

        I’ve always understood that copyright for the timetable belongs to Network Rail.

        There are also commercially sensitive aspects to poking around in train performance data under Schedule 8 and the train performance regime.

        Darwin? Think you’ll find there’s a third party in there somewhere working for ATOC and manipulating the data coming from train describers to provide real time movement info.

      2. Sure, the elegance of the Swiss solution is that it’s taking the feed from the technical infrastructure that underpins SBBs operations. The service bus approach SBB use unlocks data from underlying line of business systems and enables tha adoption of a canonical data model. It enables sexy little applications like the train map to be created without needing a new data infrastructure.

        NR may “know” where their trains are but as you imply that knowledge is lost in the volume of data that the LOB apps pack round it.

  7. We might be able to sort you out with access to train time information. Send me an email on the email address I have posted this comment with and we can discuss. Hopefully we can get your app back on track.

  8. I’ve written to the e-mail address mentioned expressing my sore disappointment at this move, which ultimately makes my customer experience worse, and makes me more likely to cost the rail companies money by ringing up national rail enquiries (even the PDA version of nationailrail is painful to use on the go, and hates being left open in a browser window for more than a few minutes).

    I suggest others do the same – maybe they’ll get the message!

  9. It is instances like this that confirm my belief that it is ludicrous to have single individuals in charge of government services. Don’t we have collaborative internet tools now? Can’t we have a more involved bureaucratic process than these little fiefdoms of micro-power we so often encounter in government agencies?

    If you are looking for a place to direct your programming skills, the Metagovernment project could use your input.

    We intend to make these individual power centers obsolete.

  10. The work you’re doing is cool Alex. It’s unfortunate that the rail services suck ass, and so does everyone that works in them. (And have done for a long time too!)

  11. ATOC’s first duty is to their shareholders. They would be committing gross negligence, and opening themselves to lawsuits, if they failed to extract the maximum possible rent from their proprietary data. That’s a fundamental principle of Thatcherism-Blairism, the ideology by which our society functions.

  12. If there is an iPhone app that works – take it apart and see how it works. Publish the results anonymously. Repeat the process if they update the API. Continue until they give up or draw enough attention to embaress themselves.

    This sort of behaviour must be punished.

    1. Last i checked, the iphone app for NR uses SSL (I’ve already had the idea :P).

      With some creative effort it’s possibly to strip the ssl and to extract the API key that they are using. Then just post that API key like we did with dvd/blueray keys and keep doing this every time they push an update. I’ll look into it when i get home :P

  13. How dare you write a free, useful app that would help people use the railway system efficiently.

    The National Rail Motto: “Stifling Creativity Since 1902

  14. I’d consider a dig through ATOCs published policy etc. for examples of where their actions don’t match their words. If that doesn’t work, pressure could be applied through rail consumer groups, individual rail companies, and government.

  15. Obviously they (or one of their friends or family) are planning to release a competing app and this change in policy is a simple way to kill off competition.

  16. I’m from America, not the UK, so I have no stake in this but personally I would say that civil disobedience would be the best course. If it is indeed as some people in the comments say and the railroad is funded by the government, then I believe someone needs to set up an unauthorized rail times website and run it on a server in another country where they can’t bring it down. Perhaps use web scraping, if they block access to the API. If they see they can’t stop people anyways, they might be more willing to talk.

  17. > There has always been a requirement for a licence [sic] to use this service.

    And also, we’ve always been at war with Eastasia.

    Best Regards,
    George Orwell

  18. Its seems you can find Derek Parlour office telephone number just by searching his name in Google! (public tenders contain his contact details).

    But with the amount of attention this has revived today, i would imagine he already knows that!

  19. I would firstly like to point out that you seem to be under the misunderstanding that the requirement for a licence has anything at all to do with it’s use for commercial or non-commercial purposes.

    Almost everything has a licence agreement of SOME sort, from Hotmail to Reddit … you have terms of use etc that allow you to use the service. Free software still has a licence agreement even though everyone just hits the OK button.

    Secondly – i agree with what others have said…it’s likely that they’re building a competing product and as such there’s not much you can do about it.

  20. Evening all. I started the referenced google thread in the above post, when I noticed it would have an impact on my (completely noncommercial) site ( , that has for years used the API with no problems.

    I too have had no response, other than the very formulaic, from Derek at NRE. He has asked my to take down the site. I have asked him if I can have a license, but have received a response.

    If tokens are introduced on the 23rd and i don’t have one, I will loose access to the feed anyway – so there seems little point in my stopping the ite early. However, despite two requests, I am still waiting to hear from the NRE – and if they want to charge for a license I won’t be able to pay them :-)

    1. Hi Ben. That’s an interesting one – it does rather seem like they’ve been sending out a form letter. Since your app was still up I’d wondered if you were the one lucky soul who’d got a license but it sounds like you’re in the same boat. Mine is shut down because that’s what Derek told me to do and even when I repeatedly asked if I could turn it back on while we discussed a license he wouldn’t answer the question.

      If any more of the press get in touch would you mind my passing on your details as another free app developer who’s been affected?

      1. No – that’s fine with me.

        If Derek or someone else at NRE confirms to me they will not license me I will take the site down – it was done as a bit of fun so I can’t risk annoying them too much – but until they answer me either way on the license issue I will leave things as they are. After all, from the 23rd anyone without a token will be stuck anyway :-)

        It’s a pity I didn’t find your site before it was shut down – it looks like it was a nice bit of work.



  21. Can you imagine an airline or cruise line making their schedule secret?

    Airlines and cruise ships pay to distribute their schedules so they get more customers.

    Whoever is responsible for hiding the train schedule should be fired because they don’t understand their job.

  22. Their own Vista desktop gadget used this SOAP service, and in making it non-public they’ve broken the gadget. Cutting the nose off to spite the face?

  23. The Rail service in The U.K. suffers from employing too many marketing professionals. Out to screw the public by confuscation and sleight of hand. Thank God I live in CZ where each station displays the cost per kilometre travelled in the booking office. Currently 1.35 Czech crowns per kilometre. Approx 5 pence. Time tables have distances printed alongside station names. Where a day return is valid for return journeys up to midnight on the following day for a little above a single fare. First class is simply 50% more. The timetable and information is available online or via mobile. The timetables are the same for every day of the week including Saturdays and Sundays. Trains run well to timetable, although they could do with some refurbishment! (In hand). There is a range of railcards at various prices according to the discount you require. Also a “Kilometricka Banka” where you earn free travel according to the amount of travel in one year. That’s what you get from Ceske Drahy, a state owned system which concentrates on service. It also runs at a profit.

  24. I support you in this, however:

    …“Association of Train Operating Companies”. Their name is confusingly similar to “Network Rail”…

    They’re not remotely similar :/

  25. I’ve just read your blog. I know it’s been a long time. Wondered if you’d seen this old article

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.