Searching specific Adresses from a specific district to get EGID

26 views
Skip to first unread message

Jab Bruh

unread,
Jun 27, 2025, 2:39:51 AMJun 27
to GeoAdminCh API
I have following problem:
I need to search addresses from Opfikon and than once the search is complete and successful I need the Egid.

Is there anyway where I can specify the district where I am searching in and still get the EGID?

Thanks for the answer :)

Pascal Barth

unread,
Jun 27, 2025, 3:15:42 AMJun 27
to geoadm...@googlegroups.com
Hi,

So you mean you want to list all addresses for one specific "Gemeinde", and get EGID for addresses there?
If so, this request should do the trick

https://api3.geo.admin.ch/rest/services/api/MapServer/find?layer=ch.swisstopo.amtliches-gebaeudeadressverzeichnis&searchText=Opfikon&searchField=com_name

I don't think you can filter by district, though. Fields that are available to search are the one returned by an identify/find request on the layer, in this case that would be
{
"adr_egaid": 100017991,
    "bdg_egid": 24370,
    "adr_edid": 0,
    "str_esid": 10079688,
    "stn_label": "Grätzlistrasse",
    "adr_number": "39",
    "zip_label": "8152 Opfikon",
    "com_fosnr": 66,
    "com_name": "Opfikon",
    "adr_status": "1",
    "adr_official": true,
    "bdg_category": "2",
    "adr_modified": "20241115",
    "label": 100017991
}

The EGID should be contained in the field "bdg_egid"

Is that what you were looking for?
Cheers,

Pascal

--
You received this message because you are subscribed to the Google Groups "GeoAdminCh API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoadmin-api...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/geoadmin-api/1be00dea-6ea1-4bec-a3ec-eb5075a64754n%40googlegroups.com.

Jab Bruh

unread,
Jul 2, 2025, 4:08:09 AMJul 2
to GeoAdminCh API
Yes that's exactly what I've been searching for because the entries in the find function are limited to 50 entries per request, which made it difficult to show a dropdown with all possible adresses.
Thanks for the answer...
Reply all
Reply to author
Forward
0 new messages