Search by City only? #3415
Replies: 2 comments
-
Is that the GeoPy library? Instead of string you can also supply a dict where you can set the city, state, country. https://geopy.readthedocs.io/en/latest/#geopy.geocoders.Nominatim.geocode You can test that https://nominatim.openstreetmap.org/ui/search.html?city=houston&state=tx when clicking the 'Structured' tab. |
Beta Was this translation helpful? Give feedback.
-
The search for 'Houston, Texas, United States' works fine on nominatim.openstreetmap.org. This might indicate that there is a setup issue with your own installation. I recommend you do a bit of digging, what is going wrong here. What is the output for the details for Druso (https://nominatim.openstreetmap.org/details.php?osmtype=N&osmid=151491189&class=place&addressdetails=1&format=json) and Huston (https://nominatim.openstreetmap.org/details.php?osmtype=R&osmid=2688911&class=boundary&addressdetails=1&format=json) on your server? |
Beta Was this translation helpful? Give feedback.
-
Hi,
We are trying to use the API to do a search by city for data that is entered for job applicants in a "Location" free text field. We are currently getting Druso, TX when we try and geocode "Houston, Texas, United States". Droso, TX is in Houston county in Texas. Is there a way to have the search API only search for Cities? We are self hosting and calling with the Python API as shown below
Beta Was this translation helpful? Give feedback.
All reactions