/v1/convert
Convert hardness units
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/hardness-api/v1/convert" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/hardness-api/v1/convert", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/hardness-api/v1/convert");
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/convert",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"note": "Converted via ppm (mg/L as CaCO₃). 1 gpg = 17.118 ppm; 1 °dH = 17.848; 1 °f = 10; 1 °Clark = 14.254.",
"input": {
"from": "ppm",
"value": 120
},
"hardness": {
"mg_per_l": 120,
"french_fh": 12,
"german_dh": 6.7234,
"ppm_caco3": 120,
"mmol_per_l": 1.19896,
"english_clark": 8.4187,
"grains_per_gallon": 7.0102
},
"classification": "moderately hard"
},
"meta": {
"timestamp": "2026-06-04T01:59:14.836Z",
"request_id": "bda8b020-ecea-44ae-aebf-abfab6b127da"
},
"status": "ok",
"message": "Hardness conversion",
"success": true
}