UnifyUnits Developers
GET /v1/categories/:category Public

Get a single category with its units

Returns a single measurement category and all units it contains. Use the id field from GET /v1/categories as the :category path parameter.

Prefer a language client when available: JavaScript / TypeScript, Python, or PHP (Laravel). Samples on this page stay raw HTTP so they match the OpenAPI contract.

Parameters

Name Type Required Description
category string Yes Category id (path parameter)

Possible errors

UNKNOWN_CATEGORY · INVALID_REQUEST · RATE_LIMIT_EXCEEDED

All endpoints · Error reference

cURL
curl "https://api.unifyunits.com/v1/categories/mass"

Response 200

json
{
  "data": {
    "id": "mass",
    "name": "Mass",
    "base_unit": "kg",
    "unit_count": 10,
    "units": [
      {
        "id": "kg",
        "name": "Kilogram",
        "category": "mass",
        "aliases": ["kilograms", "kilo", "kilos"],
        "verification": "legacy",
        "factor": "1"
      }
    ]
  }
}