Home → Widget

Address autocomplete in 3 lines

Embed typo-tolerant Danish address search on your website. No dependencies, no build — just a <script>. DAWA-compatible response.

Try it

Live against our API — free tier. Pick a suggestion.

Embed

<input id="adr" placeholder="Type an address…">

<script src="https://danadresse.dk/static/js/danadresse-widget.js"></script>
<script>
  DanadresseAutocomplete.attach("#adr", {
    apiKey: "dawa_live_…",          // required
    onSelect: function (s) {
      console.log(s.tekst, s.data); // selected address
    }
  });
</script>

Or fully declarative — no JS:

<input data-danadresse data-danadresse-key="dawa_live_…">
<script src="https://danadresse.dk/static/js/danadresse-widget.js"></script>

Coming from DAWA's widget?

If your page loads dawa-autocomplete2.min.js from dawa.aws.dk, you don't need to rewrite anything: we host the same library on the same path. Swap the host and add your key — your dawaAutocomplete.dawaAutocomplete(…) call stays as it is.

<script src="https://api.danadresse.dk/js/autocomplete/dawa-autocomplete2.min.js?key=dawa_live_…"></script>
<link rel="stylesheet" href="https://api.danadresse.dk/css/dawa-autocomplete2.css">

A key inside a public page is used by every visitor — lock it to your domain under API keys → Allowed domains (applies to this widget too).

All options and paths →

Options

OptionTypeDescription
apiKeystringYour API key. Required — every request needs a key.
onSelectfunctionCalled with the selected suggestion (DAWA shape: tekst, data).
typestringadresse / adgangsadresse (default: both)
limitnumberNumber of suggestions (default 8).
creditbooleanfalse to hide the "Powered by" line.

"Powered by" badge

Show that you use Danadresse — and help other developers find us.

Drevet af danadresse.dk

Markdown:

[![Drevet af danadresse.dk](https://danadresse.dk/static/img/badge.svg)](https://danadresse.dk)

HTML:

<a href="https://danadresse.dk"><img src="https://danadresse.dk/static/img/badge.svg" alt="Drevet af danadresse.dk"></a>

Get a free key

Higher rate limit + stats. 2,000 calls/month free with a free key.

Get started →

Code examples · API docs · Integrations