About 5 years ago I worked for the guys [1] that provide the journey planning api behind NRE, the train line and most other UK rail journey planners.
We built a public api that as far as I know is still running. It was pretty usable and the pricing was reasonable.
There was always a sticking point about NRE letting us expose the real time data though - hopefully this has now been resolved.