# Road distances for school-transport platforms

> For platforms that build school-transport (skolskjuts) products: road distances on foot or by car from many homes to 1 to 5 destinations, up to 200 pairs per call and 50,000 as a job, along Trafikverket's NVDB, with NVDB's facts along each route.
>
> https://kartpunkt.se/en/use-cases/school-transport

This page is for platforms that build school-transport (skolskjuts) products on Kartpunkt. Kartpunkt answers road distances and NVDB's facts along the roads; the rules your product applies stay in your product. `POST /v1/distances` answers road distances by a profile, on foot or by car, from homes to 1 to 5 destinations, up to 200 home–destination pairs in one call and 50,000 as a job, along Trafikverket's road network (NVDB).

## The call

Request:

```sh

curl -X POST https://api.kartpunkt.se/v1/distances \
  -H "Authorization: Bearer $KARTPUNKT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destinations":[{"point":{"lat":59.859904,"lon":17.644332,"street":"Järngatan"}}],"origins":[{"id":"home-1","point":{"lat":59.858268,"lon":17.642901,"street":"Bredstigen"}},{"id":"home-2","point":{"lat":59.862563,"lon":17.645463,"street":"Örnvägen"}}],"profile":"walk","facts":["fast_road","unlit_outside_built_up","crossings_without_refuge"]}'

```

Answer:

```json

{
  "avoid": null,
  "destinations": [
    {
      "id": null,
      "snap_m": 0.01,
      "street_matched": true
    }
  ],
  "results": [
    {
      "id": "home-1",
      "destination_id": null,
      "destination_index": 0,
      "status": "ok",
      "distance_m": 199.1,
      "duration_s": 143,
      "facts": {
        "fast_road": 0,
        "unlit_outside_built_up": 0,
        "crossings_without_refuge": 0
      },
      "avoid_m": null,
      "snap_m": 0.04,
      "street_matched": true,
      "destination_snap_m": 0.01,
      "destination_street_matched": true,
      "blocked_by": null,
      "alternatives": null
    },
    {
      "id": "home-2",
      "destination_id": null,
      "destination_index": 0,
      "status": "ok",
      "distance_m": 713.7,
      "duration_s": 514,
      "facts": {
        "fast_road": 0,
        "unlit_outside_built_up": 0,
        "crossings_without_refuge": 0
      },
      "avoid_m": null,
      "snap_m": 21.76,
      "street_matched": true,
      "destination_snap_m": 0.01,
      "destination_street_matched": true,
      "blocked_by": null,
      "alternatives": null
    }
  ],
  "provenance": {
    "synthetic": true,
    "network": {
      "id": "snap_01m45nmn6mfey8z9wvaf31nb9n",
      "dataset": "nvdb",
      "source_date": "2026-10-05",
      "built_at": "2026-10-05T09:17:11.764Z",
      "graph": "snap_01m45nmnryfey8z9x29xcd08tq",
      "profile": "walk",
      "experimental": false
    },
    "sources": [
      {
        "id": "nvdb",
        "name": "Trafikverket, NVDB",
        "licence": "CC0-1.0",
        "attribution": "Vägdata från NVDB, Trafikverket, CC0 1.0",
        "url": "https://creativecommons.org/publicdomain/zero/1.0/",
        "updated": "2026-10-05"
      }
    ]
  }
}

```

A test key's answer: the addresses are synthetic (`provenance.synthetic: true`), and `road` is NVDB's.

Each origin is answered in the order sent, with a status of its own, so one bad address never costs the others their answers. Each result is one home to one destination, with its `destination_id`. `walk` is the shortest way on foot, `car_shortest` the shortest legal road distance by car, and `car_fastest` the quickest way by car; each gives `distance_m` along the roads and `duration_s`, free-flow seconds (5 km/h on foot, the posted limits by car, no traffic).

## Facts along the route

Send the facts you need as `facts`, and each result's `facts` states NVDB's facts about its route: `fast_road`, the metres along roads of 70 km/h or more; `unlit_outside_built_up`, the metres outside built-up areas that are not on a lit path; `crossings_without_refuge`, crossings of roads of 60 km/h or more without a refuge; and `traffic_volume`, the traffic (ÅDT). It is not a verdict on whether the route is safe.

## Documented and dated with the network snapshot

Store each distance with its profile, its status and the answer's `provenance.network`: the network snapshot's id and its NVDB date. That documents and dates the distance with the road network it was computed on.

## Bus stops and routes

Send the same homes to `POST /v1/nearest` with `kind: "bus_stop"` to get each one's nearest bus stops on foot, and send `avoid` to `/v1/distances` to keep off stretches you name. `POST /v1/route` answers the route itself for one pair of points, as segments to draw on a map, each with its road reference and the facts you ask for.

## Protected identities

Never send people with skyddade personuppgifter (protected identities). Kartpunkt never logs or stores what you send: about a call it keeps only the key, the operation, the status, the response time and counts.

## Price

Road distances and routes count in calculations under Routes & distances: one per route or trace, one per origin per destination of a distance call, one per reach area, one per point of a nearest call and one per stop or shipment of an optimization or a plan check; a matrix counts half its cells, at most ten per point of the longer list. Utvecklare has 2,000 calculations a month on test keys, Bas includes 5,000 and Pro 50,000; the add-on gives 50,000 more on Bas or Pro. 200 origins, each to three depots, are 600 calculations as distances with road facts and 300 as a matrix. All prices are in Swedish kronor, excl. VAT.

| Plan | Price, excl. VAT | Includes |
| --- | --- | --- |
| Utvecklare | SEK 0 | 2,000 calculations a month; 1,000 test requests a day; Test addresses in the same format as live data; Jobs are included from Bas |
| Bas | SEK 490 a month | 5,000 calculations/month included; 25,000 live calls a month; 10,000 addresses a day; +50,000 calculations/month as an add-on |
| Pro | SEK 1,990 a month | 50,000 calculations/month included; 200,000 live calls a month; 50,000 addresses a day |
| Avtal | by quote | Vendors: priced per municipality; Operators: priced per vehicle; Network version and source in every answer; The API runs in the EU; Data processing agreement: draft on request |
| Routes & distances (add-on) | SEK 990 a month | 50,000 more calculations a month, on Bas or Pro |

[Create a test key](https://kartpunkt.se/konto) on your account page (the account pages are in Swedish), read [how to start](https://kartpunkt.se/en/developers), or see [all plans](https://kartpunkt.se/en/pricing).
