DanskAdresseAPIv1
Adresser

Autocomplete across addresses, street names and postal codes

Type-ahead across addresses, street names and postal codes — the endpoint an address field calls on every keystroke. Fuzzy and typo-tolerant. Narrow the result type with type and the geography with postnr.

GET/v1/autocomplete

Authentication

Authorizationstringheaderrequired

Your API key as a Bearer token.

Parameters

qstringqueryrequired

Free-text search (prefix + fuzzy).

typestringquery

Result type.

postnrstringquery

Restrict to a postal code.

per_sideintegerquery

Results per page. The limit is set per endpoint — see default and maximum.

Request

curl --request GET \
  --url "https://api.danskadresseapi.dk/v1/autocomplete" \
  --url-query "q=<q>" \
  --header "Authorization: Bearer $API_NOEGLE"

Response

application/json

Liste af forslag

idstring | null
typestring

adresse | adgangsadresse | vejnavn | postnummer

tekststring
caretposinteger | null
200Eksempel
[
  {
    "id": null,
    "type": "adgangsadresse",
    "tekst": "Rådhuspladsen 1, 1550 København V",
    "caretpos": null
  }
]
401Missing key
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key."
  }
}