GET /v1/distanceDistance / length unit converter
Format Utils lf-format-utils
Converts a distance from one unit to another. Distance / length unit converter
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
value | number | Yes | Distance value |
from | string | No | Source unit (mm, cm, m, km, in, ft, yd, mi, nmi, ...) |
to | string | No | Target unit |
Response Schema
input (number): Input value
output (number): Converted value
from (string): Source unit
to (string): Target unit
cURL Example
curl 'https://lf-format-utils.laminarforge.dev/v1/distance?value=<value>' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-format-utils.laminarforge.dev/v1/distance'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'value': '<value>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())