Run a raw DAR GraphQL query (API key)
dar_graphqlSend custom GraphQL queries to Datafordeler DAR v2 to retrieve Danish addresses, streets, postcodes, and WGS84 coordinates; requires DATAFORDELER_API_KEY.
Instructions
Send any GraphQL query to https://graphql.datafordeler.dk/DAR/v2. REQUIRES DATAFORDELER_API_KEY.
Entities: DAR_Adresse, DAR_Husnummer, DAR_NavngivenVej, DAR_NavngivenVejKommunedel, DAR_NavngivenVejPostnummer, DAR_Postnummer, DAR_SupplerendeBynavn, DAR_Adressepunkt, DAR_Events.
Rules the service enforces:
Every entity query needs virkningstid and/or registreringstid (ISO timestamp), or a where filter on id_lokalId. Pass BOTH set to the current time to get the current state; with only one you also get superseded versions.
Filters: where: { field: { eq | in } }. startsWith exists only on adgangsadressebetegnelse, adressebetegnelse, vejnavn, postnr and navn, and is case-sensitive. Dates and ints also take gt/gte/lt/lte. Geometry fields take spatial filters (intersects, within, contains ...) with { wkt, crs: 25832 }.
Paging: first (max 1000, default 100) and after (cursor); read pageInfo { endCursor hasNextPage }.
References are ids, not nested objects: DAR_Husnummer.navngivenVej, .postnummer and .adgangspunkt hold UUIDs; fetch coordinates from DAR_Adressepunkt { position { wkt crs } }.
Field names with æ/ø/å use ae/oe/aa (doerbetegnelse, virkningsaktoer).
Example: query { DAR_Husnummer(first: 5, virkningstid: "2026-10-01T12:00:00Z", registreringstid: "2026-10-01T12:00:00Z", where: { adgangsadressebetegnelse: { startsWith: "Rentemestervej 8" }, status: { eq: "3" } }) { pageInfo { endCursor hasNextPage } nodes { id_lokalId adgangsadressebetegnelse status } } }
Returns the raw { data, errors } envelope. Use dar_get_graphql_schema to discover fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | GraphQL query document. | |
| variables | No | Optional GraphQL variables object. |