Streets

Reverse geocoding — nearest street segment

Find the vejstykke (street segment) nearest to the specified coordinate. The coordinate reference system can be ETRS89/UTM32 with srid=25832 or WGS84/geographic with srid=4326. The default is WGS84.

GET/vejstykker/reverse

Authentication

Authorizationstringheaderrequired

Your API key as a Bearer token.

Parameters

formatstringquery

Returns the output in a format other than JSON. See Data formats.

callbackstringquery

Returns the output as JSONP. See Data formats.

noformatstringquery

Omits whitespace formatting from the output

ndjsonstringquery

Returns the output as Newline Delimited JSON

sridintegerquery

Specifies the SRID of the coordinate system in which geospatial parameters are specified. The default is 4326 (WGS84 / geographic coordinates). For ETRS89 / UTM zone 32 North, use 25832

xnumberqueryrequired

X coordinate. (If ETRS89/UTM32 is used, the easting value is specified.) If WGS84/geographic is used, the latitude value is specified.

ynumberqueryrequired

Y coordinate. (If ETRS89/UTM32 is used, the northing value is specified.) If WGS84/geographic is used, the longitude value is specified.

strukturstringquery

The struktur parameter specifies whether a flad or nestet response structure is required. The default is nestet for JSON and flad for GeoJSON.

Request

curl --request GET \
  --url "https://api.danskadresseapi.dk/dawa/vejstykker/reverse" \
  --url-query "x=<x>" \
  --url-query "y=<y>" \
  --header "Authorization: Bearer $API_KEY"
Try it
GET https://api.danskadresseapi.dk/dawa/vejstykker/reverse

Response

application/json

Success response. The MIME type of the response depends on the format parameter.

idstring<uuid>

The unique id of the street segment.

bboxnumber[]

The smallest rectangle containing the geometry.

max 4 items
hrefstring

The vejstykke's (street segment's) unique URL.

kodestring

Identification of the vejstykke (street segment). Unique within the municipality concerned.

navnstring

The street name as determined and registered by the municipality.

kommuneobject

The municipality in which the vejstykke (street segment) is located.

historikobject

Timestamps for creation, modification and any discontinuation.

darstatusinteger

The vejstykke's (street segment's) status code. 3=current, 4=discontinued.

postnumreobject[]

The postcodes that occur in addresses on the vejstykke (street segment).

navngivenvejobject

The named road of which the vejstykke (street segment) is a part.

visueltcenternumber[]

Coordinates for the visual centre of the vejstykke (street segment), for label placement on maps.

max 2 items
adresseringsnavnstring

An optionally abbreviated version of the street name, no more than 20 characters long.

200Eksempel
{
  "id": "00000000-0000-0000-0000-000000000000",
  "bbox": [
    0
  ],
  "href": "…",
  "kode": "…",
  "navn": "…",
  "kommune": {},
  "historik": {},
  "darstatus": 0,
  "postnumre": [
    {}
  ],
  "navngivenvej": {},
  "visueltcenter": [
    0
  ],
  "adresseringsnavn": "…"
}
401Missing key
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key."
  }
}
Reverse geocoding — nearest street segment — DanskAdresseAPI