Get BBR data about the building and the dwellings
Look up construction year, area, floors, use and heating for an address, and fetch the dwelling units with rooms, kitchen and bathroom.
The Building and Dwelling Register (BBR) describes every building and every dwelling in Denmark: when it was built, how big it is, what it is used for and how it is heated. It is used for home valuation, insurance quotes, energy advice and rentals.
Two endpoints cover it: /bbr for the building and /enhed for the dwellings or business units inside it. Both live under /api/v1/enrich/ and need a normal live key.
Which id should you use?
| Endpoint | Takes | Returns |
|---|---|---|
GET /api/v1/enrich/adresser/{id}/bbr | access-address id or address id | The main building at the address |
GET /api/v1/enrich/adresser/{id}/enhed | access-address id | Every unit on the staircase |
GET /api/v1/enrich/adresser/{id}/enhed | address id (with floor/door) | Only that one unit |
/bbr gives the same answer for an address id with floor and door as for its access address, because the building belongs to the entrance. Unknown ids give 404 with the code not_found. Datavask and autocomplete both return both ids directly (see Address or access address).
The building
curl -s "https://api.danadresse.dk/api/v1/enrich/adresser/0a3f507f-0959-32b8-e044-0003ba298018/bbr" \ -H "X-Api-Key: $DANADRESSE_API_KEY"
{
"adresseid": "0a3f507f-0959-32b8-e044-0003ba298018",
"bygning": {
"id": "23e6f5c3-af8c-4700-bb1a-b23bb2107e04",
"bygningsnr": "1",
"opfoerelsesaar": 1968,
"ombygningsaar": 1992,
"samletBygningsareal": 5652,
"samletBoligAreal": null,
"samletErhvervsareal": 5652,
"bebyggetAreal": 2826,
"antalEtager": 2,
"antalBoliger": null,
"anvendelseKode": "321",
"anvendelseNavn": "Bygning til kontor",
"ydervaegKode": "1",
"tagKode": "2",
"varmeKode": "1",
"opvarmningsmiddelKode": null,
"stormraadetOversvoemmelse": null,
"stormflodRegistreret": false
},
"data_source": "BBR (Bygnings- og Boligregistret)",
"license": "CC BY 4.0 Klimadatastyrelsen"
}| Field | Content |
|---|---|
opfoerelsesaar, ombygningsaar | Year built and year of the last major conversion |
samletBygningsareal, samletBoligAreal, samletErhvervsareal | Floor area in m² |
bebyggetAreal | The building's footprint on the plot in m² |
antalEtager, antalBoliger | Floors and dwellings in the building |
anvendelseKode, anvendelseNavn | What the building is used for, as code and text |
ydervaegKode, tagKode | Materials, as BBR codes |
varmeKode, opvarmningsmiddelKode, energiforsyningKode | Heating installation and fuel, as BBR codes |
vandforsyningKode, afloebKode, fredningKode | Water, sewage and listed-building status, as BBR codes |
stormflodRegistreret | true if the building has a registered claim with the Danish Storm Council |
Only the use has a text. The other fields are raw codes from BBR's code lists, so you translate them to text in your own app.
The units
curl -s "https://api.danadresse.dk/api/v1/enrich/adresser/0a3f507c-0624-32b8-e044-0003ba298018/enhed" \ -H "X-Api-Key: $DANADRESSE_API_KEY"
{
"adresseid": "0a3f507c-0624-32b8-e044-0003ba298018",
"antal_enheder": 6,
"enheder": [
{
"id": "760562d0-4ea6-4c94-94d7-506d12c4d0de",
"etage": "st",
"doer": "1",
"anvendelseKode": "322",
"boligtype": { "kode": "E", "navn": "Andet" },
"samletAreal": 83,
"arealBeboelse": null,
"arealErhverv": 83,
"antalVaerelser": 2,
"antalToiletter": 1,
"antalBadevaerelser": null,
"toilet": { "kode": "T", "navn": "Vandskyllende toilet i enheden" },
"bad": { "kode": "D", "navn": "Hverken badeværelse eller adgang til badeværelse" },
"koekken": { "kode": "H", "navn": "Ingen fast kogeinstallation" },
"udlejningKode": null,
"bygningId": "70f6f506-2c5b-408f-8e9c-32353f2e0be9"
}
]
}The units are sorted by floor (basement, ground floor, 1st, 2nd …) and door. boligtype, toilet, bad and koekken carry both a code and a text. bygningId points to the building the unit is in.
In Python: from address id to building and dwelling
import os import requests API = "https://api.danadresse.dk" s = requests.Session() s.headers["X-Api-Key"] = os.environ["DANADRESSE_API_KEY"] adresse_id = "0a3f50a4-0c39-32b8-e044-0003ba298018" # Strandvejen 100, 1., 2900 Hellerup r = s.get(f"{API}/api/v1/enrich/adresser/{adresse_id}/bbr", timeout=15) if r.status_code == 503: raise SystemExit(f"The register is temporarily unavailable, retry in {r.headers.get('Retry-After')} s") r.raise_for_status() byg = r.json()["bygning"] if byg.get("_status"): print("No BBR building linked to the address yet") else: print(byg["anvendelseNavn"], byg["opfoerelsesaar"], byg["samletBygningsareal"], "m²") enheder = s.get(f"{API}/api/v1/enrich/adresser/{adresse_id}/enhed", timeout=15).json() for e in enheder["enheder"]: print(e["etage"], e["doer"], e["samletAreal"], "m²,", e["antalVaerelser"], "rooms")
When data is missing
_status: needs_bbr_etlinbygningmeans no BBR building is linked to the address in our copy of the register. Every field is thennull._status: needs_bbr_enhed_etlon/enhedmeans no units were found, andenhederis an empty list. That can also be correct: a shed or a substation has no dwellings.- Single fields are
null. BBR is not complete. Older buildings often lack a conversion year or an area. Show "unknown" instead of 0. _truncated: trueon/enhedmeans the address has more than 1000 units and only the first 1000 are included.
Several buildings at the same address
An address can have several buildings: a house with a garage and a shed, or a business park with several halls. /bbr returns the main building: a building with a real use before garages, carports and sheds (use code 900 and up), buildings with data before empty rows, and then the largest. To see every building, use bygninger in GET /api/v1/enrich/adresser/{id}/ejendom (see Cadastre, land parcel and BFE). That list has id, number, year built, area, floors and use for each building, with the main building first. If you need the building of a specific dwelling, take the one the unit in /enhed points to via bygningId.
Keys and errors
- Test keys get
403with the codesandbox_scope, and browser keys get403withbrowser_key_scope. Call the endpoint from your server. /bbrand/enhedread from our own copy of BBR./ejendomand/installationsfetch data from Datafordeleren when called and can answer503with the codeupstream_unavailableand aRetry-Afterheader during Datafordeleren's service windows.- BBR data is licensed under CC BY 4.0. Show the attribution "Indeholder data fra Klimadatastyrelsen (CC BY 4.0)" when you show the data to users.
Next steps
- Cadastre, land parcel and BFE number
- Flood risk for an address
- Overview of BBR data: BBR
Related guides
Markdown source Spotted an error? Tell us API-reference (Swagger)