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.

NeTEx at Trafiklab

At Trafiklab, we offer three different NeTEx datasets. NeTEx regional and NeTEx Sweden offer the same coverage as GTFS regional and GTFS Sweden, which is not full coverage. If you are looking for 100% coverage we recommend GTFS Sverige 2, which is much less detailed but does contain all the public transport data of Sweden.

Our three datasets:

NeTEx Regional which consists of multiple NeTEx feeds, each feed containing data for a specific region or operator. This data contains all details present in GTFS Regional, as well as additional data which can’t be represented in GTFS. Both static and real-time data available.

NeTEx Sweden which is an aggregated dataset of all the different datasets in NeTEx Regional as a single feed. The feed contains all data present in GTFS Sweden, as well as additional data which can’t be represented in GTFS. Realtime SIRI data is not available for the aggregated static NeTEx data.

Stops data which is an API that contains detailed data of Sweden’s national stops and their mappings to stops from the GTFS Regional and Netex Regional APIs. This dataset contains all of Sweden’s stops in the NeTEx format.

You can see the general difference between GTFS Regional and NeTEx Regional data below.

GTFS Regional/ GTFS Sweden 3NeTEx Regional/ NeTEx Sweden
Coverage92%92%
Data qualityHigh quality, based on higher level of details than GTFS Sverige 2Highest quality, based on higher level of details than GTFS Regional
Real-time dataStatic + Real-time + GPS positionsStatic + Real-time + GPS positions / only static data for NeTEx Sweden
Historical data (static)Partly available in KodaNot available

Static data

File structure

The NeTEx dataset consists of three different types of files, described here below. For more technical information about each of these files, please visit Samtrafiken Open Data - NeTEx.

_shared_data.xml: This file contains common information, such as calendar schedules, authority and operator

_stops.xml: This file contains information about stops, such as quays, stop areas and entrances

line_[lineNumber].xml: This file contains the specific schedule for a line as well as information like route, transport mode, interchanges etc. There is one line file per 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.
Image: Lars Dareberg, Skånetrafiken