---
title: "Get a parcel and its neighbouring parcels"
description: "Returns the raw GeoServer GeoJSON `FeatureCollection` for a parcel located by `lat`/`lng` or `egrid` (currently the same query as `/res_api/parcel_data`; a bounding-box neighbour filter is planned)."
---

> 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/parcel_data_neighbor`

Returns the raw GeoServer GeoJSON `FeatureCollection` for a parcel located by `lat`/`lng` or `egrid` (currently the same query as `/res_api/parcel_data`; a bounding-box neighbour filter is planned).

## Authentication

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

## Request body

_Required._

- `lat` (`getParcelDataNeighbor.lat`; number, optional): WGS84 latitude.
- `lng` (`getParcelDataNeighbor.lng`; number, optional): WGS84 longitude.
- `egrid` (`getParcelDataNeighbor.egrid`; string, optional): Parcel EGRID identifier.

## Example request

```json
{
  "lat": 0,
  "lng": 0,
  "egrid": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://res.aireon.ch/res_api/parcel_data_neighbor \
  --header 'Content-Type: application/json' \
  --header 'token: <token>' \
  --data '
{
  "lat": 0,
  "lng": 0,
  "egrid": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://res.aireon.ch/res_api/parcel_data_neighbor';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', token: '<token>'},
  body: JSON.stringify({lat: 0, lng: 0, egrid: 'string'})
};

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/parcel_data_neighbor"

payload = {
    "lat": 0,
    "lng": 0,
    "egrid": "string"
}
headers = {
    "Content-Type": "application/json",
    "token": "<token>"
}

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

print(response.text)
```

## Responses

### 200

GeoJSON FeatureCollection, or a plain-text error body.

#### Body (application/json)

- `type` (`getParcelDataNeighbor.response.200.type`; string, optional)
- `features` (`getParcelDataNeighbor.response.200.features`; array<object>, optional)
  - `type` (`getParcelDataNeighbor.response.200.features.type`; string, optional)
  - `id` (`getParcelDataNeighbor.response.200.features.id`; string, optional)
  - `geometry` (`getParcelDataNeighbor.response.200.features.geometry`; object, optional)
  - `properties` (`getParcelDataNeighbor.response.200.features.properties`; object, optional): Open property bag. /res_api/parcel_data adds the following room-app density fields on the first feature.
    - `ratio_v` (`getParcelDataNeighbor.response.200.features.properties.ratio_v`; number | null, optional): Built volume relative to the zone reference volume (percent; 100 = typical for the zone), i.e. cz_util_now divided by the zone 20-year median utilization x 100. It is not utilization and not a share of a legal allowance. Existing value from the parcel table is passed through unchanged; computed as bldg_vol_sb3dgdb / vol_max * 100 when absent (vol_max is the zone reference volume).
    - `free_v` (`getParcelDataNeighbor.response.200.features.properties.free_v`; number | null, optional): vol_max - bldg_vol_sb3dgdb, in m³: the zone reference volume minus the built volume. Negative when the parcel is built above the zone reference; not a legal allowance.
    - `ratio_s` (`getParcelDataNeighbor.response.200.features.properties.ratio_s`; number | null, optional): Built-footprint / parcel_area (percent). Passed through from the parcel table when populated.
    - `gfz` (`getParcelDataNeighbor.response.200.features.properties.gfz`; number | null, optional): Geschossflächenziffer - gfa_now / parcel_area.
    - `bldg_height_m` (`getParcelDataNeighbor.response.200.features.properties.bldg_height_m`; number | null, optional): Tallest building on the parcel, in metres (= bldg_height_max).
    - `bldg_floors_n` (`getParcelDataNeighbor.response.200.features.properties.bldg_floors_n`; number | null, optional): Max number of floors on the parcel (= bldg_floors).

##### Example

```json
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": "string",
      "geometry": {},
      "properties": {
        "ratio_v": 0,
        "free_v": 0,
        "ratio_s": 0,
        "gfz": 0,
        "bldg_height_m": 0,
        "bldg_floors_n": 0
      }
    }
  ]
}
```

#### Body (text/html)

##### Example

```text
Missing Token
```

### 401

Authentication missing or invalid.

#### Example

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

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


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