Nominatim does not return house_number in most requests

I’m working on an implementation using the “nominatim” API which returns addresses based on user input. However, I noticed that it has a strange behavior, even if I enter the address correctly with the house number, most of the time it doesn’t return the “house_number”. Is there anything I can do in the request so that it correctly returns the address along with the house_number?

An example of a request that returned house_number:
Request: https://nominatim.openstreetmap.org/search?format=json&addressdetails=1&q=teodoro vilardebo 3015

{
        "place_id": 9532786,
        "licence": "Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright",
        "osm_type": "way",
        "osm_id": 306169166,
        "lat": "-34.60305715714286",
        "lon": "-58.49858004285714",
        "class": "place",
        "type": "house",
        "place_rank": 30,
        "importance": 9.99999999995449e-06,
        "addresstype": "place",
        "name": "",
        "display_name": "3015, Teodoro Vilardebo, Villa del Parque, Buenos Aires, Comuna 11, Ciudad Autónoma de Buenos Aires, C1417FYN, Argentina",
        "address": {
            "house_number": "3015",
            "road": "Teodoro Vilardebo",
            "suburb": "Villa del Parque",
            "city": "Buenos Aires",
            "ISO3166-2-lvl8": "AR-C",
            "state_district": "Comuna 11",
            "state": "Ciudad Autónoma de Buenos Aires",
            "ISO3166-2-lvl4": "AR-C",
            "postcode": "C1417FYN",
            "country": "Argentina",
            "country_code": "ar"
        },
        "boundingbox": [
            "-34.6031072",
            "-34.6030072",
            "-58.4986300",
            "-58.4985300"
        ]
    }

And other that the most cases not returns the house number:
Request: https://nominatim.openstreetmap.org/search?format=json&addressdetails=1&q=Rua moçambique 193, Americana

[
    {
        "place_id": 8814602,
        "licence": "Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright",
        "osm_type": "way",
        "osm_id": 339287151,
        "lat": "-22.72530515",
        "lon": "-47.350286600000004",
        "class": "highway",
        "type": "residential",
        "place_rank": 26,
        "importance": 0.05339625162127104,
        "addresstype": "road",
        "name": "Rua Moçambique",
        "display_name": "Rua Moçambique, Vila Dainese, Americana, Região Imediata de Campinas, Região Metropolitana de Campinas, Região Geográfica Intermediária de Campinas, São Paulo, Região Sudeste, 13469-490, Brasil",
        "address": {
            "road": "Rua Moçambique",
            "suburb": "Vila Dainese",
            "city_district": "Americana",
            "city": "Americana",
            "municipality": "Região Imediata de Campinas",
            "county": "Região Metropolitana de Campinas",
            "state_district": "Região Geográfica Intermediária de Campinas",
            "state": "São Paulo",
            "ISO3166-2-lvl4": "BR-SP",
            "region": "Região Sudeste",
            "postcode": "13469-490",
            "country": "Brasil",
            "country_code": "br"
        },
        "boundingbox": [
            "-22.7257061",
            "-22.7249042",
            "-47.3513631",
            "-47.3492101"
        ]
    }
]

Gabriel, do you think it’s better to move this question to Help and Support area, with the tag ‘nominatim’? I believe you’ll get your answer faster.

1 Like

Good advice, thanks Matheus!

This is the Help and Support area: Help and support - OpenStreetMap Community Forum

Not sure if you can move it, or otherwise you can create a new topic there and close this one.

1 Like

Are you sure the house number is actually mapped in OSM?

3 Likes

Thanks, I’m new here so I’m a little lost. The topic is updated to help and support. and I updated the request with more details

1 Like

I don’t now, because, in some requests the house_number returns but in the most cases of requests not returns the house_number.

The OSM geo-database is community-maintained. Areas with active volunteers or available open data imports have better coverage, but many house numbers are still missing.


So If the house number is missing( ~ The house numbers for the given location are not mapped in the OSM. ) then OSM Solution: “Please don’t report missing data; instead, go and add it!” ( via: Nominatim/FAQ - OpenStreetMap Wiki ).

Imho:

There is a “Structures API Call” where you can separately specify the country code, city, and house number.

Please use as a debug tool: Nominatim Demo

Debugging addresses can be challenging due to typos, translation variations, or inconsistencies in local-to-English naming. So always specify the country code to minimize issues!

1 Like

Got it, thanks a lot for the information and explanation.