Trafikverket API Öppna Data – järnväg (TrainAnnouncement, TrainPosition, TrainStation)
Open API provided by Trafikverket, the Swedish Transport Administration, offering real-time and planned data on Swedish rail traffic. It includes TrainAnnouncement (planned, estimated and actual arrivals and departures per station, schema 2.0), TrainPosition (live train positions, järnväg.trafikinfo 1.1), and TrainStation (station data, rail.infrastructure 1.5), along with related datasets such as TrainStationMessage, OperativeEvent and RailwayEvent. Queries are submitted via POST requests to the /v2/data.json or /v2/data.xml endpoints. Access requires a free account and an API key, making the service suitable for developers and transport applications needing current Swedish railway information.Trafikverket's open API for live Swedish rail traffic: TrainAnnouncement (planned, estimated and actual arrivals/departures per station, schema 2.0), TrainPosition (live train positions, järnväg.trafikinfo 1.1), TrainStation (stations, rail.infrastructure 1.5), plus TrainStationMessage, OperativeEvent and RailwayEvent. Queries are POSTed to /v2/data.json or /v2/data.xml; a free account and API key are required to fetch data.
Trust score
How is this computed?Weighted across five axes. Tap a ring for what it measures.
Data quality
Data access
The source couldn't be reached to read its schema — it may require authentication or be temporarily offline.
Verification Status
Requests to api.trafikinfo.trafikverket.se through this register, last 30 days
Day by day on the status pageUsing the API
Configuration
- Base URL
- https://api.trafikinfo.trafikverket.se/v2/data.json
Query examples
Stored only in this browser. Runs go directly from your browser to the API — the key is never sent through our servers.
curl -s 'https://api.trafikinfo.trafikverket.se/v2/data.json' -H 'Accept: application/json'Base API endpoint — see the documentation for available routes.
Machine-readable & source
Embed this badge in a README or wiki — it always shows the latest verification state and ranking tier.