# World Government Bond Yields API
> Live long-term (about 10-year) government bond interest rates for around 44 countries, side by side, served from the OECD's official statistics in a single live call. The long-term government bond yield is the benchmark cost of money for an economy, and this puts the whole developed world on one screen — the United States, Germany, the United Kingdom, Japan, Canada, Australia, Brazil, Switzerland, Mexico, Colombia and dozens more — each with its latest published rate and the month it covers. The yields endpoint returns every country ranked by yield together with its spread over the German Bund, the euro-area safe-asset benchmark: in mid-2026 Colombia near 13.2%, Mexico 9.5% and Brazil 9.1% sit at the top while Switzerland near 0.5% sits at the bottom, with the US around 4.5% and the German Bund around 3.0%. The country endpoint returns one country's long-term yield with two years of recent monthly history. The spreads endpoint ranks every country by its yield spread over a chosen benchmark — Germany or the United States — the risk-and-rate-differential picture fixed-income and macro desks watch. This is the international-rates comparison layer for any fixed-income, forex, macro or research app. Live from the OECD, nothing stored. Distinct from single-country central-bank and yield-curve APIs — this is the cross-country sovereign-yield comparison across the developed world. Monthly OECD series; 4 endpoints. No key, no cache.

## 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/worldbonds-api/..."
```

## Pricing
- **Free** (Free) — 800 calls/Mo, 2 req/s
- **Starter** ($11/Mo) — 15,000 calls/Mo, 6 req/s
- **Pro** ($29/Mo) — 90,000 calls/Mo, 15 req/s
- **Mega** ($69/Mo) — 500,000 calls/Mo, 40 req/s

## Endpoints

### Bonds

#### `GET /v1/country` — One country's long-term yield + history

**Parameters:**
- `code` (query, required, string) — Country code (ISO-3 like USA/DEU/GBR, or common ISO-2 like US/GB) Example: `USA`

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

**Response:**
```json
{
    "data": {
        "code": "USA",
        "period": "2026-05",
        "source": "OECD",
        "country": "United States",
        "history": [
            {
                "value": 4.31,
                "period": "2024-06"
            },
            {
                "value": 4.25,
                "period": "2024-07"
            },
            {
                "value": 3.87,
                "period": "2024-08"
            },
            {
                "value": 3.72,
                "period": "2024-09"
            },
            {
                "value": 4.1,
                "period": "2024-10"
            },
            {
                "value": 4.36,
                "period": "2024-11"
            },
            {
                "value": 4.39,
                "period": "2024-12"
            },
            {
                "value": 4.63,
                "period": "2025-01"
            },
            {
                "value": 4.45,
                "period": "2025-02"
            },
            {
                "value": 4.28,
                "period": "2025-03"
            },
            {
                "value": 4.28,
                "period": "2025-04"
            },
            {
                "value": 4.42,
                "period": "2025-05"
            },
            {
                "value": 4.38,
                "period": "2025-06"
            },
            {
                "value": 4.39,
                "period": "2025-07"
            },
      
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/spreads` — Countries ranked by spread over a benchmark

**Parameters:**
- `vs` (query, optional, string) — Benchmark country (DEU or USA; default DEU) Example: `DEU`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/worldbonds-api/v1/spreads?vs=DEU"
```

**Response:**
```json
{
    "data": {
        "as_of": "2026-05",
        "count": 43,
        "source": "OECD",
        "spreads": [
            {
                "code": "COL",
                "country": "Colombia",
                "yield_pct": 13.16,
                "spread_bps": 1011
            },
            {
                "code": "MEX",
                "country": "Mexico",
                "yield_pct": 9.45,
                "spread_bps": 640
            },
            {
                "code": "BRA",
                "country": "Brazil",
                "yield_pct": 9.13,
                "spread_bps": 608
            },
            {
                "code": "ZAF",
                "country": "South Africa",
                "yield_pct": 8.995,
                "spread_bps": 595
            },
            {
                "code": "IND",
                "country": "India",
                "yield_pct": 6.84,
                "spread_bps": 379
            },
            {
                "code": "CRI",
                "country": "Costa Rica",
                "yield_pct": 6.6325,
                "spread_bps": 359
            },
            {
                "code": "ROU",
                "country": "Romania",
                "yield_pct": 6.15,
                "spread_bps": 310
            },
            {
                "code": "POL",
                "country": "Poland",
                "yield_pct": 5.74,
                "spread_bps": 269
            },
            {
                "code": "HUN"
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/yields` — All countries' latest long-term yields, ranked

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

**Response:**
```json
{
    "data": {
        "as_of": "2026-05",
        "count": 44,
        "source": "OECD",
        "yields": [
            {
                "code": "COL",
                "period": "2026-04",
                "country": "Colombia",
                "yield_pct": 13.16,
                "spread_vs_bund_bps": 1011
            },
            {
                "code": "MEX",
                "period": "2026-05",
                "country": "Mexico",
                "yield_pct": 9.45,
                "spread_vs_bund_bps": 640
            },
            {
                "code": "BRA",
                "period": "2026-05",
                "country": "Brazil",
                "yield_pct": 9.13,
                "spread_vs_bund_bps": 608
            },
            {
                "code": "ZAF",
                "period": "2026-05",
                "country": "South Africa",
                "yield_pct": 8.995,
                "spread_vs_bund_bps": 595
            },
            {
                "code": "IND",
                "period": "2026-03",
                "country": "India",
                "yield_pct": 6.84,
                "spread_vs_bund_bps": 379
            },
            {
                "code": "CRI",
                "period": "2026-04",
                "country": "Costa Rica",
                "yield_pct": 6.6325,
                "spread_vs_bund_bps": 359
            },
            {
                "code": "ROU",
                "period": "2026-04",
                "country"
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "source": "OECD SDMX long-term interest rates (IRLT, monthly; live)",
        "service": "worldbonds-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/yields": "All countries' latest long-term yield, ranked, + spread over the German Bund.",
            "GET /v1/country": "One country's long-term yield + recent monthly history (code=USA, or ISO-2 like US).",
            "GET /v1/spreads": "Every country ranked by spread over a benchmark (vs=DEU or USA)."
        },
        "description": "Live long-term (≈10-year) government bond interest rates for ~44 countries side by side, from the OECD's official statistics in a single live call: the US, Germany, UK, Japan, Canada, Australia, Brazil, Switzerland and dozens more, each with its latest rate and the month it covers; every country ranked by yield with its spread over the German Bund; one country's rate with recent monthly history; and every country ranked by its spread over a chosen benchmark (Germany or the US). Live, no key, nothing stored. Distinct from single-country central-bank and yield-curve APIs — this is the cross-country sovereign-yield comparison across the developed world.",
        "upstream_status": "ok",
        "countries_available": 44
    },
    "meta": {
        "timestamp": "2026-06-09T11:38:42.499Z",
        "request_id": "f23b607a-ac2d-45df-9252-b090449bcf64"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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