Required for the get_transit tool when routing trips outside Ile-de-France (TGV, TER, Intercites). Also works as a fallback for IDF trips if no PRIM key is configured.
- Go to numerique.sncf.com/startup/api
- Click S'inscrire (Sign Up) or Se connecter (Sign In)
- Create an account (email + password)
- Once logged in, go to your dashboard
- Find the Navitia / Calcul d'itineraires API
- Subscribe to the free plan
- Copy your API token
Alternative direct link: ressources.data.sncf.com
- Free: 5,000 requests/day
- No credit card required
Settings > Routing & Transit > SNCF section > paste the API key > Save
You can test with the built-in test button (Paris to Lyon route).
National rail network across all of France:
- TGV: high-speed trains (Paris-Lyon, Paris-Marseille, etc.)
- TER: regional trains
- Intercites: long-distance conventional trains
- Transilien: suburban trains (Paris region, as fallback)
- The SNCF API uses Navitia technology. Authentication is via the
Authorizationheader with the token directly (not Basic Auth). - Coordinate format:
longitude;latitude(semicolon separator, GeoJSON order) - The API also covers IDF transit (Metro, RER, Bus) but with less precision than the dedicated PRIM API