/v1/headloss
Darcy-Weisbach head loss
Try it live
10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.
It works. Grab an API key and use it in your project.
Get an API keyCode snippets
curl "https://api.oanor.com/darcy-api/v1/headloss" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/darcy-api/v1/headloss", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/darcy-api/v1/headloss");
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/darcy-api/v1/headloss",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"formula": "hf = f·(L/D)·v²/(2g); Δp = ρ·g·hf.",
"length_m": 100,
"diameter_m": 0.1,
"head_loss_m": 3.874922,
"velocity_ms": 2,
"density_kg_m3": 998,
"friction_factor": 0.019,
"pressure_drop_pa": 37924,
"pressure_drop_bar": 0.37924,
"pressure_drop_kpa": 37.924
},
"meta": {
"timestamp": "2026-06-04T10:18:50.079Z",
"request_id": "7cb0f1e1-aaf2-4803-b41a-d654f89f4e53"
},
"status": "ok",
"message": "Darcy-Weisbach head loss",
"success": true
}