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"
]
}
]