The purpose of this service is to share data of trains operating in Finland. The service is operated by Fintraffic. The data is sourced from the following applications used in traffic controlling and capacity management:

Using the data from this service, it is possible to answer the following questions:
- Is my train on schedule?
- What is the location of my train at the moment?
- Which train can I use to travel from A to B on date C?
- Which trains are departing and arriving next from a specific station?
- What kind of wagons and locomotives does my train consist of?
- What kind of services does a train provide?
- Was my train on schedule for example two months ago?
English version of the documentation page contains only GraphQL and Swagger (in a short form). You might get more information using Google Translate with the Finnish documentation
Index
GraphQL
Resources:
- GraphiQL, online tool for testing and developing GraphQL-queries
- Schema, contains available Queries, Types etc.
Examples
All trains from the operator “vr” and their latest locations with speed over 30 km/h Try
{
currentlyRunningTrains(where: {operator: {shortCode: {equals: "vr"}}}) {
trainNumber
departureDate
trainLocations(where: {speed: {greaterThan: 30}}, orderBy: {timestamp: DESCENDING}, take: 1) {
speed
timestamp
location
}
}
}
All trains from a specific departure date, with operator “vr” and “commuter line” not equal to “Z”, ordered by train number Try
{
trainsByDepartureDate(
departureDate: "2020-10-05",
where: {and: [ {operator: {shortCode: {equals: "vr"}}}, {commuterLineid: {unequals: "Z"}}]},
orderBy: {trainNumber: DESCENDING})
{
trainNumber
departureDate
commuterLineid
operator {
shortCode
}
}
}
All running trains ordered by operator and train number Try
{
currentlyRunningTrains(orderBy: [{operator:{shortCode:ASCENDING}},{trainNumber:ASCENDING}]) {
operator {
shortCode
}
trainNumber
}
}
Trains that pass through “YLÖ” Try
{
trainsByDepartureDate(departureDate: "2020-10-06",
where: {timeTableRows:{contains:{station:{shortCode:{equals:"YLÖ"}}}}}
) {
trainNumber
departureDate
timeTableRows {
station {
name
uicCode
}
}
}
}
Passenger information messages related to trains on a specific date
{
passengerInformationMessages(
where: {trainDepartureDate: {equals: "2024-06-11"}}
) {
trainNumber
video {
text {
fi
sv
en
}
}
audio {
text {
fi
sv
en
}
}
}
}
Swagger
GTFS
.zip files are generated daily around 5:00 and should be ready no later than 7:00. Packages include all current and future trains
- GTFS for passenger trains: https://rata.digitraffic.fi/api/v1/trains/gtfs-passenger.zip
- GTFS for passenger trains, no pass-by stops: https://rata.digitraffic.fi/api/v1/trains/gtfs-passenger-stops.zip
- GTFS for all trains: https://rata.digitraffic.fi/api/v1/trains/gtfs-all.zip
- GTFS-RT locations: https://rata.digitraffic.fi/api/v1/trains/gtfs-rt-locations
- GTFS-RT updates: https://rata.digitraffic.fi/api/v1/trains/gtfs-rt-updates
If you are using real time feeds, then you should be using gtfs-passenger-stops.zip for matching stop_sequences. Real time feed is updated every 10 seconds.
Data is licensed under Creative Commons Attribution 4.0 International
NeTEx
https://rata.digitraffic.fi/api/v1/netex/FTR-netex.zip
NeTEx is a CEN standard for exchanging public transport information, such as timetables and routes, as XML. The package follows the Nordic NeTEx Profile and contains the planned timetables and routes of passenger trains.
The package is generated daily. It contains timetables for the last seven days and for the future until the end of next year. It has a shared file _FTR_shared_data.xml (operators, stops with their platforms and calendar) and one XML file per line, for example FTR_S-979_Helsinki-Turku.xml.
If some stops of a train are cancelled on certain days (partial cancellation), the package has a separate shortened journey for those days, without the cancelled stops.
The response headers x-timestamp (generation time) and x-is-fresh (true when the package is less than 25 hours old) tell how current the package is. The interface returns 404 if no package is available.
NeTEx gives the plan and SIRI gives the real-time changes to it.
Data is licensed under Creative Commons Attribution 4.0 International
SIRI
SIRI (Service Interface for Real Time Information) is a CEN specification (CEN/TS 15531) for exchanging real-time public transport data. The interfaces follow the Nordic SIRI profile (SIRI 2.0 schema). Each interface returns one XML document (application/xml):
/siri/et(Estimated Timetable) tells the deviations from the plan during the current operating day: estimated and actual times, cancellations, partial cancellations and platform changes: https://rata.digitraffic.fi/api/v1/siri/et/siri/vm(Vehicle Monitoring) tells the location and delay of passenger trains and the stop the train is approaching or standing at: https://rata.digitraffic.fi/api/v1/siri/vm/siri/sx(Situation Exchange) contains passenger information messages shown and announced at stations and on trains. A message relates to either a station or a train: https://rata.digitraffic.fi/api/v1/siri/sx
The documents are regenerated every minute. The response headers tell how current the document is:
x-timestampis the generation time of the document. For SIRI-SX it is the time of the last successful check.x-is-freshistruewhen the document is less than 5 minutes old.
Identifiers and times:
- Journeys, lines and operators use the same identifiers as the NeTEx package, so SIRI complements the plan in NeTEx with real-time information. The identifier prefix (codespace) is
FTR. - Platforms (ET and VM) and stations (SX station messages) use the identifiers of Fintraffic’s national stop registry (PETI). For example, a platform identifier is
FSR:Quay:415. - Times are in Finnish time.
SIRI-ET
- The document contains the trains of the operating day and trains from the previous day if they are still running. Only stops where passengers can board or alight are included.
- Stops already visited are in
RecordedCallelements and upcoming stops inEstimatedCallelements. - If the whole journey is cancelled, the
Cancellationfield of the journey istrue. If a single stop is cancelled, theCancellationfield of that stop istrue. - If a train does not stop at all planned stations (partial cancellation), NeTEx has a separate shortened journey for that day. SIRI-ET refers to that journey.
- A platform change is shown in the
StopAssignmentelement (planned and actual platform). - A train that is not published in the NeTEx timetable (for example a freight train) is not in the document.
- If the NeTEx data or the stop registry data is not available, a new document is not generated. The previous document stays available and
x-is-freshbecomesfalse.
SIRI-VM
- The document contains the latest location of each passenger train when it is at most 30 minutes old. The location is the same as in the GTFS-RT
gtfs-rt-locationsinterface. Delayis the estimated delay at the next stop. If the delay is not known, it isPT0S.MonitoredCalldescribes the next stop of the train, or the final stop if the train has already arrived.- A train that is not published in the NeTEx timetable is not in the document.
- If the NeTEx data is not available, a new document is not generated. The previous document stays available and
x-is-freshbecomesfalse.
SIRI-SX
- A message is published as soon as it is created, even if its validity has not started yet. The validity period is in the
ValidityPeriodelement. - A deleted message stays in the document for 5 hours with the state
closedand is then removed. - The message text (
Summary) is at most 160 characters. A longer text is truncated and the full text is in theDescriptionelement. The text may be available in Finnish, Swedish or English (FI,SV,EN). Not every language is necessarily present. - A station message refers to a station (
StopPlaceRef) and a train message to a train (FramedVehicleJourneyRef). A train message is published only when the journey of the train is found in the NeTEx data. SIRI-SX knows the journeys 14 days ahead, so a message for a departure date more than 14 days away can be delayed. - If the stop registry data is not available, a new document is not generated. If the NeTEx journeys are not available, train messages are left out, station messages are still published and the document stays fresh (
x-is-freshistrue).
Track work project and yearly plans
https://rata.digitraffic.fi/api/v1/yearly-plans/yearly-plans.json
https://rata.digitraffic.fi/api/v1/project-plans/project-plans.json
Track work project and yearly plans are available as static JSON datasets from the above URLs.
Data is updated from the source system once per day.
Dataset descriptions are available in JSON Schema format:
https://github.com/tmfg/digitraffic-cdk/blob/master/rail/yearly-plans/src/model/schema.ts