Docs/Format Utils/GET /v1/weight

GET /v1/weightWeight / mass unit converter

Format Utils lf-format-utils

Converts a weight from one unit to another. Weight / mass unit converter

Query Parameters

ParameterTypeRequiredDescription
valuenumberYesWeight value
fromstringNoSource unit (mg, g, kg, t, oz, lb, st, carat, ...)
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/weight?value=<value>' -H 'Authorization: Bearer lf_YourApiKey'

Python Example

import requests
url = 'https://lf-format-utils.laminarforge.dev/v1/weight'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'value': '<value>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())