Getting started

Your first request

From key to response in under a minute.

1. Get your key

Your keys are in the dashboard under API keys. You get two kinds — see API keys for the difference. For a server call, use a live key.

2. Call the API

Bash
curl "https://api.danskadresseapi.dk/dawa/autocomplete?q=rådhuspladsen+1" -H "Authorization: Bearer YOUR_KEY"

3. Read the response

The response has the same shape as DAWA's own autocomplete (shortened here):

JSON
[
  {
    "type": "adresse",
    "tekst": "Rådhuspladsen 1, 1550 København V",
    "data": {
      "id": "0a3f50a7-9c1c-32b8-e044-0003ba298018",
      "vejnavn": "Rådhuspladsen",
      "husnr": "1",
      "postnr": "1550",
      "postnrnavn": "København V"
    }
  }
]

data.id is the address's DAR id. Store that rather than the address text: texts change when roads are renamed or postcodes are reorganised, but the id points to the same address.

Next

Using autocomplete in a field? Call it on every keystroke and show tekst directly. Validating an address a user has already typed? Use /dawa/datavask/adresser?betegnelse=… — it finds the best-matching address and tells you how certain the match is.