---
title: "Exact address point plus every address on its parcel"
description: "Geocodes `q` with the swisstopo SearchServer (origins=address) and returns, per hit, the exact entrance point, the GWR EGRID of that entrance, the parcel under the point (PostGIS) and, for results[0] only, every GWR entrance on the parcel with `is_match` on the searched one. Fixes apps showing the parcel's single stored address (the first house number) after an address search. Side lookups (GWR, PostGIS) run concurrently with short timeouts and degrade to null / [] on failure; only a geocoder failure is an error (502). Responses are cached in-process for 10 minutes per normalized `q` + `limit`; `Cache-Control: private, max-age=60`."
---

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

Geocodes `q` with the swisstopo SearchServer (origins=address) and returns, per hit, the exact entrance point, the GWR EGRID of that entrance, the parcel under the point (PostGIS) and, for results[0] only, every GWR entrance on the parcel with `is_match` on the searched one. Fixes apps showing the parcel's single stored address (the first house number) after an address search. Side lookups (GWR, PostGIS) run concurrently with short timeouts and degrade to null / [] on failure; only a geocoder failure is an error (502). Responses are cached in-process for 10 minutes per normalized `q` + `limit`; `Cache-Control: private, max-age=60`.

## Authentication

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

## Query parameters

- `q` (`getAddressGeocode.query.q`; string, required): Address text, 1 to 200 characters.
  - maxLength 200
- `limit` (`getAddressGeocode.query.limit`; integer, optional): Maximum hits, clamped to 1..10.
  - min 1; max 10; default `5`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://res.aireon.ch/res_api/address_geocode?q=General-Weber-Strasse%208%20Frauenfeld' \
  --header 'token: <token>'
```

### TypeScript

```typescript
const url = 'https://res.aireon.ch/res_api/address_geocode?q=General-Weber-Strasse%208%20Frauenfeld';
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/address_geocode?q=General-Weber-Strasse%208%20Frauenfeld"

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

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

print(response.text)
```

## Responses

### 200

Hits, possibly empty.

#### Example

```json
{
  "query": "string",
  "provider": "swisstopo",
  "took_ms": 0,
  "results": [
    {
      "label": "General-Weber-Strasse 8, 8500 Frauenfeld",
      "lat": 0,
      "lng": 0,
      "egid": 0,
      "edid": 0,
      "house_number": "string",
      "gwr_egrid": "string",
      "parcel": {
        "egrid": "string",
        "stored_address": "string",
        "municipality": "string",
        "area_m2": 0,
        "geometry": {}
      },
      "parcel_addresses": [
        {
          "label": "General-Weber-Strasse 6, 8500 Frauenfeld",
          "street": "string",
          "house_number": "string",
          "egid": 0,
          "edid": 0,
          "lat": 0,
          "lng": 0,
          "is_match": true,
          "build_year": 0
        }
      ],
      "checks": {
        "searched_address_on_parcel": true,
        "stored_address_differs": true,
        "parcel_egrid_mismatch": true
      }
    }
  ]
}
```

- `query` (`getAddressGeocode.response.200.query`; string, required)
- `provider` (`getAddressGeocode.response.200.provider`; string, required)
  - one of `"swisstopo"`
- `took_ms` (`getAddressGeocode.response.200.took_ms`; integer, required)
- `results` (`getAddressGeocode.response.200.results`; array<object>, required)
  - `label` (`getAddressGeocode.response.200.results.label`; string, required): Plain text, comma before the zip.
    - example `"General-Weber-Strasse 8, 8500 Frauenfeld"`
  - `lat` (`getAddressGeocode.response.200.results.lat`; number, required)
  - `lng` (`getAddressGeocode.response.200.results.lng`; number, required)
  - `egid` (`getAddressGeocode.response.200.results.egid`; integer | null, required)
  - `edid` (`getAddressGeocode.response.200.results.edid`; integer | null, required)
  - `house_number` (`getAddressGeocode.response.200.results.house_number`; string | null, required)
  - `gwr_egrid` (`getAddressGeocode.response.200.results.gwr_egrid`; string | null, required): EGRID the GWR assigns to this entrance; null when the lookup failed.
  - `parcel` (`getAddressGeocode.response.200.results.parcel`; object | null, required): Parcel under the point (PostGIS); null when none or the lookup failed.
    - `egrid` (`getAddressGeocode.response.200.results.parcel.egrid`; string, optional)
    - `stored_address` (`getAddressGeocode.response.200.results.parcel.stored_address`; string | null, optional): properties.address, what the apps show today.
    - `municipality` (`getAddressGeocode.response.200.results.parcel.municipality`; string | null, optional)
    - `area_m2` (`getAddressGeocode.response.200.results.parcel.area_m2`; number | null, optional)
    - `geometry` (`getAddressGeocode.response.200.results.parcel.geometry`; object | null, optional): GeoJSON Polygon or MultiPolygon in EPSG:4326.
  - `parcel_addresses` (`getAddressGeocode.response.200.results.parcel_addresses`; array<object>, required): Only for results[0]; empty for the rest. Sorted by street, then natural house number.
    - `label` (`getAddressGeocode.response.200.results.parcel_addresses.label`; string, required)
      - example `"General-Weber-Strasse 6, 8500 Frauenfeld"`
    - `street` (`getAddressGeocode.response.200.results.parcel_addresses.street`; string, required)
    - `house_number` (`getAddressGeocode.response.200.results.parcel_addresses.house_number`; string | null, required)
    - `egid` (`getAddressGeocode.response.200.results.parcel_addresses.egid`; integer | null, required)
    - `edid` (`getAddressGeocode.response.200.results.parcel_addresses.edid`; integer | null, required)
    - `lat` (`getAddressGeocode.response.200.results.parcel_addresses.lat`; number, required)
    - `lng` (`getAddressGeocode.response.200.results.parcel_addresses.lng`; number, required)
    - `is_match` (`getAddressGeocode.response.200.results.parcel_addresses.is_match`; boolean, required): Same EGID and EDID as the searched hit.
    - `build_year` (`getAddressGeocode.response.200.results.parcel_addresses.build_year`; integer | null, required)
  - `checks` (`getAddressGeocode.response.200.results.checks`; object, required)
    - `searched_address_on_parcel` (`getAddressGeocode.response.200.results.checks.searched_address_on_parcel`; boolean | null, optional): results[0] only: the hit's EGID+EDID is among parcel_addresses; null otherwise or when the GWR lookup failed.
    - `stored_address_differs` (`getAddressGeocode.response.200.results.checks.stored_address_differs`; boolean | null, optional): stored_address differs from the hit's street and number (case/space-insensitive); null without a stored address.
    - `parcel_egrid_mismatch` (`getAddressGeocode.response.200.results.checks.parcel_egrid_mismatch`; boolean, optional): gwr_egrid and parcel.egrid are both present and different.

### 400

`q` missing, blank or longer than 200 characters (`q_required`).

#### Example

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

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

### 401

Authentication missing or invalid.

#### Example

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

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

### 403

Authenticated but not permitted.

#### Example

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

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

### 502

The swisstopo SearchServer failed (`geocoder_unavailable`).

#### Example

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

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


Source: https://docs.aireon.ch/res/get-address-geocode/index.md
