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 thenext_cursorvalue 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
- 200
- 400
- 404
- 429
- 502
Nearby locations found
Invalid parameters
Origin address not found
Rate limit exceeded
Response Headers
Maximum requests allowed in the window
Requests remaining in current window
Seconds until the rate limit resets
Upstream service error