Trafiklab Stop Lookup
betaObs: 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.
What does this API provide?
Trafiklab Stop Lookup provides information about stops for the Trafiklab realtime APIs.
Data format
The data is formatted as JSON.
Updates
The static data used for this API is updated when changes are made, at most once per day.
Breaking changes
This API has the beta status. We are actively developing this API based on user feedback. Minor breaking changes may occur on short notice. New fields may be added without warning.
Using Trafiklab Stop Lookup
Trafiklab Stop Lookup consists of two different endpoints, one to list all stops and one to search for stops by name. Both endpoints have the same response structure. They return a list of stops, including information about each stop, such as name, average departures and child-stops. The stops in the list can be of two different types, rikshållplatser and meta-stops.
Rikshållplatser
Rikshållplatser, Swedish for “national stops”, is the historical name for a grouping of multiple local stops under one name and id. This is done to avoid duplicate stops when they are considered to be one stop by travelers. For example are certain multimodal stops, where a bus stop and tram stop may be at the same location.
Meta-stops
Meta-stops are groups of multiple nearby stops. This is done to simplify route-planning for travelers. An example meta stop is “Stockholm” which combines train, metro, tram and bus stops in central stockholm. This way, travelers can easily search a route “from Göteborg to Stockholm” without having to know about all the local stops. Meta-stops are also used for combining multi-modal stops which are more spread out, such as Sundbyberg Station along with its two bus stops (on different sides of the station) as well as its metro stop.
One example of a rikshållplats is Slussen, which contains one area for buses and one area for metro traffic. Both are included when looking up slussen by its area id, and each departure can be linked to one of these stops. The Trafiklab realtime APIs take the id of a rikshållplats or meta-stop, not the id of underlying stops! In this example, the area (as named in gtfs), represent the National Stop Group (rikshållplats) you will receive in the response.

