Egid different after Update

210 views
Skip to first unread message

Anders Hansson

unread,
Nov 12, 2025, 10:42:37 AM (11 days ago) Nov 12
to GeoAdminCh API
Today was an update to the geo.admin.ch and noticed there was a change in returned building EGIDs when searching for an address. 
Example:
An address search with the parameters 
   type=locations
   origins=address
   "searchText=Hofacker 30 4132 Mutt"  
   lang=en

Returns the result:
Street,                          CityPostCode,     Egid,     Edid
"Hofackerstrasse 30";"4132 Muttenz";102061924;0

Expected:
Street,                          CityPostCode,     Egid,     Edid
"Hofackerstrasse 30";"4132 Muttenz";245062350;0

Difference: 245062350 and 102061924

I couldn't find any documentation of this egid change, so I need to ask
Is this an intended change or a bug? 

Matteo De Sabato

unread,
Nov 12, 2025, 11:58:08 AM (10 days ago) Nov 12
to GeoAdminCh API
I am having the exact same problem. Somehow all of our company's apps stopped working. I also noticed that sonnendach.ch cannot display anything when an address is given. So I believe this is a bug. 

Christine Meixner

unread,
Nov 13, 2025, 4:34:09 AM (10 days ago) Nov 13
to GeoAdminCh API

Hej!
I have the same problem and changed the parameters to
   features=ch.bfs.gebaeude_wohnungs_register
   type=featuresearch

That delivers the expected EGID.

Matteo De Sabato

unread,
Nov 13, 2025, 6:27:56 AM (10 days ago) Nov 13
to GeoAdminCh API
Yeah I also found the same solution this morning. Thank you for taking the time to post it. This will surely help other people.

Jürg Gnos

unread,
Nov 13, 2025, 7:27:19 AM (10 days ago) Nov 13
to GeoAdminCh API
Hello
I changed the the parameters as Christine suggested.

Old request:
https://api3.geo.admin.ch/rest/services/api/SearchServer?type=locations&searchText=marktstrasse%206%20flums

{"results":[{"attrs":{"detail":"marktstrasse 6 8890 flums 3292 flums ch sg","featureId":"102470174","geom_quadindex":"030123123223330103112","geom_st_box2d":"BOX(744806.6867811423 217554.21251961516,744806.6867811423 217554.21251961516)","label":"Marktstrasse 6 <b>8890 Flums</b>","lat":47.0931510925293,"lon":9.346071243286133,"num":6,"objectclass":"","origin":"address","rank":7,"x":744806.6875,"y":217554.21875,"zoomlevel":10},"id":1063737,"weight":7},{"attrs":{"detail":"marktstrasse 6.1 8890 flums 3292 flums ch sg","featureId":"102885453","geom_quadindex":"030123123223331003322","geom_st_box2d":"BOX(744820.4326947477 217551.5174109264,744820.4326947477 217551.5174109264)","label":"Marktstrasse 6.1 <b>8890 Flums</b>","lat":47.09312438964844,"lon":9.346251487731934,"num":61,"objectclass":"","origin":"address","rank":7,"x":744820.4375,"y":217551.515625,"zoomlevel":10},"id":847820,"weight":4}]}

New request:
https://api3.geo.admin.ch/rest/services/api/SearchServer?features=ch.bfs.gebaeude_wohnungs_register&type=featuresearch&searchText=marktstrasse%206%20flums

{"results":[{"attrs":{"detail":"marktstrasse 6 8890 flums flums _sg_ 191772177","featureId":"191772177_0","feature_id":"191772177_0","geom_quadindex":"030123123223330103112","geom_st_box2d":"BOX(744806.6867811423 217554.21251961516,744806.6867811423 217554.21251961516)","label":"Marktstrasse 6 Flums","lat":47.0931510925293,"layer":"ch.bfs.gebaeude_wohnungs_register","lon":9.346071243286133,"origin":"feature"},"id":2590188,"weight":7},{"attrs":{"detail":"marktstrasse 16 8890 flums flums _sg_ 191134374","featureId":"191134374_0","feature_id":"191134374_0","geom_quadindex":"030123301001302021030","geom_st_box2d":"BOX(744731.2157209037 217344.9227210829,744731.2157209037 217344.9227210829)","label":"Marktstrasse 16 Flums","lat":47.091285705566406,"layer":"ch.bfs.gebaeude_wohnungs_register","lon":9.345010757446289,"origin":"feature"},"id":1710440,"weight":5},{"attrs":{"detail":"marktstrasse 6.1 8890 flums flums _sg_ 191917896","featureId":"191917896_0","feature_id":"191917896_0","geom_quadindex":"030123123223331003322","geom_st_box2d":"BOX(744820.4326947482 217551.5174109264,744820.4326947482 217551.5174109264)","label":"Marktstrasse 6.1 Flums","lat":47.09312438964844,"layer":"ch.bfs.gebaeude_wohnungs_register","lon":9.346251487731934,"origin":"feature"},"id":358362,"weight":4},{"attrs":{"detail":"marktstrasse 20 8890 flums flums _sg_ 1724363","featureId":"1724363_0","feature_id":"1724363_0","geom_quadindex":"030123301001230213333","geom_st_box2d":"BOX(744682.5654154466 217302.65470116513,744682.5654154466 217302.65470116513)","label":"Marktstrasse 20 Flums","lat":47.09091567993164,"layer":"ch.bfs.gebaeude_wohnungs_register","lon":9.344356536865234,"origin":"feature"},"id":1686119,"weight":3},{"attrs":{"detail":"marktstrasse 23 8890 flums flums _sg_ 1724365","featureId":"1724365_0","feature_id":"1724365_0","geom_quadindex":"030123301003010130012","geom_st_box2d":"BOX(744691.3466465918 217257.46535769606,744691.3466465918 217257.46535769606)","label":"Marktstrasse 23 Flums","lat":47.09050750732422,"layer":"ch.bfs.gebaeude_wohnungs_register","lon":9.344457626342773,"origin":"feature"},"id":1920240,"weight":3},{"attrs":{"detail":"marktstrasse 16.1 8890 flums flums _sg_ 504058257","featureId":"504058257_0","feature_id":"504058257_0","geom_quadindex":"030123301001302202212","geom_st_box2d":"BOX(744727.7448297975 217332.8386631351,744727.7448297975 217332.8386631351)","label":"Marktstrasse 16.1 Flums","lat":47.09117889404297,"layer":"ch.bfs.gebaeude_wohnungs_register","lon":9.344961166381836,"origin":"feature"},"id":2394510,"weight":3},{"attrs":{"detail":"marktstrasse 25 8890 flums flums _sg_ 1724367","featureId":"1724367_0","feature_id":"1724367_0","geom_quadindex":"030123301003002213211","geom_st_box2d":"BOX(744621.8555679545 217215.86335943887,744621.8555679545 217215.86335943887)","label":"Marktstrasse 25 Flums","lat":47.09014892578125,"layer":"ch.bfs.gebaeude_wohnungs_register","lon":9.34352970123291,"origin":"feature"},"id":2610279,"weight":3}]}

