Quickstart
Make your first conversion in under a minute.
Get an API key
Sign in with Google to create a free Bearer API key. Production keys use the
uu_live_prefix.Store it securely
Set the key as an environment variable. Never commit it or embed it in client-side code.
bashexport UNIFYUNITS_API_KEY="uu_live_your_key_here"Make your first conversion
Convert 1 foot to meters:
bashcurl "https://api.unifyunits.com/v1/convert?value=1&from=ft&to=m" \ -H "Authorization: Bearer $UNIFYUNITS_API_KEY"Read the response
The result is always a decimal string.
1 ft = 0.3048 mexactly.json{ "data": { "input": { "value": "1", "unit": "ft" }, "result": { "value": "0.3048", "unit": "m" }, "category": "length" } }Try batch conversion
Up to 100 items per call:
bashcurl "https://api.unifyunits.com/v1/batch" \ -X POST \ -H "Authorization: Bearer $UNIFYUNITS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"conversions":[{"value":"1","from":"ft","to":"m"},{"value":"32","from":"F","to":"C"}]}'