Skip to content
Navigation

Exact address point plus every address on its parcel

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.

GET
https://res.aireon.ch/res_api/address_geocode

Authorization

  • ResApiToken
    API key in header
    required

Query parameters

  • q
    string
    required

    Address text, 1 to 200 characters.

    maxLength: 200
  • limit
    optional
    integer

    Maximum hits, clamped to 1..10.

    maximum: 10 · minimum: 1 · default: 5

Returns

200

Hits, possibly empty.

JSON
  • query
    string
    required
  • provider
    swisstopo
    required
  • took_ms
    integer
    required
  • results
    array of
    object
    required
    • label
      string
      required

      Plain text, comma before the zip.

    • lat
      number
      required
    • lng
      number
      required
    • egid
      integer | null
      required
    • edid
      integer | null
      required
    • house_number
      string | null
      required
    • gwr_egrid
      string | null
      required

      EGRID the GWR assigns to this entrance; null when the lookup failed.

    • parcel
      object | null
      required

      Parcel under the point (PostGIS); null when none or the lookup failed.

      • egrid
        optional
        string
      • stored_address
        optional
        string | null

        properties.address, what the apps show today.

      • municipality
        optional
        string | null
      • area_m2
        optional
        number | null
      • geometry
        optional
        object | null

        GeoJSON Polygon or MultiPolygon in EPSG:4326.

    • parcel_addresses
      array of
      object
      required

      Only for results[0]; empty for the rest. Sorted by street, then natural house number.

      • label
        string
        required
      • street
        string
        required
      • house_number
        string | null
        required
      • egid
        integer | null
        required
      • edid
        integer | null
        required
      • lat
        number
        required
      • lng
        number
        required
      • is_match
        boolean
        required

        Same EGID and EDID as the searched hit.

      • build_year
        integer | null
        required
    • checks
      object
      required
      • searched_address_on_parcel
        optional
        boolean | null

        results[0] only: the hit's EGID+EDID is among parcel_addresses; null otherwise or when the GWR lookup failed.

      • stored_address_differs
        optional
        boolean | null

        stored_address differs from the hit's street and number (case/space-insensitive); null without a stored address.

      • parcel_egrid_mismatch
        optional
        boolean

        gwr_egrid and parcel.egrid are both present and different.

400

q missing, blank or longer than 200 characters (q_required).
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

401

Authentication missing or invalid.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

403

Authenticated but not permitted.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

502

The swisstopo SearchServer failed (geocoder_unavailable).
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

Type to search…

↑↓ navigate↵ selectEsc close