Streets

Search and list street segments

Searches for vejstykker (street segments). Returns the vejstykker (street segments) that meet the criterion.

GET/vejstykker

Authentication

Authorizationstringheaderrequired

Your API key as a Bearer token.

Parameters

idstringquery

The street segment's unique UUID.

navngivenvej_idstringquery

Finds the street segments for the named road

kodeintegerquery

street code. 4 digits.

kommunekodeintegerquery

Municipality code. 4 digits. Example: 0101 for the City of Copenhagen.

navnstringquery

Street name. Case-sensitive. Wildcard searches can be used.

postnrintegerquery

Postcode. 4 digits.

qstringquery

Search text. The vejnavn field is searched. All words in the search text must match the vejstykke (street segment). The wildcard * is allowed at the end of each word. The search is case-insensitive.

autocompletestringquery

Performs the search as an autocomplete search.

Show all 21 parametersShow fewer
polygonstringquery

Find the vejstykker (street segments) that overlap the specified polygon. The polygon is specified as an array of coordinates in the same way as the coordinates are specified in GeoJSON's polygon. Note that polygons must be closed, i.e. the first and last coordinates must be identical. The coordinate reference system can be (ETRS89/UTM32 or) WGS84/geographic. This is specified using the srid parameter; see above. Example: polygon=[[[10.3,55.3],[10.4,55.3],[10.4,55.31],[10.4,55.31],[10.3,55.3]]].

cirkelstringquery

Find the vejstykker (street segments) that overlap the circle specified by the coordinate (x,y) and radius r. The coordinate reference system can be (ETRS89/UTM32 or) WGS84/geographic. The radius is specified in metres. cirkel={x},{y},{r}.

sridintegerquery
strukturstringquery

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

fuzzystringquery

Enables fuzzy search

regexstringquery

Finds the street segments matching the given regular expression.

medtagnedlagtestringquery

Includes discontinued street segments in the response.

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

sideintegerquery

Which page to return. See Pagination.

per_sideintegerquery

Number of results per page. See Pagination.

Request

curl --request GET \
  --url "https://api.danskadresseapi.dk/dawa/vejstykker" \
  --header "Authorization: Bearer $API_KEY"
Try it
GET https://api.danskadresseapi.dk/dawa/vejstykker

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."
  }
}