Unit conversion

Converts a value between units in one category: length, weight, temperature, volume, or speed. Returns the converted result in the page's display precision, the value in base units, and the conversion rate (null for temperature, which uses an offset scale). Unit codes must belong to the chosen category. Results match the interactive calculator at everycalc.xyz; every response includes a calculator_url deep link to it.

get/api/v1/calculate/unit-converter

Request

  • Base URL: https://everycalc.xyz
  • URL: https://everycalc.xyz/api/v1/calculate/unit-converter
  • Auth: none declared

Query parameters

category'length' | 'weight' | 'temperature' | 'volume' | 'speed'

Unit category to convert within.

valuenumber required

Value to convert.

from_unit'm' | 'km' | 'cm' | 'mi' | 'ft' | 'in' | 'kg' | 'g' | 'lb' | 'oz' | 'C' | 'F' | 'K' | 'L' | 'mL' | 'gal' | 'floz' | 'ms' | 'kmh' | 'mph'

Unit code to convert from. Must be a unit of the chosen category: length m, km, cm, mi, ft, in; weight kg, g, lb, oz; temperature C, F, K; volume L, mL, gal, floz; speed ms, kmh, mph.

to_unit'm' | 'km' | 'cm' | 'mi' | 'ft' | 'in' | 'kg' | 'g' | 'lb' | 'oz' | 'C' | 'F' | 'K' | 'L' | 'mL' | 'gal' | 'floz' | 'ms' | 'kmh' | 'mph'

Unit code to convert to. Must be a unit of the chosen category, using the same code lists as from_unit.

Response

Calculation result.

Changes

No recorded changes to this operation across all 1 revision of this API.