Unfortunately I also get more results which seem not be correct, e.g.  marktstrasse 25 when searching for  marktstrasse 6.

Also with other addresses the entries are out of order.

Is this also intended or a bug?



Anders Hansson

unread,
Nov 13, 2025, 7:27:25 AM (10 days ago) Nov 13
to GeoAdminCh API
Upon further debugging it is an update from changing datasource and the feature_id no longer refers to the EGID as the documentation says/said, which has caused us some application problems

webk...@gmail.com

unread,
Nov 13, 2025, 8:19:11 AM (10 days ago) Nov 13
to GeoAdminCh API

Good afternoon


On 12 November 2025, we had our data deployment day, on which some of the data sets available on map.geo.admin.ch were updated.  Among other things, this update made the addresses for the Principality of Liechtenstein searchable. 

To do this, the perimeter of the addresses in Swisssearch had to be enlarged and the data source behind the Origin in Swisssearch was changed accordingly. 

As a result, the featureIDs no longer come from ch.bfs.gebaeude_wohnungs_register, but from ch.swisstopo.amtliches-gebaeudeadressverzeichnis.


Attention: On the SearchServer endpoint, you can either perform a type=featuresearch or a type=locations search.


type=featuresearch is linked to a layer and requires the Get parameter features=<layername> to search the data of the desired layer. There is no fuzzy search here.

type=locations, on the other hand, is independent of layers and performs a Swisssearch on various data sources (including addresses). Fuzzy search is implemented here.

In this search, the features parameter is ignored; a query is made on the Swisssearch index, and you can optionally select the data source with origins=xyz.


For your information, there are three ways to perform an address search:


Swisssearch search with origins=address; if desired, the feature ID can be transferred to the feature endpoint of the specialist layer ch.swisstopo.amtliches-gebaeudeadressverzeichnis

FeatureSearch in the layer ch.swisstopo.amtliches-gebaeudeadressverzeichnis; if desired, the feature ID can be transferred to the feature endpoint of the thematic layer ch.swisstopo.amtliches-gebaeudeadressverzeichnis

FeatureSearch in the layer ch.bfs.gebaeude_wohnungs_register; if desired, the feature ID can be transferred to the feature endpoint of the specialist layer ch.bfs.gebaeude_wohnungs_register.

For more information, visit our new technical documentation page: *.geo.admin.ch


If you are intereseted in the EGID you can either use the workaround proposed by Christine or you can do 2 requests:

1) swisssearch type=featuresearch&origins=address&searchText=.......

2) use the returned featureid (=EGAID) in the feature endpoint of ch.swisstopo.amtliches-gebaeudeadressverzeichnis to get additional informations including the EGID, ESID, etc. p.e.

https://api3.geo.admin.ch/rest/services/api/MapServer/ch.swisstopo.amtliches-gebaeudeadressverzeichnis/102061924


I hope that helps.


Best regards,


Helpdesk federal geoportal/ltclm

Anders Hansson

unread,
Nov 13, 2025, 8:30:09 AM (10 days ago) Nov 13
to GeoAdminCh API
We're having the same problem with search results and information inside, using this workaround
For example the ZIP code is no longer included in the label. The only way we can get it is through the details, which would be unreliable to parse due to not knowing the exact format it is structured in, and can find no docs for it.

I think this workaround for searching is actually not a bug, just a poor feature not intended as a workaround. Still think all the info of a building should be available either through bfs.gwr or the main address search

webk...@gmail.com

unread,
Nov 13, 2025, 8:44:34 AM (10 days ago) Nov 13
to GeoAdminCh API
Hej

We understand, that the actual situation is sub optimal. We are going to invest into the data, to find a way to add more information to the layer ch.swisstopo.amtliches-gebaeudeadressverzeichnis. 

Best regards,Helpdesk federal geoportal
Reply all
Reply to author
Forward
0 new messages