---
title: "Get building height and volume at a location"
description: "Returns building height and volume statistics for buildings at or near a coordinate, anywhere in Switzerland."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.aireon.ch/llms.txt
> Use this file to discover all available pages before exploring further.

Path: RES API (public) › Parcel

`POST /res_api/building_data`

Returns building height and volume statistics for buildings at or near a coordinate, anywhere in Switzerland.

## Authentication

- `ResApiToken`, apiKey, in header, header `token`

## Request body

_Required._

- `lat` (`getBuildingData.lat`; number, required): WGS84 latitude.
- `lng` (`getBuildingData.lng`; number, required): WGS84 longitude.
- `radiusMeters` (`getBuildingData.radiusMeters`; number, optional): Search radius for the target building, in metres.
  - default `3`
- `buffer_m` (`getBuildingData.buffer_m`; number, optional): Geometry buffer, in metres.
  - default `10`
- `strategy` (`getBuildingData.strategy`; string, optional): Selection strategy for the upstream building service.
  - default `"auto"`

## Example request

```json
{
  "lat": 0,
  "lng": 0,
  "radiusMeters": 3,
  "buffer_m": 10,
  "strategy": "auto"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://res.aireon.ch/res_api/building_data \
  --header 'Content-Type: application/json' \
  --header 'token: <token>' \
  --data '
{
  "lat": 0,
  "lng": 0,
  "radiusMeters": 3,
  "buffer_m": 10,
  "strategy": "auto"
}
'
```

### TypeScript

```typescript
const url = 'https://res.aireon.ch/res_api/building_data';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', token: '<token>'},
  body: JSON.stringify({lat: 0, lng: 0, radiusMeters: 3, buffer_m: 10, strategy: 'auto'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://res.aireon.ch/res_api/building_data"

payload = {
    "lat": 0,
    "lng": 0,
    "radiusMeters": 3,
    "buffer_m": 10,
    "strategy": "auto"
}
headers = {
    "Content-Type": "application/json",
    "token": "<token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Building height/volume data passed through from the upstream building service.

#### Example

```json
{}
```

### 401

Authentication missing or invalid.

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

- `error` (`getBuildingData.response.401.error`; string, required): Human-readable error description.
- `message` (`getBuildingData.response.401.message`; string, optional): Optional underlying error message.

### 500

Failed to fetch building data.

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

- `error` (`getBuildingData.response.500.error`; string, required): Human-readable error description.
- `message` (`getBuildingData.response.500.message`; string, optional): Optional underlying error message.


Source: https://docs.aireon.ch/res/get-building-data/index.md
