SNCF Connect unofficial API: search train journeys and fares
Automatically search train journeys and fares on sncf-connect.com. An unofficial SNCF Connect API for train search: SNCF Connect has no public API for journeys and fares, and this returns them as JSON, programmatically. Search trains between two cities or stations on a given date via SNCF Connect. Returns each journey (times, duration, operator, best price) with all of its fare offers (class, fare name, price, flexibility label, and the exchange and refund conditions as SNCF writes them). No journeys means no tickets are on sale for that date. An unknown station fails with an error asking you to check its spelling.
Input
date requiredOutward date YYYY-MM-DD
origin requiredDeparture city or station, e.g. 'Turin' or 'Paris Gare de Lyon'
destination requiredArrival city or station, e.g. 'Paris'
Output
date requiredorigin requiredjourneys requireddestination requiredFAQ
Get the signed-in SNCF Connect user
Report which SNCF Connect account this browser is signed in as: name and email from the account's personal space. When the browser is not signed in to SNCF Connect, the run fails with a signed-out error asking you to sign in, then retry.
Cancel a pending SNCF Connect train option (pre-reservation)
Cancels a pending free option (pre-reservation) on SNCF Connect, releasing the hold it placed on a train's price and seat. Defaults to a dry run: it reports the option it would cancel and backs out without touching it. Pass confirm=true to actually cancel, which is irreversible — the blocked price is lost. When more than one option is pending, `match` picks the right one by part of its destination and/or travel date. Requires being signed in to SNCF Connect. Runs only via the local browser extension, not the hosted cloud browser.
Remove train ticket from SNCF Connect cart
Remove a specific train ticket from the SNCF Connect cart (or the only one if there's just one). Requires login. Pass `match` (substring of origin/destination, e.g. "Bordeaux") to pick which item when the cart has several; omitted `match` is fine only when exactly one item is in the cart. Confirms the site's own removal dialog. To empty the whole cart, call once per item. Runs only via the local browser extension, not the hosted cloud browser.
