Streets

Fetch a single street segment

Fetches a single street segment. Both parts of the key are required, because the street code is only unique within the municipality.

GET/v1/vejstykker/{kommunekode}/{vejkode}

Authentication

Authorizationstringheaderrequired

Your API key as a Bearer token.

Parameters

kommunekodestringpathrequired

Municipality code (4 digits).

vejkodestringpathrequired

Street code (4 digits, unique within the municipality).

Request

curl --request GET \
  --url "https://api.danskadresseapi.dk/v1/vejstykker/<kommunekode>/<vejkode>" \
  --header "Authorization: Bearer $API_KEY"
Try it
GET https://api.danskadresseapi.dk/v1/vejstykker/%7Bkommunekode%7D/%7Bvejkode%7D

Response

application/json

Street segment with its municipality reference and postal codes

idstring<uuid>
hrefstring<uri>
kodestring

Street code.

navnstring
kommuneobject
Show child attributes(3)
kommune.hrefstring<uri>
kommune.kodestring
kommune.navnstring | null
postnumreobject[]
Show child attributes(3)
postnumre.nrstring
postnumre.hrefstring<uri>
postnumre.navnstring
kommunekodestring
navngivenvejobject
Show child attributes(2)
navngivenvej.idstring<uuid>
navngivenvej.hrefstring<uri>
adresseringsnavnstring | null
200Eksempel
{
  "id": "00000000-0000-0000-0000-000000000000",
  "href": "…",
  "kode": "0005804",
  "navn": "…",
  "kommune": {
    "href": "…",
    "kode": "…",
    "navn": "…"
  },
  "postnumre": [
    {
      "nr": "…",
      "href": "…",
      "navn": "…"
    }
  ],
  "kommunekode": "0101",
  "navngivenvej": {
    "id": "00000000-0000-0000-0000-000000000000",
    "href": "…"
  },
  "adresseringsnavn": "…"
}
401Missing key
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key."
  }
}