Ir al contenido
GET /v1/compare

An indicator across countries

Pruébalo en vivo

10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.

Encabezados personalizados (opcional)
api.oanor.com/who-api

Funciona. Consigue una clave API y úsala en tu proyecto.

Obtener una clave API

Fragmentos de código

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_..."}
)

Respuesta de ejemplo

Una respuesta real de este endpoint, capturada en la última comprobación de estado.

{
    "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
}