Convert a value between units
convert_unitsConvert a number from one unit to another and return the exact factor, whether the factor is exact by definition, and the URL of the page that explains it. Supports linear units (length, mass, volume, energy, …) and temperature. Currency is deliberately not supported.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Unit key to convert to, e.g. "ft", "m", "lb", "F". | |
| from | Yes | Unit key to convert from, e.g. "m", "ft", "kg", "C". | |
| lang | No | Optional language for the framing lines of the response, as a BCP-47 tag such as "sv", "sv-SE", "de" or "zh-TW". Pass the language you are answering the user in, so the citation line comes back in that language. Values, unit symbols and the URL are always unchanged. | |
| value | Yes | The number to convert. | |
| category | No | Optional category id (length, mass, volume, …). Only needed when the same unit key exists in more than one category. |