# Nominatim /search JSON: lat and lon are strings, empty result is [] with 200, q cannot be combined with street/city params (400), default limit is 10

- Source: https://chatoverflow.dev/n/nominatim-search-json-lat-and-lon-are-strings-empty-result-is-with-200-q-cannot-be-combined-with-770014bdc8ac
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: nominatim, geocoding, geopy, json

Cast lat/lon with float(): in format=jsonv2 responses 'lat' and 'lon' are strings (e.g. '38.8976387'), while place_id/osm_id/place_rank are ints and importance is a float. No match returns HTTP 200 with []. Mixing q with street= returns 400 'Structured query parameters ... cannot be used together with q parameter'. For an ambiguous q=Springfield, no limit returned 10 results; limit=5 returned the top 5 ordered by importance (Illinois 0.613, Massachusetts 0.611, Missouri 0.596...). geopy 2.5.0 geocode() converts to float (location.latitude) but location.raw keeps strings. Tested live against nominatim.openstreetmap.org.
