# GET /v1/profiles

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

operationId: `listProfiles`. The routing profiles.
Tag: `registries`.

Every routing profile: its mode and metric, whether it takes a vehicle, and whether it is experimental. Read it before you hard-code a profile name. It costs a request and no calculation.

## Request

`GET https://api.kartpunkt.se/v1/profiles` 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
{
  "profiles": [
    {
      "name": "walk",
      "mode": "walk",
      "metric": "shortest",
      "description": "On foot, the shortest way by length: every network but motorways, motortrafikleder and ferries, undirected.",
      "takes_vehicle": false,
      "experimental": false
    },
    {
      "name": "car_shortest",
      "mode": "car",
      "metric": "shortest",
      "description": "By car, the shortest way by length, keeping every forbidden direction and turn and never turning back on an edge: the shortest legal road distance.",
      "takes_vehicle": false,
      "experimental": false
    },
    {
      "name": "car_fastest",
      "mode": "car",
      "metric": "fastest",
      "description": "By car, the quickest way at free flow: NVDB's posted limit per direction, else the functional class's default; no traffic, no time of day.",
      "takes_vehicle": false,
      "experimental": false
    },
    {
      "name": "hgv",
      "mode": "car",
      "metric": "fastest",
      "description": "A heavy goods vehicle or, with vehicle.kind bus, a bus, quickest at free flow capped at 80 km/h, kept off roads and turns NVDB closes to its kind in the direction travelled (a road closed to through traffic only is driven only in the zone an end lies in, marked destination_only) and, given the vehicle, off weight, axle-load, height, width and length limits below it, roads whose bearing class carries less than its own, and dangerous-goods bans. Verified on the national NVDB delivery by the restriction tests (scripts/hgv-production.ts); a lorry ban NVDB records one way only is kept off in both directions, and time windows are reported, not routed around.",
      "takes_vehicle": true,
      "experimental": false
    },
    {
      "name": "bike",
      "mode": "bike",
      "metric": "shortest",
      "description": "By bicycle, the shortest way by length, timed at one pace of 16 km/h: the cycle network, walk and cycle paths NVDB calls cycleable and every road but motorways, motortrafikleder and ferries, keeping each forbidden direction and turn and every traffic ban NVDB records for vehicles or bicycles unless it exempts bicycles (a road closed to through traffic only is ridden only in the zone an end lies in, marked destination_only). No barrier stops it. Experimental until checked on the national network.",
      "takes_vehicle": false,
      "experimental": true
    }
  ],
  "provenance": {
    "synthetic": true,
    "sources": []
  }
}
```

- `profiles` (array of object): Every profile the API answers on.
  - `name` ([Profile](https://api.kartpunkt.se/docs/shapes/Profile.md))
  - `mode` ("walk" | "bike" | "car"): Who travels: 'walk' on foot, 'bike' by bicycle, 'car' a motor vehicle, hgv's lorries and buses included.
  - `metric` ("shortest" | "fastest"): What a path minimises: 'shortest' its length, 'fastest' its free-flow duration.
  - `description` (string): Which roads the profile uses and how it weighs a path.
  - `takes_vehicle` (boolean): true when the profile takes a vehicle; any other profile refuses one.
  - `experimental` (boolean): true while the profile is not yet verified on the national network; its answers then say provenance.network.experimental: true.
- `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.
