City based only on longitude, latitude? What you mean is called "reverse geocoding". See
* https://wiki.openstreetmap.org/wiki/Frameworks#Forward_and_reverse_geocoding and
* https://wiki.openstreetmap.org/wiki/Nominatim#Reverse_Geocoding
* https://wiki.openstreetmap.org/wiki/Category:Geocoding (e.g. Photon also can do reverse geocoding) and, of course,
* https://help.openstreetmap.org/tags/reversegeocoding/?sort=mostvoted
If that does not help, please describe your use case.
Please note, that although you do not use maps, you still need to obey [our few license requirements](https://www.openstreetmap.org/copyright).requirements](https://www.openstreetmap.org/copyright) and (if you do not run your own server) the usage restrictions/terms of the server which you will be using.