A drop-in replacement for DAWA (Danmarks Adressers Web API), which is shutting down July 1, 2026.
notdawa replicates DAWA's full API surface — 23 entities, 74 endpoints — so consumers can swap their base URL and everything keeps working. Built with Nitro v3.
notdawa pulls from three backends, with every response tagged via the X-Data-Source header:
| Source | Header value | What it serves |
|---|---|---|
| Datafordeleren GraphQL | DAR-GraphQL |
Addresses, access addresses, postal codes, street names, reverse geocoding |
| GSSearch v2.0 | GSSearch |
Autocomplete for addresses, streets, municipalities |
| DAWA (temporary) | DAWA |
Administrative geography (kommuner, regioner, sogne, etc.) — will be migrated to Datafordeleren when their DAGI GraphQL register has data |
See DAWA.md for the full endpoint-by-endpoint compatibility matrix.
bun installYou need two tokens:
Datafordeleren API key (for address data via GraphQL):
- Go to administration.datafordeler.dk and create an account
- Create an IT-system for your application
- Generate an API key under the "API-Keys" section
- Documentation: Brugeroprettelse
GSSearch token (for autocomplete/search):
- Go to dataforsyningen.dk and create a user
- Generate a token from your profile
- Documentation: GSSearch v2.0
Create a .env file in the project root:
GSEARCH_TOKEN=your_gsearch_token_here
DATAFORDELER_API_KEY=your_datafordeler_api_key_herebun run dev
# or with a specific port
bun run dev -- --port 3002# Check the API index
curl http://localhost:3000/
# Test an address lookup
curl http://localhost:3000/adresser?per_side=1
# Test autocomplete
curl "http://localhost:3000/adresser/autocomplete?q=Vestergade"
# Test reverse geocoding
curl "http://localhost:3000/adgangsadresser/reverse?x=12.57&y=55.68"
# Check which backend served the response
curl -sI http://localhost:3000/postnumre/2100 | grep x-data-source
# x-data-source: DAR-GraphQLThe test suite compares every endpoint against live DAWA responses — strict key-for-key equality.
# Start the dev server first, then:
bun test95 tests, 271 assertions — all comparing our output 1:1 against DAWA.
GET / returns a full JSON index of all 74 endpoints with descriptions and data sources.
| Endpoint | Description |
|---|---|
/adresser |
Full addresses (with etage/dør) |
/adgangsadresser |
Access addresses (entrance-level) |
/postnumre |
Postal codes |
/vejnavne |
Street names |
Each supports: list (GET /), single lookup (GET /:id), autocomplete (GET /autocomplete?q=), and reverse geocoding (GET /reverse?x=&y=).
/kommuner, /regioner, /sogne, /retskredse, /politikredse, /opstillingskredse, /afstemningsomraader, /storkredse, /valglandsdele, /landsdele
/ejerlav, /jordstykker, /navngivneveje, /vejstykker, /supplerendebynavne2, /stednavne2, /steder, /bebyggelser
| Endpoint | Description |
|---|---|
/autocomplete?q= |
Unified autocomplete across all entity types |
All responses are cached in-memory with stale-while-revalidate (users never wait for a cache refresh). Cache TTLs are configured in nitro.config.ts via routeRules:
| Endpoint type | TTL | Reason |
|---|---|---|
Autocomplete (*/autocomplete, /autocomplete) |
5 min | Same query = same results |
DAR-GraphQL (/adresser, /adgangsadresser, /postnumre, /vejnavne) |
10 min | DAR data updates a few times daily |
| DAWA proxy (kommuner, regioner, sogne, retskredse, etc.) | 15 min | DAGI data updates weekly/daily |
Reverse geocoding (*/reverse) |
30 min | Geographic lookups are very stable |
First request: ~200-300ms (upstream round-trip). Cached requests: ~20-30ms.
server/
routes/ 74 route handlers (Nitro file-based routing)
utils/
dar-graphql.ts DAR GraphQL client with batch reference resolution
datafordeler.ts GraphQL/REST client, UTM↔WGS84 coordinate conversion
gsearch.ts GSSearch v2.0 REST client
dawa.ts DAWA proxy client (temporary fallback)
format.ts Response formatting + X-Data-Source header
query.ts DAWA-compatible query parameter parsing
mat-graphql.ts MAT GraphQL client (ready for ejerlav/jordstykker migration)
middleware/
cors.ts CORS headers (open, like DAWA)
tests/
dawa-compat.test.ts Core endpoint tests (28 tests)
dawa-compat-extended.test.ts Extended endpoint tests (67 tests)
notdawa is designed to be migrated away from DAWA entirely before July 2026. Current status:
- 10 endpoints on Datafordeleren DAR GraphQL (fully independent)
- 4 endpoints on GSSearch (fully independent)
- 60 endpoints still proxying through DAWA (blocked on DAGI/DS GraphQL data availability)
See DAWA.md for the detailed dependency tracker and migration paths.
bun run buildSee Nitro deployment docs for deployment presets (Node, Bun, Cloudflare, Vercel, etc.).
MIT