Data API

danadresse.dk: a DAWA-compatible address API, ready before DAWA closed

When the public address API DAWA closed on 1 October 2026, our compatible REST API was already live: same paths, same responses, a new base URL and a key.

The problem

For more than ten years DAWA was the free address API behind Danish checkout forms, CRM systems and logistics software. Once its closure was announced, every integration that called dawa.aws.dk directly had a deadline. The official route goes through Datafordeleren, which means registering and rewriting the integration against other endpoints and other response formats. For a webshop with an address field in the checkout, or a developer who looks after several client sites, that rewrite is real work that brings no new value of its own.

Since 1 October 2026 DAWA answers with HTTP 410 Gone. Address fields stop suggesting anything, forms reject valid addresses, and nightly jobs fail without anyone noticing. We wanted a way out that changed as little as possible in other people's code. Our own products, among them bkg.dk and jatid.dk, needed Danish addresses as well, so we were our own first users.

What we built

We built danadresse.dk as a drop-in replacement. Paths and JSON shapes follow DAWA: autocomplete, adresser, adgangsadresser, datavask, reverse geocoding, postnumre, vejnavne, kommuner and the replikering event stream with sequence numbers. The DAR identifier id_lokalId is the same UUID that DAWA used, so address ids already stored in a customer's database keep working after the switch. In practice an integration changes its base URL from dawa.aws.dk to api.danadresse.dk and sends an X-Api-Key header.

On top of the DAWA core we added what our own products were missing: check-digit validation of IBAN, CVR, Danish phone numbers and EAN, distance and quality scoring, enrichment with municipal and company data, and a bulk cleansing job that accepts files of up to 50 MB. Every account gets live and test keys. We store only a hash and the last four characters, and browser keys can be locked to the customer's own domains.

An ETL loads the data from the official sources, and Meilisearch indexes it for search as you type. Billing runs through Stripe with a usage meter, so customers pay for the calls they actually make. A small JavaScript autocomplete component, usable from the keyboard, in Danish, English and Ukrainian, with manual entry as a fallback, gives any site an address field without building its own interface. A second domain, dawakit.dk, speaks to teams that are looking for help with the migration itself.

Facts and results

56endpoints in the OpenAPI description at launch in June 2026, with 50 of 50 integration tests passing
1.10.2026DAWA closed; danadresse.dk had been in production since June
3 domainsapi.danadresse.dk, danadresse.dk and dawakit.dk
30–35 msfor a repeat request answered with 304 Not Modified, against 40–65 ms for a cold full response
p50 82 → 47 msserver time for autocomplete on 500 real queries after the October optimisation
≈8 h → 12 minnightly reindex after switching from OFFSET to keyset pagination
4 plansFree with 2,000 calls a month; Basis 71, Pro 223 and Enterprise from 399 DKK a month, billed annually
2.6 millionaccess addresses in the index (2,619,070 on 31.10.2026)

Stack

FastAPI with async SQLAlchemy 2 on a MySQL-compatible database, Meilisearch for full-text and prefix search, Redis for caching and rate limits, and uvicorn behind nginx on a VPS we administer ourselves. GZip plus per-path Cache-Control with weak ETags keeps repeat requests cheap. A signed GitHub webhook deploys a new version in about a minute, and Stripe Billing Meter counts usage.

What we learned

We set a target of under 150 ms at the 95th percentile for cold autocomplete calls measured from another server, and we have not reached it. After removing a stall of about 40 ms on every Meilisearch call and rewriting the building lookup, the median fell to 94–164 ms, but p95 stayed at 210–484 ms. The limit turned out to be the server rather than the code: 15 GB of search data against roughly 8 GB of page cache on network-class disk. The next step is compacting the index.

A second lesson came from a bug report by soge.dk, another product of ours. Autocomplete ignored the type parameter, so some ids led to a 404. FastAPI silently accepts unknown query parameters, so a filter that does not exist answers 200 with everything. A test now checks that every id autocomplete returns opens on its own detail endpoint.

Need something like this for your business?

Describe the task in the form. After a free scoping talk we send a plan and a quote, and we tell you which parts of these products we can reuse for you.

Get Started Today