Same paths, same response shape. Just change the base URL and add your X-Api-Key — the rest of your code is unchanged.
curl "https://dawa.aws.dk/autocomplete?q=rådhuspladsen"
curl "https://api.danadresse.dk/autocomplete?q=rådhuspladsen" \
-H "X-Api-Key: dawa_live_…"
fetch("https://dawa.aws.dk/autocomplete?q=rådhuspladsen")
fetch("https://api.danadresse.dk/autocomplete?q=rådhuspladsen", {
headers: { "X-Api-Key": "dawa_live_…" }
})
requests.get("https://dawa.aws.dk/autocomplete",
params={"q": "rådhuspladsen"})
requests.get("https://api.danadresse.dk/autocomplete",
params={"q": "rådhuspladsen"},
headers={"X-Api-Key": "dawa_live_…"})
$ctx = stream_context_create();
file_get_contents("https://dawa.aws.dk/autocomplete?q=rådhuspladsen", false, $ctx);
$ctx = stream_context_create(["http" => [
"header" => "X-Api-Key: dawa_live_…"
]]);
file_get_contents("https://api.danadresse.dk/autocomplete?q=rådhuspladsen", false, $ctx);
http.Get("https://dawa.aws.dk/autocomplete?q=rådhuspladsen")
req, _ := http.NewRequest("GET",
"https://api.danadresse.dk/autocomplete?q=rådhuspladsen", nil)
req.Header.Set("X-Api-Key", "dawa_live_…")
http.DefaultClient.Do(req)
await http.GetStringAsync( "https://dawa.aws.dk/autocomplete?q=rådhuspladsen");
http.DefaultRequestHeaders.Add("X-Api-Key", "dawa_live_…");
await http.GetStringAsync(
"https://api.danadresse.dk/autocomplete?q=rådhuspladsen");
Integrate Danish address autocomplete into Next.js 14+ with App Router: a Route Handler proxies the API key server-side, a Client Component renders typeahead. P95 < 30 ms from Danish infrastructure.
Call Danadresse server-side in a Route Handler — the API key is never exposed to the browser.
Fetch and render address data in an async Server Component — zero JS to the client for static lookups.
npm install @danadresse/client — full TypeScript support, Promise-based, zero dependencies.
// app/api/autocomplete/route.ts
export async function GET(req: Request) {
const q = new URL(req.url).searchParams.get('q') ?? ''
const r = await fetch(
`https://api.danadresse.dk/autocomplete?q=${q}`,
{ headers: { 'X-Api-Key': process.env.DANADRESSE_KEY! } }
)
return Response.json(await r.json())
}
Next.js + Stripe + Danadresse autocomplete — validated address directly in the payment flow.
Registration with server-side address validation — clean data from day one.
Deploy the Route Handler as an Edge Function — sub-10ms latency close to your users.
The slug /nextjs-adresse-api follows DAWA's conventions — same paths, same JSON shape, same UUIDs. See the migration guide for the full picture.
See also