Ir al contenido
GET /v1/country

A country headline macro snapshot

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/imf-api

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

Obtener una clave API

Fragmentos de código

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

Respuesta de ejemplo

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

{
    "data": {
        "name": "Germany",
        "note": "latest values may be IMF forecasts. recent shows the last six years (actual + projected).",
        "source": "IMF",
        "country": "DEU",
        "indicators": {
            "LUR": {
                "label": "Unemployment rate (%)",
                "recent": {
                    "2026": 3.9,
                    "2027": 3.5,
                    "2028": 3.2,
                    "2029": 3,
                    "2030": 2.9,
                    "2031": 2.9
                },
                "latest_year": "2031",
                "latest_value": 2.9
            },
            "NGDPDPC": {
                "label": "GDP per capita (current US$)",
                "recent": {
                    "2026": 65302.893,
                    "2027": 67613.107,
                    "2028": 69804.854,
                    "2029": 72087.756,
                    "2030": 74263.697,
                    "2031": 76425.902
                },
                "latest_year": "2031",
                "latest_value": 76425.902
            },
            "PCPIPCH": {
                "label": "Inflation, avg consumer prices (% change)",
                "recent": {
                    "2026": 2.7,
                    "2027": 2.3,
                    "2028": 2,
                    "2029": 2.2,
                    "2030": 2.2,
                    "2031": 2.1
                },
                "latest_year": "2031",
                "latest_value": 2.1
            },
            "BCA_NGDPD": {
                "label": "Current account balance (% of GDP)",
                "recent": {
                    "2026": 3.9,
                    "2027": 3.8,
                    "2028": 3.8,
                    "2029": 3.8,
                    "2030": 3.8,
                    "2031": 3.8
                },
                "latest_year": "2031",
                "latest_value": 3.8
            },
            "NGDP_RPCH": {
                "label": "Real GDP growth (%)",
                "recent": {
                    "2026": 0.8,
                    "2027": 1.2,
                    "2028": 1.2,
                    "2029": 0.9,
                    "2030": 0.7,
                    "2031": 0.6
                },
                "latest_year": "2031",
                "latest_value": 0.6
            },
            "GGXWDG_NGDP": {
                "label": "Government gross debt (% of GDP)",
                "recent": {
                    "2026": 64.6,
                    "2027": 66.5,
                    "2028": 68.4,
                    "2029": 70.2,
                    "2030": 72,
                    "2031": 73.7
                },
                "latest_year": "2031",
                "latest_value": 73.7
            }
        }
    },
    "meta": {
        "timestamp": "2026-06-12T01:43:04.592Z",
        "request_id": "f06b6dd9-596e-4fd6-ad45-330577b2537d"
    },
    "status": "ok",
    "message": "Country retrieved successfully",
    "su
…