Skip to content

Publish the Interrail reservation fees for SNCF trains - #11

Open
davd-gzl wants to merge 1 commit into
mainfrom
interrail-fees
Open

davd-gzl wants to merge 1 commit into
mainfrom
interrail-fees

Conversation

@davd-gzl

@davd-gzl davd-gzl commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Before: the API says every SNCF train needs an Interrail pass-holder reservation, but not what it costs.

After: v1/sncf/interrail/fees.json gives the pass-holder fee for every SNCF train, in euros, 2nd class. For example, a TGV INOUI inside France costs €10–20, a TGV to Germany €19, Lyria €25 and a TGV to Italy €31. The Interrail entry in index.json points to it with fees.

How

  • Table. src/operators/interrail-fees.ts is hand-entered from Interrail's domestic, international and night train fee pages, checked on 2026-10-12. Nothing is scraped.
  • Rule. If a stop is abroad, that country's international fee applies. Otherwise the axe sets the domestic fee, so a stretch of a Milan TGV inside France counts as domestic. SNCF coaches have no fee. sncfInterrailFee applies this rule, and docs/format.md documents it for clients.
  • Docs. docs/format.md and docs/openapi.yaml describe the new file and the fees field.

Checks

npm run check passes: typecheck and 35 tests, including tests/fees.test.ts. It covers stop matching (Bernay is not Bern), domestic, international and Spain fees, and the published file and index pointer.

Refs offware-apps/MAX-Finder#92

A new v1/sncf/interrail/fees.json gives what a pass holder pays to reserve each SNCF
train, in euros, 2nd class, hand-entered from Interrail's fee pages: a stop abroad sets
the international fee for its country, otherwise the axe sets the domestic one. The
Interrail pass entry in index.json points to it with fees.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant