---
title: "Get parcel data by coordinate or EGRID"
description: "Returns full parcel data for a Swiss parcel, located either by WGS84 coordinate (`lat`/`lng`) or by parcel `egrid`.\n\nWith `structure: \"default\"` the response is the raw GeoServer GeoJSON `FeatureCollection`, enriched with `owner`, `isSignal`, `image_urls` and `OEREB_url` on the first feature's properties. With `structure: \"tree\"` the response is a grouped, human-readable object.\n\n**GET alias (cacheable).** Identical handler and identical response to the POST, with the inputs as query parameters. A POST is uncacheable by browsers and by any CDN, so apps on a first-load path should prefer this GET.\n\nThe response carries `Cache-Control: private, max-age=3600, stale-while-revalidate=600` and `Vary: Origin, token`. The policy is **private, never public**: the endpoint is gated on the `token` request header, and a header is not part of any shared-cache key - a `public`/`s-maxage` directive would let a CDN serve the payload to a caller that never presented the token. Error responses (including the legacy HTTP-200 plain-text ones) carry `Cache-Control: no-store`."
---

> 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

`GET /res_api/parcel_data`

Returns full parcel data for a Swiss parcel, located either by WGS84 coordinate (`lat`/`lng`) or by parcel `egrid`.

With `structure: "default"` the response is the raw GeoServer GeoJSON `FeatureCollection`, enriched with `owner`, `isSignal`, `image_urls` and `OEREB_url` on the first feature's properties. With `structure: "tree"` the response is a grouped, human-readable object.

**GET alias (cacheable).** Identical handler and identical response to the POST, with the inputs as query parameters. A POST is uncacheable by browsers and by any CDN, so apps on a first-load path should prefer this GET.

The response carries `Cache-Control: private, max-age=3600, stale-while-revalidate=600` and `Vary: Origin, token`. The policy is **private, never public**: the endpoint is gated on the `token` request header, and a header is not part of any shared-cache key - a `public`/`s-maxage` directive would let a CDN serve the payload to a caller that never presented the token. Error responses (including the legacy HTTP-200 plain-text ones) carry `Cache-Control: no-store`.

## Authentication

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

## Query parameters

- `egrid` (`getParcelDataGet.query.egrid`; string, optional): Canonical federal parcel id (EGRID). Preferred over lat/lng.
- `lat` (`getParcelDataGet.query.lat`; number, optional): WGS84 latitude. Required together with `lng` when `egrid` is absent.
- `lng` (`getParcelDataGet.query.lng`; number, optional): WGS84 longitude. Required together with `lat` when `egrid` is absent.
- `structure` (`getParcelDataGet.query.structure`; string, optional): `default` (raw enriched FeatureCollection) or `tree` (grouped shape).

## Code samples

### cURL

```bash
curl --request GET \
  --url https://res.aireon.ch/res_api/parcel_data \
  --header 'token: <token>'
```

### TypeScript

```typescript
const url = 'https://res.aireon.ch/res_api/parcel_data';
const options = {method: 'GET', headers: {token: '<token>'}};

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"

headers = {"token": "<token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Parcel data. Shape depends on the `structure` field. Note: a missing/invalid token or missing location produces a plain-text 200 body (see `description`).

#### Body (application/json)

One of:

- `GeoJSONFeatureCollection`
- `ParcelTree`

##### 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` (`getParcelDataGet.response.401.error`; string, required): Human-readable error description.
- `message` (`getParcelDataGet.response.401.message`; string, optional): Optional underlying error message.


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