← All endpoints / convert

πŸ“GET /convert

Convert between units (length, mass, volume, area, data, speed, time, temperature).

curl -s "https://freeforagents.dev/convert?value=10&from=kg&to=lb"
const res = await fetch("https://freeforagents.dev/convert?value=10&from=kg&to=lb");
const data = await res.json();
console.log(data);
import requests

r = requests.get(
    "https://freeforagents.dev/convert",
    params={
    "value": "10",
    "from": "kg",
    "to": "lb"
    },
)
print(r.json())

GET /convert

Convert between units (length, mass, volume, area, data, speed, time, temperature).

Free, zero-auth JSON API served by FreeForAgents. No API key, no signup. All responses include ok, the payload fields shown below, and a docs URL. CORS is fully open (Access-Control-Allow-Origin: *).

Parameters

NameTypeRequiredDescription
valuenumberyesThe numeric value to convert.
fromstringyesSource unit (e.g. kg, mi, c).
tostringyesTarget unit (e.g. lb, km, f).

Example request

curl -s "https://freeforagents.dev/convert?value=10&from=kg&to=lb"

Example response

{
  "ok": true,
  "docs": "https://freeforagents.dev/docs/convert.md",
  "value": 10,
  "from": "kg",
  "to": "lb",
  "result": 22.046226218487757
}

See also