Going further
Spatial queries
Find addresses within an area — polygon, circle or nearest point.
Three ways to query geographically — with the same parameters as in DAWA. All use srid to choose the coordinate system.
Within a circle
Bash
curl "https://api.danskadresseapi.dk/dawa/adresser?cirkel=12.5683,55.6761,500" \
-H "Authorization: Bearer YOUR_KEY"cirkel={x},{y},{radius} — radius in metres.
Within a polygon
Bash
curl "https://api.danskadresseapi.dk/dawa/adresser?polygon=[[[12.5,55.6],[12.6,55.6],[12.6,55.7],[12.5,55.6]]]" \
-H "Authorization: Bearer YOUR_KEY"The polygon must be closed — the first and last coordinates must be identical.
If it isn't closed, the request is rejected.
Nearest address
Bash
curl "https://api.danskadresseapi.dk/dawa/adgangsadresser/reverse?x=12.5683&y=55.6761" \
-H "Authorization: Bearer YOUR_KEY"The coordinate system
The default is WGS84 (longitude/latitude), which is what GPS and maps use. If you need ETRS89/UTM32, set srid=25832 — and remember that x is then the easting, not the longitude.
Distances are as the crow flies, not route distance. An address 200 m away in a straight line can
be on the other side of a stream.
