Stops 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 stops data API contains detailed data of Sweden’s national stops and their mappings to stops from the GTFS Regional and Netex Regional APIs.

All of Sweden’s stops are included in this dataset.

Where to download

The dataset can be accessed through the following URL:

https://opendata.samtrafiken.se/stopsregister-netex-sweden/sweden.zip?key={apikey}.

Replace {apikey} with your own stops data 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

What does this dataset contain?

This dataset contains all of Sweden’s stops in the NeTEx format. There are multiple different KeyValue-elements for each StopPlace and Quay which contain information that does not fit into any standard Netex elements. Many of these extra KeyValue-elements are mostly useful for operators consuming the data.

This data is based on the data available in the regional data feeds ( GTFS Regional, Netex Regional) and enriched by Samtrafiken. If you are interested in the original data for a specific PTA, please see the regional datasets.

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.

KeyValues explained

Most of the KeyValues refer to DataSource IDs. These IDs can currently be transformed to actual datasources/authorities through the NeTEx Sweden API , by mapping the DataSource IDs to Authority.PrivateCode in the _shared_data.xml file. In the future we are going to provide a better way of matching DataSource IDs to datasources/authorities.

The Keys that are used for mappings all start with the name local- and are pipe symbol separated and then colon symbol separated values. For example a StopPlace with the Key local-number with the Value 7:64204|12:7051|74:40|8:64204|100:4 should be interpreted as list of five different values, where each part is further interpreted by separating by the colon symbol, 7:64204 meaning datasource 7 has local number 64204 for this stop. The table below explains the meaning of each Key-Value.

“Gid” matches part of the StopPlace.Id (or Quay.Id) in Netex Regional, as well as the stop_id from stops.txt in GTFS Regional.

KeyExplanation
ownerThis value indicates which datasource should be considered the owner of this StopPlace and its Quays.
Often this is the county’s public authority in which the StopPlace resides.
data-fromWhich datasource actually provides the data for this StopPlace and its Quays.
rikshallplatsSamtrafikens Rikshållplatsnummer for this StopPlace, which is used in the GTFS Sverige 2 API (and other places).
trafikverket-nameThis StopPlace’s name as assigned by Trafikverket.
trafikverket-signaturesThis StopPlace’s signature as assigned by Trafikverket. There can be multiple signatures using pipe character “|” between each signature.
preliminaryIndicates that this StopPlace has not been validated and might be subjected to change.
stip.*Any Keys starting with “stip.” refers directly to values found in the “data-from” datasource’s corresponding data.
local-nameFormat is DataSource:Gid:Name.
local-gidFormat is DataSource:Gid.
local-numberFormat is DataSource:Number.
local-journeypatternpoint-gidFormat is DataSource:Gid.
local-stoppoint-gidFormat is DataSource:Gid.
local-designationFormat is DataSource:Designation.
sellableThis value will be true if the StopPlace is sellable through samtrafiken systems, and false if not.

How often is this dataset updated?

The data in this dataset is updated on a daily basis, typically between 07:50 and 9:00.

How often does the data format changes? Do breaking changes happen?

This dataset has the stable status. This means that we will communicate when fields are added, or changed. When breaking changes are made, you will get three months or more to update your implementations.