Season ticket API

Hi folks

Asking here because it’s related to TFL. I’m wondering if there is an API I can query to retrieve the cost of a daily/weekly/monthly/etc season ticket between two stations.

I’m aware of the single fare finder between two stations, but I would like to see this for season tickets - it does not necessarily have to be TFL (but I do not believe it has one). Something that is identical to the instant season ticket calculator on the National Rail Enquiries website: Instant Season Ticket Calculator - National Rail Enquiries

Thanks
Joe

@joe

The API version of the Single Fare Finder (“Stoppoint FareTo” ) will get you some data…

https://api.tfl.gov.uk/Stoppoint/910GLIVST/FareTo/940GZZLUTMH

But for reasons I can’t explain the data for the season tickets is in a PDF

The main problem is that not all Oyster-served (priced) stations have their Zone information in the expected Stoppoint data.

https://api.tfl.gov.uk/Stoppoint/910GLIVST

image

Understood, thanks for sending the PDF over.

I guess this means I would have to perform the lookup myself for what zones are between the two stations.

My problem with this is determining what zones are travelled between two stations. I.e. did the person travel inter-zone or via other zones? Such as travelling zone 3 to 3, did the person traverse in zones 1 or 2 to get to the destination.

That’s why I linked to the Single Fare Finder. It tells you if you need to go through Zone 1 or officially.

If you look at the price of the Peak Pay As You Go fare, you can see what the charge basis was. Compare with

If you want to play with this as a punter there is a human-version of the API here

That message seems to be displayed regardless of zone 1 travel or not. I just looked up West Croydon to Norwood Junction (zone 5 to 4) and that message displayed.

Regardless of zone 1 travel, let me review my example. Imagine zone 4 source to zone 4 destination; was it inter-zone 4 or did person travel through zone 2 or 3? That would be needed to determine whether the season ticket is zone 2-4, 3-4, or 4-4

@jdheyburn

Sorry, I posted the wrong thing the first time!

You just need to look for the “cost” of the…

  • type: Peak
  • descrption: Pay as you go
  • mode: tube

And look them up against this

image

And that will tell you if you need to include Zone 1 in your calculation.

Thanks @briantist, that gives me something to work on.

Is there a non-TFL API to retrieve the cost of journeys to/from unzoned stations?

@jdheyburn

Yes, there is a free service called the “Season Ticket Calculator” part of the National Rail Enquires API. See section 4.5 of https://www.nationalrail.co.uk/static/images/structure/css/NRE%20Feeds_Developer%20Pack%20v.01-05.pdf

You can get the relevant developer keys from National Rail Enquiries -