Note that what you’re using is Nominatim, not the OSM API. They’re two very different things: one is a geocoder, the other is for editing the OSM database.