Railway Transport for France API
Overview
The SNCF Railway API provides access to French national rail data including train schedules, station information, and real-time disruptions. You need a free API key from the SNCF developer portal to authenticate. It is great for building travel planners focused on French rail journeys.
Beginner Tip
Request your free API key at digital.sncf.com. The API is built on Navitia, so the endpoint structure and authentication (HTTP Basic Auth with key as username) are the same.
Available Data
Example Response
{
"route": "Line 1",
"origin": "Station A",
"destination": "Station B",
"departure": "08:30",
"arrival": "09:15",
"status": "On Time",
"delays_min": 0
} Field Reference
stop_areas List of train stations or stop areas matching the query, each with an ID and name id Unique identifier for the stop area, used to request departures or arrivals name Human-readable name of the station (e.g., "Paris Gare de Lyon") coord Geographic coordinates (lat/lon) of the station departures List of upcoming train departures from a stop, including destination and scheduled time Implementation Example
// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://www.digital.sncf.com/startup/api";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →AIS Hub
AIS Hub aggregates real-time Automatic Identification System data from a global network of shore-based receivers to track marine vessels.
AZ511
AZ511 is the official Arizona Department of Transportation traffic data API providing real-time road conditions, incidents, and camera information for Arizona highways.
Bay Area Rapid Transit
⭐ Beginner's PickThe BART API provides real-time train arrival predictions, station information, and service advisories for the Bay Area Rapid Transit system in the San Francisco Bay Area.
BlaBlaCar
BlaBlaCar provides programmatic access to search car sharing trips via REST API.
Boston MBTA Transit
⭐ Beginner's PickThe Boston MBTA Transit API gives you real-time data for the Massachusetts Bay Transportation Authority, including train, bus, and ferry arrivals.