Making a request
The first call will show all stops that has a name matching the searched value, in this case “sto”. The stops are sorted by the most frequent daily departures. In this case the meta stop “Stockholm” will show up first, with all associated information.
In order to list all stops, use the second call. This will return all stops, sorted by the most frequent daily departures.
Call
1https://realtime-api.trafiklab.se/v1/stops/name/sto/?key=API_KEY
1https://realtime-api.trafiklab.se/v1/stops/list?key=API_KEY
Request parameters
This API makes use of path parameters. They are part of the URL path and must be in the correct order.
1https://realtime-api.trafiklab.se/v1/stops/name/{searchValue}?key={key}
1https://realtime-api.trafiklab.se/v1/stops/list/?key={key}
Name | Type | Data type | Required | Description |
---|---|---|---|---|
name | Path | String | Yes | The search value to match the name of the stop group you want to look up. Must be minimum 3 characters long. |
key | Query | String | Yes | Your API key |
Response
The responses consist of 3 parts:
- The timestamp at which the response was created
- Information about the query (search value, which time was requested)
- Information about the stops included in the response
Precise technical documentation is available in the form of an OpenAPI specification on the bottom of this page.
1{
2 "timestamp": "2025-05-02T15:10:56",
3 "query": {
4 "queryTime": "2025-05-02T15:10:56",
5 "query": "sto"
6 },
7 "stop_groups": [
8 {
9 "id": "740098000",
10 "name": "Stockholm",
11 "area_type": "META_STOP",
12 "average_daily_stop_times": 3198.92,
13 "transport_modes": [
14 "BUS",
15 "TRAIN",
16 "TRAM",
17 "METRO"
18 ],
19 "stops": [
20 {
21 "id": "1",
22 "name": "Stockholm Centralstation",
23 "lat": 59.331537,
24 "lon": 18.054943
25 },
26 {
27 "id": "1617",
28 "name": "Stockholm City",
29 "lat": 59.331139,
30 "lon": 18.059447
31 },
32 {
33 "id": "12275",
34 "name": "T-Centralen",
35 "lat": 59.33212,
36 "lon": 18.062138
37 },
38 {
39 "id": "12736",
40 "name": "T-Centralen",
41 "lat": 59.332098,
42 "lon": 18.061943
43 },
44 {
45 "id": "12816",
46 "name": "Centralen",
47 "lat": 59.33114,
48 "lon": 18.058496
49 },
50 {
51 "id": "9825",
52 "name": "T-Centralen",
53 "lat": 59.33166,
54 "lon": 18.061694
55 },
56 {
57 "id": "12112",
58 "name": "Cityterminalen",
59 "lat": 59.331616,
60 "lon": 18.055317
61 },
62 {
63 "id": "11008",
64 "name": "Cityterminalen",
65 "lat": 59.332644,
66 "lon": 18.053989
67 },
68 {
69 "id": "68747",
70 "name": "Kulturhuset",
71 "lat": 59.332463,
72 "lon": 18.06344
73 },
74 {
75 "id": "10004",
76 "name": "Centralen",
77 "lat": 59.331047,
78 "lon": 18.056514
79 },
80 {
81 "id": "622",
82 "name": "Cityterminalen",
83 "lat": 59.332161,
84 "lon": 18.054308
85 }
86 ]
87 },
88 {
89 "id": "740022197",
90 "name": "Karlstad Residenstorget",
91 "area_type": "RIKSHALLPLATS",
92 "average_daily_stop_times": 1411.87,
93 "transport_modes": [
94 "BUS"
95 ],
96 "stops": [
97 {
98 "id": "41045",
99 "name": "Karlstad, Residenstorget",
100 "lat": 59.380671,
101 "lon": 13.499573
102 }
103 ]
104 }
105 ]
106}
1{
2 "timestamp": "2025-05-02T16:12:50",
3 "query": {
4 "queryTime": "2025-05-02T16:12:50",
5 "query": null
6 },
7 "stop_groups": [
8 {
9 "id": "740050707",
10 "name": "Krigtjärnsvägen",
11 "area_type": "RIKSHALLPLATS",
12 "average_daily_stop_times": 5.17,
13 "transport_modes": [
14 "BUS"
15 ],
16 "stops": [
17 {
18 "id": "70787",
19 "name": "Krigtjärnsvägen",
20 "lat": 59.950485,
21 "lon": 14.938174
22 }
23 ]
24 },
25 {
26 "id": "740049719",
27 "name": "Tynninge",
28 "area_type": "RIKSHALLPLATS",
29 "average_daily_stop_times": 13.43,
30 "transport_modes": [
31 "BUS"
32 ],
33 "stops": [
34 {
35 "id": "70164",
36 "name": "Tynninge",
37 "lat": 59.084528,
38 "lon": 15.260689
39 }
40 ]
41 },
42 {
43 "id": "740050708",
44 "name": "Dalkarlstorp",
45 "area_type": "RIKSHALLPLATS",
46 "average_daily_stop_times": 5.17,
47 "transport_modes": [
48 "BUS"
49 ],
50 "stops": [
51 {
52 "id": "70788",
53 "name": "Dalkarlstorp",
54 "lat": 59.95859,
55 "lon": 14.932681
56 }
57 ]
58 },
59 {
60 "id": "740025749",
61 "name": "Molkom, Vårdcentralen",
62 "area_type": "RIKSHALLPLATS",
63 "average_daily_stop_times": 26.72,
64 "transport_modes": [
65 "BUS"
66 ],
67 "stops": [
68 {
69 "id": "39825",
70 "name": "Molkom, Vårdcentralen",
71 "lat": 59.600446,
72 "lon": 13.722023
73 }
74 ]
75 }
76 ]
77}
Response data fields
NationalStopGroupResponse
Name | Data type | Description |
---|---|---|
timestamp | String | The timestamp. |
query.queryTime | String | The time for which the stops are requested. |
query.query | String | The queried search value to match the stop name (null if no search value is given). |
stop_group | StopGroup[] | The stop groups which are included in the query, one or more. |
stop_group.id | String | The stop group id. |
stop_group.name | String | The stop group name. |
stop_group.area_type | String | The stop group area type (metastop or rikshallplats). |
stop_group.avarage_daily_stop_times | Float | The average daily departures from the stop area. |
stop_group.transport_modes | String | Transport modes stopping at this stop. This is based on actual traffic in the current timetable period. If a stop does not have traffic in the current timetable period, this array will be empty. |
stop_group.stops | Stop[] | Child stops included in the stop group. |
Stop
Name | Data type | Description |
---|---|---|
id | String | The stop id. |
name | String | The stop name. |
lat | String | The stop latitude (WGS84, decimal degree). |
lon | String | The stop longitude (WGS84, decimal degree). |
License
The Trafiklab Timetables API is available under the CC-BY 4.0 license. You should mention the data is provided by Trafiklab.se.
You are free to:
- Share — copy and redistribute the material in any medium or format for any purpose, even commercially.
- Adapt — remix, transform, and build upon the material for any purpose, even commercially.
- The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
- Attribution — You must give appropriate credit , provide a link to the license, and indicate if changes were made . You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation .
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
https://creativecommons.org/licenses/by/4.0/legalcode.txt---