Skip to content

Geocoding Reverse

Get address information from coordinates (latitude/longitude) using OpenStreetMap Nominatim reverse geocoding service. Public endpoint.

Endpoint

GET /v1/accounts/geocoding/reverse/

Authentication

Not required (public endpoint)

Query Parameters

Parameter Type Required Description
lat float Yes Latitude coordinate
lon float Yes Longitude coordinate

Response

Success (200 OK)

Returns address information for the given coordinates:

{
  "place_id": 123456789,
  "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
  "osm_type": "way",
  "osm_id": 123456789,
  "lat": "40.37",
  "lon": "49.84",
  "display_name": "Baku, Azerbaijan",
  "address": {
    "city": "Baku",
    "country": "Azerbaijan",
    "country_code": "az"
  }
}

Error Responses

Bad Request (400)

{
  "error": "Both 'lat' and 'lon' parameters are required"
}

Internal Server Error (500)

{
  "error": "Failed to fetch from geocoding service"
}

or

{
  "error": "Failed to read response"
}

or

{
  "error": "Failed to parse response"
}

Example Request

curl -X GET "https://api.luxmart.site/v1/accounts/geocoding/reverse/?lat=40.37&lon=49.84"

Notes

  • This endpoint proxies requests to OpenStreetMap Nominatim reverse geocoding service
  • Both lat and lon parameters are required
  • Results include detailed address information when available
  • This is a public endpoint, no authentication required
  • The service uses a 10-second timeout for external requests