Retired addresses and address history

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.

4 min Level: Intermediate ✓ Code tested

Addresses disappear. A building is demolished, two flats are merged, a property gets a new house number. If you have stored the address on a customer, a case or a meter, you need to notice that it no longer exists, and preferably when that happened.

The address register keeps retired addresses with a status, and the API lets you look them up.

The status field

Every address and access address has a status field:

statusMeaning
1Current
3Provisional, e.g. an address on a building plot that is not in use yet
2Retired (nedlagt)
4Shelved (henlagt), i.e. created by mistake or never taken into use

Use status to decide whether the address is active. The responses also carry a darstatus field with DAR's own codes: 3 current, 2 provisional, 4 retired and 5 shelved (status 1, 3, 2 and 4). Build your logic on one of them, not a mix. See also status, darstatus and retired addresses.

Look up a stored address

GET /adresser/{id} and GET /adgangsadresser/{id} return the address whatever its status. A retired address therefore answers 200 with "status": 2:

Shell#nedlagt-curl
curl -s "https://api.danadresse.dk/adresser/0a3f50c3-d930-32b8-e044-0003ba298018" \
  -H "X-Api-Key: $DANADRESSE_API_KEY"

If you get 404 with the code not_found, the register does not know the id at all. That typically happens when the id comes from another source or was mistyped.

Lists and searches show current and provisional addresses

/adresser and /adgangsadresser return addresses with status 1 and 3 by default, like DAWA. That also applies to the filters id, postnr, cirkel, polygon and so on. Add the flag medtagnedlagte (without a value) to include retired and shelved addresses, or pick a specific status with status=2. Both also work together with cirkel and polygon:

Python#medtag-python
import os
import requests

ids = "0a3f50c3-d930-32b8-e044-0003ba298018|fec4202d-1015-425d-a3f5-5d21d03194b6"
s = requests.Session()
s.headers["X-Api-Key"] = os.environ["DANADRESSE_API_KEY"]

for medtag in (False, True):
    params = {"id": ids, "struktur": "mini"}
    if medtag:
        params["medtagnedlagte"] = ""   # bare flag: ?medtagnedlagte
    r = s.get("https://api.danadresse.dk/adresser", params=params, timeout=10)
    r.raise_for_status()
    print("medtagnedlagte" if medtag else "default", "->", len(r.json()), "addresses")
    for a in r.json():
        print(f'  status={a["status"]} {a["betegnelse"]}')

Autocomplete and datavask only find addresses that are in use. You cannot use them to find a retired address again, but datavask can find the address that replaced it (see below).

When was the address retired?

The address has a historik block:

JSON#historik-svar
{
  "id": "0a3f50c3-d930-32b8-e044-0003ba298018",
  "status": 2,
  "darstatus": 4,
  "historik": {
    "oprettet": "2000-02-05T15:27:12.000",
    "ændret": "2026-10-05T10:20:23.000",
    "ikrafttrædelse": "2000-02-05T15:27:12.000",
    "nedlagt": "2026-10-05T10:20:23.000"
  }
}

For an address with status 2 or 4, nedlagt holds the time it was retired. For current addresses nedlagt is null. The times are Danish local time without a zone, as in DAWA.

The address's versions

GET /historik/adresser?id=… and GET /historik/adgangsadresser?id=… work as in DAWA. The response is a list with one row per version: status, street name, house number, postcode, etage and dør (for addresses), and virkningstart and virkningslut in UTC. Oldest version first. id takes up to 100 ids separated by |:

Shell#historik-curl
curl -s "https://api.danadresse.dk/historik/adresser?id=0a3f50c3-d930-32b8-e044-0003ba298018|fec4202d-1015-425d-a3f5-5d21d03194b6" \
  -H "X-Api-Key: $DANADRESSE_API_KEY"

The history covers changes from July 2026, when our change log started. We do not have older versions, and an address that has not changed since then has one version.

Follow changes from now on

To notice changes as they happen:

  1. Store what you see. Store the address fields and status with a date whenever you use the address. Then you have your own history for the addresses that matter to you.
  2. Follow the changes. Fetch events with GET /replikering/haendelser?entitet=adresse&sekvensnummerfra=N (and the same with entitet=adgangsadresse). Each event has operation (insert, update or delete), tidspunkt and the new data. Store the events for the ids you are watching. See Fetch changes with events.
  3. Get notified straight away. A webhook gives you the ids of changed addresses shortly after they change. See Webhooks: setup.
Shell#haendelser
# Latest sequence number, so you know where to start (no key needed)
curl -s "https://api.danadresse.dk/replikering/senestesekvensnummer"

# Address events from a stored sequence number, oldest first
curl -s "https://api.danadresse.dk/replikering/haendelser?entitet=adresse&sekvensnummerfra=207900000&maxantal=100" \
  -H "X-Api-Key: $DANADRESSE_API_KEY"

The event log starts at the switch to Datafordeleren in October 2026 (sequence number around 207 900 000). Older events cannot be fetched.

What do you do with a retired address?

  • Customers and delivery addresses: Do not ship parcels to an address with status 2 or 4. Wash the stored text with datavask: if it gives A or B, aktueladresse in the result is the replacement. If it gives C, ask the customer for a new address the next time they log in or order. See Store the address id.
  • Cases and meters: Find the new address at the same spot. Look up current addresses nearby with GET /adgangsadresser?cirkel=lon,lat,25 from the retired address's coordinates (they are still in the response). Add medtagnedlagte if you also want to see the other retired addresses at the spot.
  • Statistics: Keep the retired address and its id. Historical figures should point to the address that applied at the time.

The register has no direct link from a retired address to the one that replaced it. Washing the text or a lookup nearby is the way.

Next steps

Related guides

Markdown source Spotted an error? Tell us API-reference (Swagger)

Try it with a free key

2,000 calls/month on the free plan. No credit card.

Create account →