# Debt Service Ratio (Debt Burden) API
> How much of a country's income goes to servicing debt — interest plus principal — read live from the Bank for International Settlements' open statistics, no key, nothing stored. The credit-to-GDP gap measures how much debt has built up; the debt service ratio (DSR) measures how heavy it is to carry. It is the share of income that borrowers must spend each period just to keep current on their debts, and a high or rising DSR squeezes consumption and investment and has reliably led recessions. The BIS publishes the DSR for households, for non-financial corporations and for the private non-financial sector as a whole. The latest endpoint returns every covered country's most recent DSR for all three sectors; the country endpoint returns one country's household, corporate and total DSR with the reference quarter; the history endpoint returns the quarterly series for a chosen sector. This is the debt-burden / debt-service macro cut — distinct from the credit-to-GDP gap (debt build-up), the credit-growth (lending volumes), the bank-rate, money-supply and FX APIs in the catalogue. A country is a BIS reference area (US, GB, DE, JP …) given as an ISO-2 code or a common name; data is quarterly with the usual statistical lag.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/debtservice-api/..."
```

## Pricing
- **Free** (Free) — 700 calls/Mo, 2 req/s
- **Starter** ($9/Mo) — 16,800 calls/Mo, 6 req/s
- **Pro** ($28/Mo) — 86,000 calls/Mo, 16 req/s
- **Business** ($65/Mo) — 460,000 calls/Mo, 40 req/s

## Endpoints

### Debt Service

#### `GET /v1/country` — One country's household, corporate & total DSR

**Parameters:**
- `country` (query, required, string) — ISO-2 code or common name Example: `US`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/debtservice-api/v1/country?country=US"
```

**Response:**
```json
{
    "data": {
        "note": "Debt service ratios in percent of income. household_dsr (H) is the most-watched read on consumer debt stress; corporate_dsr (N) covers non-financial firms; private_total_dsr (P) is the whole private non-financial sector.",
        "period": "2025-Q3",
        "source": "BIS",
        "country": "US",
        "corporate_dsr": 37.8,
        "household_dsr": 7.9,
        "private_total_dsr": 14.1
    },
    "meta": {
        "timestamp": "2026-06-12T10:35:40.612Z",
        "request_id": "e50a0902-a6ad-48a0-adb5-e5777399ed61"
    },
    "status": "ok",
    "message": "Country retrieved successfully",
    "success": true
}
```

#### `GET /v1/history` — One country's quarterly DSR for a sector

**Parameters:**
- `country` (query, required, string) — ISO-2 code or common name Example: `US`
- `sector` (query, optional, string) — households (default), corporates or private_total Example: `households`
- `quarters` (query, optional, string) — Number of recent quarters (2-240, default 40) Example: `40`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/debtservice-api/v1/history?country=US&sector=households&quarters=40"
```

**Response:**
```json
{
    "data": {
        "count": 40,
        "sector": "households",
        "source": "BIS",
        "country": "US",
        "history": [
            {
                "dsr": 8.1,
                "period": "2015-Q4"
            },
            {
                "dsr": 8.1,
                "period": "2016-Q1"
            },
            {
                "dsr": 8.1,
                "period": "2016-Q2"
            },
            {
                "dsr": 8.2,
                "period": "2016-Q3"
            },
            {
                "dsr": 8.2,
                "period": "2016-Q4"
            },
            {
                "dsr": 8.1,
                "period": "2017-Q1"
            },
            {
                "dsr": 8.1,
                "period": "2017-Q2"
            },
            {
                "dsr": 8.1,
                "period": "2017-Q3"
            },
            {
                "dsr": 8.1,
                "period": "2017-Q4"
            },
            {
                "dsr": 8.1,
                "period": "2018-Q1"
            },
            {
                "dsr": 8.1,
                "period": "2018-Q2"
            },
            {
                "dsr": 8.1,
                "period": "2018-Q3"
            },
            {
                "dsr": 8.1,
                "period": "2018-Q4"
            },
            {
                "dsr": 8,
                "period": "2019-Q1"
            },
            {
                "dsr": 8,
                "per
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/latest` — Every country's latest debt service ratios

**Parameters:**
- `sort` (query, optional, string) — Sort: household (default), corporate, total or country Example: `household`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/debtservice-api/v1/latest?sort=household"
```

**Response:**
```json
{
    "data": {
        "note": "DSR = share of income spent servicing debt (interest + principal), in percent. household_dsr is for households, corporate_dsr for non-financial corporations, private_total_dsr for the whole private non-financial sector. A high or rising DSR squeezes spending and has led recessions. Sort by household (default), corporate, total or country.",
        "count": 17,
        "source": "BIS",
        "countries": [
            {
                "period": "2025-Q3",
                "country": "NO",
                "corporate_dsr": 35.8,
                "household_dsr": 20.8,
                "private_total_dsr": 28
            },
            {
                "period": "2025-Q3",
                "country": "AU",
                "corporate_dsr": 39.4,
                "household_dsr": 15.6,
                "private_total_dsr": 20.1
            },
            {
                "period": "2025-Q3",
                "country": "CA",
                "corporate_dsr": 57.4,
                "household_dsr": 13.9,
                "private_total_dsr": 25.3
            },
            {
                "period": "2025-Q3",
                "country": "NL",
                "corporate_dsr": 49.5,
                "household_dsr": 12.9,
                "private_total_dsr": 25.9
            },
            {
                "period": "2025-Q3",
                "country": "DK",
                "corporate_dsr": 42.5,
                "household_dsr": 11.8,
                "pr
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/debtservice-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "country is an ISO-2 code (US, DE, GB, JP) or a common name. history sector is households (default), corporates or private_total. history quarters is 2-240 (default 40). Quarterly data with the usual statistical lag; briefly cached.",
        "source": "BIS Data Portal (stats.bis.org/api/v2, WS_DSR, quarterly, live)",
        "sectors": [
            "households",
            "corporates",
            "private_total"
        ],
        "service": "debtservice-api",
        "countries": 17,
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/latest": "Every country's latest household/corporate/total DSR, sortable (sort=household|corporate|total|country).",
            "GET /v1/country": "One country's household, corporate and total debt service ratio (country=US).",
            "GET /v1/history": "One country's quarterly DSR for a sector (country=US, sector=households, quarters=40)."
        },
        "description": "Debt service ratio (DSR) — how much of a country's income goes to servicing debt, from the BIS open statistics (no key, nothing stored). The DSR is the share of income spent on interest plus principal; a high or rising DSR squeezes consumption and has led recessions. latest returns every country's most recent DSR for households, corporates and the private sector; country returns one country's three sector DSRs; history returns a chosen sector's quarterly series. The debt-burden / debt-service
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/debtservice-api
OpenAPI spec: https://www.oanor.com/api/debtservice-api/openapi.json
