node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey ยป


Journey Planner and Fares Build Status

The Journey Planner and Fares (JPAF) calculates fares and their validity on journeys from the Journey Planner.

The JPAF service is specific to British rail fares and relies on data from Rail Delivery Group. The rules around journey/fare validity are very specific to British rail and are not useful for other data sets.

Journey Validity

At present JPAF checks the validity of the journeys on:

  • the route of the fare (according to the fares data)
  • restriction code of the fare
  • validity period of the ticket type (for returns)

It does not check

  • the rules according to the National Routing Guide (the data feed is not public)
  • Advance fare availability (also not public information)


  • apply TOC specific ticket rules
  • break of journey in restriction header
  • London terminals mapping
  • Weekender outward validity


npm test


npm start


Issues and PRs are very welcome.


This software is licensed under GNU GPLv3.

Copyright 2017 Linus Norton.