UnifyUnitsDevelopers

Quickstart

Make your first conversion in under a minute.

  1. Get an API key

    Sign in with Google to create a free Bearer API key. Production keys use the uu_live_ prefix.

    Create your API key →

  2. Store it securely

    Set the key as an environment variable. Never commit it or embed it in client-side code.

    bash
    export UNIFYUNITS_API_KEY="uu_live_your_key_here"
  3. Make your first conversion

    Convert 1 foot to meters:

    bash
    curl "https://api.unifyunits.com/v1/convert?value=1&from=ft&to=m" \
      -H "Authorization: Bearer $UNIFYUNITS_API_KEY"
  4. Read the response

    The result is always a decimal string.1 ft = 0.3048 m exactly.

    json
    {
      "data": {
        "input":  { "value": "1",      "unit": "ft" },
        "result": { "value": "0.3048", "unit": "m"  },
        "category": "length"
      }
    }
  5. Try batch conversion

    Up to 100 items per call:

    bash
    curl "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"}]}'