Skip to main content

Find nearby locations

GET 

/v2/nearby

Returns known addresses within a specified radius of an origin point.

Two ways to specify the origin:

  • By GPS code: ?address=AK-484-9321
  • By coordinates: ?lat=5.6222&lng=-0.1729

Distances are calculated using the Haversine formula for accurate great-circle distance on Earth's surface. Results are sorted by distance (closest first) and include the distance in kilometers.

Pagination: Supports both offset-based and cursor-based pagination.

  • Offset (legacy): ?offset=10&limit=10 — simple but slow at depth
  • Cursor (recommended): ?cursor=0.5&limit=10 — pass the next_cursor value from the previous response. Efficient for large result sets.

When cursor is provided, offset is ignored. The response includes has_more (boolean) and next_cursor (the distance_km to pass for the next page).

Note: Results come from previously looked-up addresses stored in the database. The more the API is used, the richer the nearby results become.

Request

Responses

Nearby locations found