Docs/Format Utils/GET /v1/distance

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

ParameterTypeRequiredDescription
valuenumberYesDistance value
fromstringNoSource unit (mm, cm, m, km, in, ft, yd, mi, nmi, ...)
tostringNoTarget 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())