Aller au contenu
GET /v1/country

One country's four sector debt ratios

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/debttogdp-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/debttogdp-api/v1/country" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/debttogdp-api/v1/country", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/debttogdp-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/debttogdp-api/v1/country",
    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": "Debt-to-GDP in percent. government is general-government debt; households and corporates (non-financial) are the private sub-sectors; private_total is the whole private non-financial sector. From BIS total credit at market value.",
        "period": "2025-Q3",
        "source": "BIS",
        "country": "US",
        "corporates": 72.5,
        "government": 109.7,
        "households": 68,
        "private_total": 140.4
    },
    "meta": {
        "timestamp": "2026-06-12T10:35:37.719Z",
        "request_id": "ca9514d4-3e2d-4569-b0c1-6f060c2cba69"
    },
    "status": "ok",
    "message": "Country retrieved successfully",
    "success": true
}