/v1/hardy-weinberg
Hardy-Weinberg
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/genetics-api/v1/hardy-weinberg" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/genetics-api/v1/hardy-weinberg", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/genetics-api/v1/hardy-weinberg");
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/genetics-api/v1/hardy-weinberg",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"note": "Hardy-Weinberg: p² + 2pq + q² = 1. q² is the recessive (affected) frequency; 2pq is the carrier frequency.",
"inputs": {
"source": "p"
},
"heterozygous_Aa": 0.48,
"carrier_frequency": 0.48,
"dominant_allele_freq_p": 0.6,
"homozygous_dominant_AA": 0.36,
"homozygous_recessive_aa": 0.16,
"recessive_allele_freq_q": 0.4
},
"meta": {
"timestamp": "2026-06-05T03:09:02.263Z",
"request_id": "59cfb750-e965-490a-958a-1bb749ae33db"
},
"status": "ok",
"message": "Hardy-Weinberg",
"success": true
}