From Datafordeleren's DAR GraphQL back to REST

Find the REST endpoint that matches your DAR GraphQL query, and understand which ids line up and which do not.

4 min Level: Advanced ✓ Code tested

Some teams moved from DAWA to the Danish Address Register (DAR) on Datafordeleren before DAWA closed. DAR's GraphQL service holds the same data, but in the register's own shape: many small entities that refer to each other by UUID, and queries that need a registration time and a validity time.

Danadresse takes the addresses from DAR and serves them in DAWA's REST shape. This guide shows which endpoint matches the query you have today, and how the ids fit together.

What you no longer have to do

An address in DAR is spread over several entities. To show "Rådhuspladsen 1, 1550 København V" with a coordinate and a municipality you typically fetch:

  • DAR_Husnummer (the house number and references to street, postcode and access point),
  • DAR_NavngivenVej (the street name),
  • DAR_NavngivenVejKommunedel (municipality and road code),
  • DAR_Postnummer (postcode and name),
  • DAR_Adressepunkt (the coordinate).

Every query needs the registreringstid and virkningstid arguments, and you join the answers yourself. With us it is one call, and the response already embeds street name, postcode, municipality, coordinate and the administrative areas.

This is a house-number lookup in DAR GraphQL. The field names come from DAR's public schema:

graphql#dar-query
{
  DAR_Husnummer(
    where: { id_lokalId: { eq: "0a3f507a-ec01-32b8-e044-0003ba298018" } }
    registreringstid: "2026-10-15T00:00:00Z"
    virkningstid: "2026-10-15T00:00:00Z"
    first: 1
  ) {
    nodes { id_lokalId husnummertekst status navngivenVej postnummer adgangspunkt }
  }
}

navngivenVej, postnummer and adgangspunkt are UUID references that need three more queries. The same lookup with us:

Shell#rest-lookup
curl -s "https://api.danadresse.dk/adgangsadresser/0a3f507a-ec01-32b8-e044-0003ba298018" \
  -H "X-Api-Key: $DANADRESSE_API_KEY"

Here we read the fields you used to assemble from five entities. srid=25832 returns the coordinate in ETRS89/UTM32, the same system as DAR's address points:

Python#rest-fields
import os

import requests

r = requests.get(
    "https://api.danadresse.dk/adgangsadresser/0a3f507a-ec01-32b8-e044-0003ba298018",
    params={"srid": 25832},
    headers={"X-Api-Key": os.environ["DANADRESSE_API_KEY"]},
    timeout=10,
)
r.raise_for_status()
a = r.json()
print("street:      ", a["vejstykke"]["navn"], a["husnr"])
print("postcode:    ", a["postnummer"]["nr"], a["postnummer"]["navn"])
print("municipality:", a["kommune"]["kode"], a["kommune"]["navn"])
print("road code:   ", a["vejstykke"]["kode"])
print("parish:      ", (a.get("sogn") or {}).get("navn"))
print("east/north:  ", a["adgangspunkt"]["koordinater"])

The ids are the same

The most important point for a migration: the ids you stored from DAR work with us directly.

DAR entityFieldAt Danadresse
DAR_Adresseid_lokalIdid of an adresse – /adresser/{id}
DAR_Husnummerid_lokalIdid of an adgangsadresse – /adgangsadresser/{id}
DAR_Adressehusnummeradgangsadresseid on an adresse
DAR_NavngivenVejid_lokalIdid of a named street – /navngivneveje/{id}
DAR_Postnummerpostnrnr – /postnumre/{nr}. We use the four-digit number, not id_lokalId
DAR_NavngivenVejKommunedelkommune, vejkode/vejstykker/{kommunekode}/{kode}

These are the same UUIDs DAWA used, because DAWA was built on DAR too.

Be careful with address references from other registers. CVR on Datafordeleren, for example, refers to addresses with other UUIDs that do not match DAR's id_lokalId. To join data from such a register with our addresses, use the structured address: municipality code, road code and house number (plus floor and door for a unit). We expose that combination as kvh (12 characters) on adgangsadresser and kvhx (19 characters) on adresser, and you can search on them with /adgangsadresser?kvh=… and /adresser?kvhx=….

Task by task

TaskIn DAR GraphQLAt Danadresse
Search as you typeNot available. You filter yourselfGET /autocomplete?q=…
Look up an addressDAR_Adresse + DAR_Husnummer + street, postcode and address pointGET /adresser/{id}
Look up an access addressDAR_Husnummer + the referencesGET /adgangsadresser/{id}
All addresses in a postcodeFilter DAR_Husnummer on the postcode referenceGET /adgangsadresser?postnr=8000 with side and per_side
Street namesDAR_NavngivenVej/navngivneveje, /vejnavne
PostcodesDAR_Postnummer/postnumre
Supplementary town nameDAR_SupplerendeBynavnThe supplerendebynavn field and /supplerendebynavne2
Municipality, parish, police district etc.References from DAR_Husnummer to DAGI, which you look up in the DAGI registerEmbedded in the adgangsadresse: kommune, sogn, region, retskreds, politikreds, opstillingskreds, afstemningsområde and more
Coordinate to addressNot a DAR function/adgangsadresser/reverse?x=…&y=…
Clean a typed addressNot a DAR function/datavask/adresser?betegnelse=…
Fetch changesDAR_Events or filtering on registreringFra/replikering/haendelser?entitet=…&sekvensnummerfra=… or webhooks

Status and time

DAR has its own status codes. We translate them to DAWA's status:

DAR statusMeaningstatus with us
2provisional (foreløbig)3
3current (gældende)1
4retired (nedlagt)2
5withdrawn (henlagt)4

Lists return current and provisional addresses (status 1 and 3), as DAWA did, unless you ask for more with status or medtagnedlagte. Autocomplete only suggests addresses that are not retired. Each address also carries DAR's own code as darstatus. See status, darstatus and retired addresses.

Our API shows the current picture. There are no parameters matching registreringstid and virkningstid. For the versions of one address over time use /historik/adresser?id=… and /historik/adgangsadresser?id=…: a list of versions with virkningstart, virkningslut and status, as in DAWA. The versions are built from our change log, which starts in July 2026. If you need DAR's full bitemporal model (what the register knew at a given registration time), use DAR directly.

Changes and sequence numbers

DAR_Events has no sequence number, so you track how far you have got yourself, typically with time windows on registreringFra. We give each change a rising sekvensnummer in DAWA's replication format. You store the last number you processed and ask for everything after it. See Fetch changes with events.

The sequence numbers are our own. They continue upwards from where DAWA's numbering stopped, but they do not exist in DAR and cannot be compared with anything there.

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 →