Skip to content
Help center

Autocomplete with caretpos

1 min read

Autocomplete

For an address field with suggestions as the user types:

GET /v1/autocomplete?q=<text>&caretpos=<cursor>&type=<adresse|adgangsadresse>

  • q: the text the user typed.
  • caretpos: the cursor position in q (DAWA parity — improves suggestions).
  • type: adresse (unit address) or adgangsadresse (house-number level).
  • per_side: up to 100.
Bash
curl -H "Authorization: Bearer <key>" \
  "https://api.danskadresseapi.dk/v1/autocomplete?q=rådhusplads&caretpos=10&type=adgangsadresse"

DAWA parity: /dawa/autocomplete and /dawa/adresser/autocomplete behave like the official DAWA (same ranking and fields).

Autocomplete is built for fast keystrokes. To fully validate a typed address, use datavask — see that article.
Was this helpful?