/v1/between
Duration between two instants
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/duration-api/v1/between" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/duration-api/v1/between", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/duration-api/v1/between");
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/duration-api/v1/between",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"end": "2026-01-02T03:04:05.000Z",
"start": "2026-01-01T00:00:00.000Z",
"iso8601": "P1DT3H4M5S",
"direction": "end after start",
"humanized": "1 day, 3 hours, 4 minutes and 5 seconds",
"components": {
"days": 1,
"hours": 3,
"weeks": 0,
"years": 0,
"months": 0,
"minutes": 4,
"seconds": 5
},
"total_seconds": 97445,
"total_milliseconds": 97445000
},
"meta": {
"timestamp": "2026-06-02T16:51:50.004Z",
"request_id": "d61a2d5d-14cb-4610-813d-ff77c7b9d490"
},
"status": "ok",
"message": "Duration between two instants",
"success": true
}