Static data

Obs: Detta innehåll finns inte tillgängligt på svenska. Därför ser du engelska versionen. Om du tycker att denna sida borde översättas till svenska, kan du skriva till oss på support.trafiklab.se.

Om du vill se webbsidan på engelska, klicka här.

The static NeTEx Regional dataset contains files describing all planned public transport data, with more technical details compared to the GTFS Regional feeds.

In order to retrieve the static data you need an API key. Technical details for fetching the data can be found in the API’s OpenAPI specification.

Where to download

The dataset can be accessed through the following URL:

https://opendata.samtrafiken.se/netex/{operator}/{operator}.zip?key={apikey}.

Replace {operator} with the abbreviation of the operator you want to download. These abbreviations can be found in the OpenAPI specification, but are also listed on the overview page for this API. Replace {apikey} with your own API key. If you don´t have a key yet, read here on how to get one.

API key levels

LevelMaximum calls per minuteMaximum calls per month
Bronze1050
Silver10250
Gold202500

Example download URLs

Below are some example download URLs. For a complete list all operators with data available, check the overview page for this API.

Regional operators

OperatorStatic data
Skånetrafiken (Skåne län)https://opendata.samtrafiken.se/netex/skane/skane.zip?key=
SL (Stockholm län)https://opendata.samtrafiken.se/netex/sl/sl.zip?key=
UL (Uppsala län)https://opendata.samtrafiken.se/netex/ul/ul.zip?key=
Östgötatrafiken (Östergötlands län)https://opendata.samtrafiken.se/netex/otraf/otraf.zip?key=

Commercial operators

OperatorPlanerad trafik
SJ + Snälltåget + Tågabhttps://opendata.samtrafiken.se/netex/sj/sj.zip?key=

Data format

The data is in the NeTEx (Network and Timetable Exchange) format. This is a format in which all European operators have to publish their data. The data is aimed at both operator-to-traveller communication and internal communication between different organizations. Samtrafiken follows the Nordic NeTEx Profile, which is documented by Entur.

For more technical information about Stops data, please visit Samtrafiken Open Data - NeTEx.

File structure

Each archive contains three types of files:

  • _shared_data.xml - contains common information, such as calendar schedules
  • _stops.xml - contains information about stops, such as quays, stop areas and entrances
  • line_[lineNumber].xml - contains the specific schedule for a line

Important details

  • Your HTTP client has to have support for Gzip or deflate compression. This needs to be signalled through the HTTP Accept header. If your client does not support this, or is configured incorrectly, you will receive an HTTP 406 error code
  • This API supports conditional requests, and sends out HTTP Last-modified and etag headers. This way you can prevent downloading the same data twice. See the conditional get requests chapter in our best practices for more information.