Aller au contenu
GET /v1/herd-immunity

Herd-immunity threshold

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/epidemic-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/epidemic-api/v1/herd-immunity" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/epidemic-api/v1/herd-immunity", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/epidemic-api/v1/herd-immunity");
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/epidemic-api/v1/herd-immunity",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "note": "Herd-immunity threshold HIT = 1 − 1/R0 — the immune fraction at which spread stops. Adjust for an imperfect vaccine by dividing by its efficacy. Measles (R0≈15) needs ≈93%.",
        "inputs": {
            "r0": 3,
            "vaccine_efficacy": 0.9
        },
        "herd_immunity_percent": 66.6667,
        "herd_immunity_threshold": 0.666667,
        "vaccination_percent_needed": 74.0741,
        "vaccination_coverage_needed": 0.740741
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:18.080Z",
        "request_id": "54b8f2bb-cf65-4f4d-aee2-e00a8ebbf3fa"
    },
    "status": "ok",
    "message": "Herd immunity threshold",
    "success": true
}