/v1/post-count
Posts for a run
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/handrail-api/v1/post-count" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/handrail-api/v1/post-count", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/handrail-api/v1/post-count");
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/handrail-api/v1/post-count",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"note": "A run of railing needs one more post than it has spans: spans = ceil(run ÷ max post spacing), posts = spans + 1, and the even spacing = run ÷ spans. Guard posts are typically held to ~1.8 m so the rail stays stiff and meets the in-fill load; a 6 m run at 1.8 m max takes 4 spans and 5 posts at a tidy 1.5 m each. Corners and gate posts are extra.",
"spans": 4,
"inputs": {
"total_run_mm": 6000,
"max_spacing_mm": 1800
},
"post_count": 5,
"actual_spacing_mm": 1500
},
"meta": {
"timestamp": "2026-06-07T08:17:48.211Z",
"request_id": "279d7d97-c5de-4515-ad1e-086a18af7d38"
},
"status": "ok",
"message": "Post count",
"success": true
}