Bonds API – Government Bond Yields by Country & Region

Fin2Dev Bonds API provides bond yield returns for different countries and regions in a structured JSON format. It helps track sovereign yields across multiple maturities (e.g., 3m, 2y, 10y, 20y) for analysis, dashboards, and automated strategies.

You can query by country or by region/continent, and specify the maturity type (default is 10y when not provided).

TL;DR: A REST API that returns government bond yields by country/region and maturity type in JSON.

Bonds (Yield) API for Developers

Get sovereign bond yields by country or region (e.g., Europe) across multiple maturities via high-speed REST API.

Request Your API Key →

What is Fin2Dev Bonds API?

Fin2Dev provides a REST API for bond yield returns across different countries, regions, and time periods. When the yield type is not specified, the default is 10y.

Key Specifications:

  • Filters: country or region
  • Maturities: 3m, 6m, 2y, 5y, 10y, 20y, 10y_TIPs, etc.
  • Default maturity: 10y (if type not specified)
  • Output format: JSON

Why use this API?

Designed for bond analytics, macro dashboards, and quant workflows. Quickly compare yields across countries/regions and monitor day/week/month/year changes.

What data is included

Included bond yield data: yield, day change, weekly/monthly/yearly % changes, timestamp.

Provided values: region, country, type, yield, price_change_day, percentage_week, percentage_month, percentage_year, datetime.

API Integration Examples

import requests

url = "https://apidata.fin2dev.com/v1/bonds"
params = {"key": "YOUR_API_KEY", "region": "europe", "type": "2y"}

response = requests.get(url, params=params)
data = response.json()

for row in data["result"]["output"]:
    print(row["country"], row["type"], row["yield"], row["datetime"])
<?php
$key = "YOUR_API_KEY";
$url = "https://apidata.fin2dev.com/v1/bonds?key=$key&region=europe&type=2y";

$json = file_get_contents($url);
$data = json_decode($json, true);

foreach ($data['result']['output'] as $row) {
    echo $row['country'] . " " . $row['type'] . " " . $row['yield'] . " " . $row['datetime'] . "\n";
}
?>

Example JSON Response

The API returns a status object and a result object containing the output array.

{
  "status": {
    "code": 200,
    "message": "OK",
    "details": ""
  },
  "result": {
    "output": [
      {
        "region": "europe",
        "country": "belgium",
        "type": "2y",
        "yield": "2.04",
        "price_change_day": "-0.028%",
        "percentage_week": "",
        "percentage_month": "0.013%",
        "percentage_year": "-0.508%",
        "datetime": "2025-08-26T00:00:00.000"
      },
      {
        "region": "europe",
        "country": "switzerland",
        "type": "2y",
        "yield": "-0.11",
        "price_change_day": "-0.029%",
        "percentage_week": "",
        "percentage_month": "0.031%",
        "percentage_year": "-0.663%",
        "datetime": "2025-08-26T00:00:00.000"
      }
    ]
  }
}

Popular Bonds Queries

Region Snapshot

Pull a full region like Europe to compare multiple countries at once: region=europe.

Country-Specific

Query a single country for a clean time-point dataset: country=us.

Maturity / Type

Switch maturities like 2y, 10y, 20y, or TIPS: type=10y_TIPs.

Default 10Y

If you don’t specify type, the API returns 10y by default.

Changes

Track daily and longer-term moves using price_change_day, percentage_month, percentage_year.

Simple Integration

Works with standard HTTP clients in any language. Response is normalized JSON.

Frequently Asked Questions

How to get bond yields via API?

Send a GET request to apidata.fin2dev.com with your API key, then filter by country or region. Optionally specify type (maturity).

What maturities (types) are supported?

Common examples include 3m, 6m, 2y, 5y, 10y, 20y, and special series like 10y_TIPs. If type is not provided, default is 10y.

Can I get yields for all countries in a region?

Yes. Use region (e.g., region=europe) and you’ll get an array of countries for that region.

Pricing

Start with a small plan for testing, then scale as your application grows. This overview keeps pricing simple and easy to compare.

Basic

Entry plan for testing and small projects
Intro offer
$9
  • 500 calls included
  • 10 calls per minute

Premium

For scaling applications
Higher volume
$49
  • 10,000 calls included
  • 30 calls per minute
Note: This is a simplified pricing overview for quick comparison. Full plan details can be placed on the pricing page.