Aller au contenu
GET /v1/compare

An indicator across countries

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/who-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/who-api/v1/compare" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/who-api/v1/compare", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/who-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/who-api/v1/compare",
    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": {
        "sex": "SEX_BTSX",
        "year": null,
        "count": 3,
        "results": [
            {
                "low": 81.91157517,
                "high": 82.00027612,
                "year": 2021,
                "value": 81.92274175,
                "region": "Europe",
                "country": "FRA",
                "display": "81.9 [81.9-82.0]",
                "dimension": "SEX_BTSX",
                "country_type": "COUNTRY",
                "dimension_type": "SEX"
            },
            {
                "low": 80.48998607,
                "high": 80.55839127,
                "year": 2021,
                "value": 80.49140555,
                "region": "Europe",
                "country": "DEU",
                "display": "80.5 [80.5-80.6]",
                "dimension": "SEX_BTSX",
                "country_type": "COUNTRY",
                "dimension_type": "SEX"
            },
            {
                "low": 76.32909019,
                "high": 76.47914571,
                "year": 2021,
                "value": 76.37368104,
                "region": "Americas",
                "country": "USA",
                "display": "76.4 [76.3-76.5]",
                "dimension": "SEX_BTSX",
                "country_type": "COUNTRY",
                "dimension_type": "SEX"
            }
        ],
        "indicator": "WHOSIS_000001"
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:14.303Z",
        "request_id": "3d05d2ae-c286-4927-8485-a3ee7a907bf0"
    },
    "status": "ok",
    "message": "Comparison retrieved",
    "success": true
}