/v1/compare
Compare two appliances + payback
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/energycost-api/v1/compare" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/energycost-api/v1/compare", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/energycost-api/v1/compare");
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/energycost-api/v1/compare",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"note": "Positive annual_saving_with_b means device B costs less to run. Payback uses the extra purchase cost of B ÷ annual saving.",
"input": {
"days": 365,
"extra_cost": 0,
"rate_per_kwh": 0.3
},
"cheaper": "b",
"device_a": {
"power_kw": 0.1,
"annual_kwh": 182.5,
"annual_cost": 54.75,
"hours_per_day": 5
},
"device_b": {
"power_kw": 0.06,
"annual_kwh": 109.5,
"annual_cost": 32.85,
"hours_per_day": 5
},
"payback_years": null,
"payback_months": null,
"annual_saving_with_b": 21.9
},
"meta": {
"timestamp": "2026-06-04T01:59:20.495Z",
"request_id": "bd09315c-e754-4b95-8118-5b10c1f3009b"
},
"status": "ok",
"message": "Compare appliances",
"success": true
}