city isn't included in search & lookup endpoint, but in details endpoint #3187
-
We have this very specific case of missing "city". The result contains the city only in the display_name field, but not in the address field: https://nominatim.openstreetmap.org/search.php?street=Postwai+1&city=Nebel&country=Germany&postalcode=25946&format=jsonv2&addressdetails=1 However, the city is there, if we use the details api ("for debugging"): Any idea why the city is excluded from the address field in the "non-debugging" responses? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Nominatim assigns https://www.openstreetmap.org/relation/1428589 (admin_level=7) to the field "municipality" but then the field 'city' and 'municipality' usually mean the same and only one gets returned. With many places in the world it's not clear which of the two fields is more relevant to the user. The 'geocodejson' output has improved logic https://nominatim.openstreetmap.org/lookup?osm_ids=N668984942&format=geocodejson&addressdetails=1 |
Beta Was this translation helpful? Give feedback.
Nominatim assigns https://www.openstreetmap.org/relation/1428589 (admin_level=7) to the field "municipality" but then the field 'city' and 'municipality' usually mean the same and only one gets returned. With many places in the world it's not clear which of the two fields is more relevant to the user.
The 'geocodejson' output has improved logic https://nominatim.openstreetmap.org/lookup?osm_ids=N668984942&format=geocodejson&addressdetails=1