# GET /v1/tilesets

> Index: https://kartpunkt.se/llms.txt

operationId: `listTilesets`. NVDB vector tiles.
Tag: `registries`.

The NVDB vector tiles of the network served now: a PMTiles archive for MapLibre, with speed limit, owner, surface, class, bearing class, lighting, fast_road and vehicle limits on each road and path. Use it to draw the network on a map; for one road's facts, use GET /v1/roads/{ref}. It costs a request and no calculation.

## Request

`GET https://api.kartpunkt.se/v1/tilesets` with `Authorization: Bearer $KARTPUNKT_API_KEY`, from your backend (never browser code: the key would leak, and CORS is not enabled).

## Response 200

Example:

```json
{
  "tilesets": [],
  "provenance": {
    "synthetic": true,
    "sources": []
  }
}
```

- `tilesets` (array of object): The tilesets of the network served now; empty while none is built.
  - `name` (string): The tileset's name.
  - `url` (string): The PMTiles archive: read it with the pmtiles protocol in MapLibre. The URL names its snapshot and never changes; CORS is open (NVDB is CC0).
  - `network` (string): The network snapshot the tiles were built from.
  - `source_date` (string | null): The NVDB delivery date (YYYY-MM-DD) of that snapshot.
  - `minzoom` (number): The lowest zoom level the archive holds.
  - `maxzoom` (number): The highest zoom level the archive holds.
  - `layers` (array of object): The archive's vector layers.
    - `id` (string): The vector layer's id.
    - `attributes` (array of string): The attributes its features carry.
- `provenance` ([Provenance](https://api.kartpunkt.se/docs/shapes/Provenance.md))

## Errors

Every error is `{ error, message, param?, doc_url }`; `message` says what to do next. All codes: [https://api.kartpunkt.se/errors](https://api.kartpunkt.se/errors). What to do on each, with retries: [https://api.kartpunkt.se/docs/recipes/errors-and-retries.md](https://api.kartpunkt.se/docs/recipes/errors-and-retries.md).

- [`invalid_request`](https://api.kartpunkt.se/errors/invalid_request) (400): The request does not match the API schema. Fix the fields named in this message; see /openapi.json.
- [`unauthorized`](https://api.kartpunkt.se/errors/unauthorized) (401): Missing or unknown API key. Send it as 'Authorization: Bearer <key>' (or 'x-api-key'), read from the KARTPUNKT_API_KEY environment variable. The user creates a kp_test_ key on their Kartpunkt account page (https://kartpunkt.se/konto) and puts it in KARTPUNKT_API_KEY themselves; never ask them to paste a key into chat.
- [`live_access_required`](https://api.kartpunkt.se/errors/live_access_required) (403): This account is not approved for live data: kp_live_ keys are for customers under contract. Use a kp_test_ key. To ask for live access, the account holder writes to hej@kartpunkt.se, or orders a plan at https://kartpunkt.se/konto#plan.
- [`quota_exceeded`](https://api.kartpunkt.se/errors/quota_exceeded) (429): Request limit or plan quota reached (per minute, per day, or the account plan's monthly quota). Wait the number of seconds in the Retry-After header, then retry; without Retry-After, no wait helps: tell the account holder what this message says.
- [`internal_error`](https://api.kartpunkt.se/errors/internal_error) (500): Something failed on our side. Retry after a few seconds; if it keeps failing, contact hej@kartpunkt.se.
- [`live_data_unavailable`](https://api.kartpunkt.se/errors/live_data_unavailable) (503): Live data is not available yet: it opens when Kartpunkt's import of Lantmäteriet's address register completes. Use a kp_test_ key until then.

## Limits

none

## Metering

A request only: no calculations, no live call, no address limit.
