Practical guides to the Danadresse API, with code that has been run against production. From the first call to replication and webhooks.
Create a free key, look up an address with curl, Python or Node, and read the response.
No guides match your search.
Keys, first call, errors, limits, pagination and formats.
Create a free key, look up an address with curl, Python or Node, and read the response.
Choose between the X-Api-Key header and ?api_key= in the URL, and send the key correctly from curl, Python, Node and PHP.
Use dawa_test_ keys for development and CI without spending your quota, and keep test and production apart.
Read error responses from both parts of the API with one helper, and react to the stable code instead of the error text.
Understand the monthly quota and the per-minute limit, read the X-RateLimit headers, and handle each 429 code with a backoff that honours Retry-After.
Fetch long lists page by page with side and per_side, know the limits per endpoint, and write a loop that stops at the last page.
Get addresses as JSON, CSV, GeoJSON or NDJSON with format=, choose between nested, flat and mini with struktur=, and use JSONP or fetch in the browser.
Find the coordinates in the response, choose between WGS84 and ETRS89/UTM32 with srid, reverse geocode in both systems, and convert yourself with pyproj or proj4.
Understand the difference between adresse and adgangsadresse, their ids and kvh/kvhx keys, how autocomplete's type relates to them, and which id to store.
From DAWA, dawa-autocomplete2 and Datafordeleren to Danadresse.
Move an existing DAWA integration to Danadresse with a new base URL and a key, check it with a smoke-test script, and know the known differences.
Keep DAWA's autocomplete widget, change the script address and add a domain-locked browser key so the address field works again.
Move a self-written address field from DAWA's /autocomplete to Danadresse – URL, key, JSONP or JSON, error handling and the caretpos loop.
Find the REST endpoint that matches your DAR GraphQL query, and understand which ids line up and which do not.
Find and replace DAWA URLs in a project with npx @danadresse/migrate-cli, see what the tool misses, and stop new DAWA calls in CI.
Understand the status and darstatus fields, when retired addresses appear in a response, and what to do with stored address ids that are no longer current.
Address fields in plain JS, React, Vue, Svelte, Angular and Next.js.
Add an address field with suggestions to any page with one script tag, and fill street, postcode and city into separate fields.
Build a React hook with debounce, AbortController and keyboard navigation, and keep the API key safe as a domain-locked browser key.
Write a Vue 3 component with the Composition API that fetches address suggestions with debounce and cancelled requests, and emits the chosen address.
Build a Svelte 5 component with runes that fetches address suggestions with debounce and AbortController, and move the key to a SvelteKit endpoint if you want.
Build a standalone Angular component with HttpClient, debounceTime and switchMap that suggests Danish addresses and cancels stale requests.
Keep the API key on the server with a Next.js App Router route handler that proxies /autocomplete with cache headers and passes rate-limit headers through.
Lock a key to your domains in the dashboard or with PATCH /api/v1/keys/{id}, so it can sit in a public web page without being abused.
Learn the combobox pattern for an address field (roles, aria-activedescendant, live region and keyboard), see how our script does it, and build a minimal version yourself.
Ready-to-use clients in Python, Node, PHP, C#, Java, Go, Ruby and Rust.
Build a small Python client with autocomplete, lookup, datavask, reverse geocoding, timeouts, error codes and 429 handling.
Write a Node client with fetch, timeouts, error codes and Retry-After, or use the npm package @danadresse/client with a retry layer.
Call Danadresse from plain PHP with curl or from Laravel with a service class, config, timeouts, retry on 429 and error codes.
Build a typed Danadresse client in .NET 8 with records, IHttpClientFactory, timeouts, error codes and retry on 429 without Polly.
Call Danadresse from Java 17 with java.net.http and Jackson, or from Spring Boot with RestClient, with timeouts, error codes and retry on 429.
Write a Danadresse client in Go using only the standard library, context timeouts, typed structs, error codes and Retry-After on 429.
Call Danadresse from Ruby and Rails with Net::HTTP or Faraday, with timeouts, keep-alive, error codes and Retry-After on 429.
Build an async Rust client with reqwest and serde, and call Danadresse from shell scripts with curl and jq, with retry on 429.
Address autocomplete in checkouts and forms without writing code.
Add the address widget to your Shopify theme, fill postcode and city automatically, and see exactly where Shopify allows scripts.
Install the Lynbro Danadresse plugin or a small mu-plugin for address autocomplete in WooCommerce, and validate the address when the order is placed.
Install the Danadresse module for checkout autocomplete and an address check on every order, or attach the widget yourself with a theme script and a CSP whitelist.
Install the Danadresse module for checkout autocomplete and an address check on every order, or build a small module of your own that loads the widget.
Paste one script tag into your DanDomain design so address fields get autocomplete with postcode and city, and point it at the fields if your design names them differently.
Paste one script tag into Shoporama's body code so the checkout gets address autocomplete with postcode and city, or attach the widget to your own selectors.
Build an address field as a Wix custom element, pass the chosen address to Velo, and see which Wix fields you cannot reach.
Paste one script tag into Code Injection so a Squarespace form gets address autocomplete, point it at the fields if needed, and see why the checkout cannot get it.
Give your Webflow fields fixed ids, paste one script tag as custom code, and fill postcode and city when the customer picks an address.
Load the one-tag address script from a Shopware 6 theme so every address form gets autocomplete, with postcode and city filled in the right form.
Attach the address widget to an Elementor Pro form field by its field id, popups included, and fill postcode and city automatically.
Give the Contact Form 7 fields ids, attach the address widget, and reject addresses that cannot be found when the form is sent.
Attach the address widget to the Gravity Forms Address field so street, postcode and city are filled, in AJAX and multi-page forms too.
Attach the address widget to the WPForms address field or to plain text fields in WPForms Lite, and fill postcode and city automatically.
Excel, Google Sheets, Power Automate, Make, Zapier and n8n.
Look up a column of addresses against the API from Excel or Power BI with Power Query, get postcode, municipality and coordinates back, and keep usage down.
Add a custom function =DATAVASK(A2) to Google Sheets with Apps Script that cleanses addresses, caches the answers and can write fixed values back.
Call datavask from a Power Automate flow with the HTTP action, parse the response with a ready-made JSON schema, and handle 429 and empty results.
Set up the HTTP module in a Make scenario against datavask, map the fields correctly, and handle 429 and errors with a router or an error handler.
Call datavask from a Zap with Webhooks by Zapier, pick the right result out of the list, and handle errors and 429 with Code by Zapier.
Set up the HTTP Request node in n8n with Header Auth, batching and retries, map the fields from datavask, and import a ready-made workflow.
Concrete recipes: cleansing, geocoding, DAGI, BBR, cadastre, climate.
Check the customer's address when the form is submitted, accept safe matches, confirm likely ones and ask for a fix on uncertain ones.
Wash thousands of customer addresses from a CSV export, either with a bulk job on the server or with your own loop over datavask.
Geocode a list of addresses to x/y in WGS84 or UTM32 with datavask and id lookups, in plain Python or with pandas.
Look up the nearest address from longitude and latitude with reverse geocoding, and handle GPS inaccuracy with a radius search.
Look up the administrative areas of an address, from municipality and region to parish, police district, court district and nomination district.
Fetch every address inside a circle or a drawn area with cirkel and polygon, URL-encode the polygon correctly and page through large results.
Look up construction year, area, floors, use and heating for an address, and fetch the dwelling units with rooms, kitchen and bathroom.
Find the cadastral number and district for an address, look up the parcel area, and fetch BFE number, valuation and local plans with the property lookup.
Understand the climate endpoint: how ground elevation and projected storm surge give a margin, what the levels mean and what the indicator does not cover.
What large-recipient (stormodtager) postcodes are, how the API shows them in /postnumre, on addresses and in autocomplete, and how your form handles them.
Find out whether a stored address has been retired, include retired addresses in searches, fetch an address's versions with /historik and track changes over time.
Fetch the full lists of postcodes, municipalities and regions, cache them properly and avoid the usual mistakes with municipality codes.
Why you should store the address id and the access-address id, how to re-validate stored addresses in batches, and what to do when an address is retired.
Calculate the straight-line distance between two addresses with the distance endpoint, or work it out from the coordinates with haversine or UTM32.
Keep a local copy current and get notified when addresses change.
Stream all postcodes, streets and addresses, store them in SQLite or Postgres, and save the sequence number to keep syncing from.
Fetch changes with sekvensnummerfra and maxantal, apply insert, update and delete as idempotent upserts, and store the cursor safely.
Log in for a JWT, create, list and delete webhooks through /api/v1/webhooks, and store the secret that is shown only once.
Check X-Danadresse-Signature with HMAC-SHA256 over the raw body and a constant-time comparison, and test your code with a self-signed delivery.
Answer fast, deduplicate on entity and sequence number, recover missed changes with events, and monitor failure_count before the webhook is disabled.
Caching, retries, usage, key rotation, CORS and licensing.
See which responses you can cache and for how long, what the API's Cache-Control and ETag mean, and build a cache in Python with and without Redis.
See which errors to retry and which never to retry, and use exponential backoff with jitter in Python, Node and PHP.
Read quota and per-minute limit from the response headers, log and alert at 80 percent, and use the usage page in the dashboard.
Replace an API key without a single call failing, respond to a leaked or blocked key, and store the key safely on your platform.
Credit the source of address data correctly under CC BY 4.0, see when addresses become personal data, and what we record about your calls.
Go through keys, limits, error handling, caching, data and monitoring before your Danadresse integration goes into production.
401, 403, 429, CORS, æøå and searches with no results.
Find the cause of 401 missing_api_key and invalid_api_key with a checklist and a small diagnostic script, and fix the key or the way you send it.
Work out why a valid key is refused from the code in the 403 response, and fix the domains, key type, IP list or a blocked key.
Read details in a 400 error, catch misspelled parameters that are ignored without an error, and tell not_found, route_not_found and unknown_entity apart.
Understand which endpoints depend on public registers in real time, handle 503 upstream_unavailable with Retry-After, and set sensible timeouts in the client.
Find the real cause behind a CORS error against api.danadresse.dk, which is open to every domain, and fix credentials, mixed content, proxies and key type.
Send æøå correctly URL-encoded, read UTF-8 responses without broken characters, open CSV in Excel with the right letters, and understand the oe/aa/ae folding in autocomplete.
Work through a checklist when the API answers 200 with an empty list, from side and street names to status, srid, autocomplete type and datavask.
Give Claude, Cursor and other AI agents access to Danish addresses.