Skip to content
kluknowledgecube edited this page Aug 6, 2024 · 15 revisions

Important

The new huslejenaevn.dk, including GraphQL API, will be released in late 2024 and will only then be accessible for external parties.

Huslejenaevn.dk and GraphQL API

Huslejenaevn.dk uses GraphQL as a query language for the API exposing resources in regards to published decisions (da: offentliggjorte afgørelser) made by the Rent boards (da: huslejenævn) and Resident complaints boards (beboerklagenævn) in the municipalities of Denmark.

Anyone can request access to these resources as they are publicly available but it requires obtaining an API key. Please contact naevn@sbst.dk for obtaining such an API key. You will need to provide contact information and your purpose of access to these resources.

The GraphQL API are available at:

https://gql.huslejenaevn.dk

For testing purposes you can use a GraphQL client such as:

The API key must be provided as a HTTP Header named: "X-API-KEY".

Example

For a generic introduction to querying data with GraphQL we recommend to read:

The most simple query object in huslejenaevn.dk is the municipality query object. It returns a list of municipalities which is of type Municipality with two fields, municipalityCode and name.

Using a API client, such as Postman or Insomnia, the list of municipalities can be queried like:

query {
	municipalities {
		municipalityCode
		name
	}
}

It will return JSON such as:

{
	"data": {
		"municipalities": [
			{
				"municipalityCode": "0510",
				"name": "Haderslev Kommune"
			},
			...
			...
			...
			{
				"municipalityCode": "0360",
				"name": "Lolland Kommune"
			}
		]
	}
}

Clone this wiki locally