GET /v1/geo-toolsGeo Distance / Bounding Box / Center / Bearing
Business Utils lf-business-utils
Answers map questions about points: how far apart they are, the box around one, their midpoint, or the compass direction between them. Modes: distance, bounding, center, bearing. Returns km, mi, bearing, and bounding_box.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
mode | string | Yes | distance, bounding, center, or bearing |
lat1 | number | No | First latitude |
lng1 | number | No | First longitude |
lat2 | number | No | Second latitude |
lng2 | number | No | Second longitude |
radius_km | number | No | Radius for bounding mode |
Response Schema
km (number): Distance in km
mi (number): Distance in miles
bearing (number): Initial bearing degrees
bounding_box (object): Lat/lng bounds
cURL Example
curl 'https://lf-business-utils.laminarforge.dev/v1/geo-tools?mode=<mode>' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-business-utils.laminarforge.dev/v1/geo-tools'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'mode': '<mode>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())