Home → Widget
Embed typo-tolerant Danish address search on your website. No dependencies, no build — just a <script>. DAWA-compatible response.
Live against our API — free tier. Pick a suggestion.
<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>
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).
| Option | Type | Description |
|---|---|---|
apiKey | string | Your API key. Required — every request needs a key. |
onSelect | function | Called with the selected suggestion (DAWA shape: tekst, data). |
type | string | adresse / adgangsadresse (default: both) |
limit | number | Number of suggestions (default 8). |
credit | boolean | false to hide the "Powered by" line. |
Show that you use Danadresse — and help other developers find us.
Markdown:
[](https://danadresse.dk)
HTML:
<a href="https://danadresse.dk"><img src="https://danadresse.dk/static/img/badge.svg" alt="Drevet af danadresse.dk"></a>