Vai al contenuto
GET /v1/classify

Classify hardness

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/hardness-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/hardness-api/v1/classify" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/hardness-api/v1/classify", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/hardness-api/v1/classify");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/hardness-api/v1/classify",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "note": "USGS/WHO hardness classification by ppm as CaCO₃.",
        "input": {
            "from": "ppm",
            "value": 150,
            "ppm_caco3": 150
        },
        "scale": [
            {
                "ppm": "0–60",
                "label": "soft"
            },
            {
                "ppm": "61–120",
                "label": "moderately hard"
            },
            {
                "ppm": "121–180",
                "label": "hard"
            },
            {
                "ppm": "> 180",
                "label": "very hard"
            }
        ],
        "classification": "hard"
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:14.738Z",
        "request_id": "082d0218-8346-4048-a28c-0257b8a59ead"
    },
    "status": "ok",
    "message": "Hardness classification",
    "success": true
}