# Government Bond Yields Worldwide: Yield Curves by Country (`scrapemint/government-bond-yields-worldwide`) Actor

Keyless sovereign yield curves for the US, UK, euro area, Japan, Canada and Australia in one comparable table. Every maturity each debt office publishes, the move since the previous session, the 2s10s curve slope with an inversion flag, and 10 year spreads measured on the same date.

- **URL**: https://apify.com/scrapemint/government-bond-yields-worldwide.md
- **Developed by:** [Ken M](https://apify.com/scrapemint) (community)
- **Categories:** Business, News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 yield rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Government Bond Yields Worldwide: Yield Curves by Country

Sovereign bond yields for the **United States, United Kingdom, euro area, Japan, Canada and Australia** in one comparable table. Every maturity each debt office publishes, the move since the previous session, the curve slope with an inversion flag, and **cross country spreads measured on the same date**.

Six official sources, one output format. No API key, no signup, no browser.

### Why this exists

Every debt office publishes its own curve, in its own file format, on its own calendar. The US posts an XML feed by month, the Bank of England a CSV with British date strings, the ECB an SDMX document with positional keys, Japan a monthly CSV, Canada a JSON API, Australia a statistics table with a metadata header. Getting one comparable table out of them is the job. That is what this returns.

### Modes

- **Latest** - each country's newest published curve, one row per maturity, with the move in basis points since its previous session.
- **History** - the same rows across any date range.
- **Spreads** - one row per country per date: 2 year, 5 year, 10 year, 20 year and 30 year yields, the **2s10s slope in basis points**, an **inversion flag**, and the **10 year spread against the US and against the euro area**.

### What you get for each row

| Field | Meaning |
| --- | --- |
| `country`, `countryCode` | United States, United Kingdom, Euro area, Japan, Canada, Australia |
| `date` | the date the yield applies to, not the date it was downloaded |
| `maturityLabel`, `maturityYears` | 3M, 2Y, 10Y and the same point as a number, so curves sort and align across countries |
| `yieldPercent` | the published yield, per cent per annum |
| `changeFromPreviousBasisPoints` | move since that country's previous published session |
| `kind` | `nominal`, `real` (inflation linked) or `policy_rate` |
| `curveType` | what the number actually is: par yield, zero coupon spot rate, compound yield, benchmark bond yield |
| `publicationLagDays` | how many days behind today this figure is |
| `sourceName`, `sourceUrl` | the publishing institution |

Spreads rows add `slope2s10sBasisPoints`, `curveInverted`, `spreadVsUnitedStates10YBasisPoints`, `spreadVsEuroArea10YBasisPoints`, `comparedWithSameDate` and `missingPeers`.

### Example output

```json
{
  "mode": "spreads",
  "country": "Japan",
  "countryCode": "JP",
  "date": "2026-07-28",
  "yield2YPercent": 1.504,
  "yield10YPercent": 2.783,
  "yield30YPercent": 3.98,
  "change10YBasisPoints": 0.5,
  "slope2s10sBasisPoints": 127.9,
  "curveInverted": false,
  "spreadVsUnitedStates10YBasisPoints": -182.7,
  "spreadVsEuroArea10YBasisPoints": -37.5,
  "comparedWithSameDate": true,
  "missingPeers": [],
  "publicationLagDays": 1
}
```

### Coverage, stated honestly

| Country | Maturities published | What the number is |
| --- | --- | --- |
| United States | 1M, 1.5M, 2M, 3M, 4M, 6M, 1Y, 2Y, 3Y, 5Y, 7Y, 10Y, 20Y, 30Y | par yield |
| United Kingdom | 5Y, 10Y, 20Y (plus Bank Rate, optional) | nominal par yield |
| Euro area | 3M, 6M, 1Y, 2Y, 3Y, 5Y, 7Y, 10Y, 15Y, 20Y, 30Y | zero coupon spot rate, AAA rated euro area central government bonds |
| Japan | 1Y to 10Y, 15Y, 20Y, 25Y, 30Y, 40Y | compound yield |
| Canada | 2Y, 3Y, 5Y, 7Y, 10Y, LONG (plus a real return bond, optional) | benchmark bond yield |
| Australia | 2Y, 3Y, 5Y, 10Y (plus an indexed bond, optional) | interpolated bond yield |

Things worth knowing before you build on it:

- **The United Kingdom has no 2 year series** in this database, so a UK 2s10s slope comes back null rather than guessed.
- **Australia's table runs several business days behind** the other five. Every row carries `publicationLagDays` so you can see the age of what you are comparing.
- **Curve types differ.** A US par yield and a euro area zero coupon spot rate are close but not identical constructions. The `curveType` field says which you are holding.
- **Spreads mode always loads the US and euro area curves as references**, even if you did not ask for those countries, so the spread columns are populated whatever selection you make. Reference rows are not returned and not billed.
- **Cross country spreads are only ever computed between two figures published on the same date.** National holidays do not line up. If the peer did not publish that day the spread is null and `missingPeers` names it, rather than quietly comparing against a neighbouring session.
- **Inflation linked yields are excluded by default.** Canada's real return bond and Australia's indexed bond sit in the same published files as the nominal benchmarks; mixing a real yield into a nominal curve would corrupt every slope and spread. Turn them on with `includeRealYields` and they arrive marked `kind: "real"`.
- **Japanese history before the current month** comes from the ministry's archive file, which is large, slow and has been observed to stop mid row. Whatever parses is returned and the shortfall is reported in a note row; it is never padded.
- Long US histories are slower than the rest: that feed is served a year per request at roughly ten seconds each.

### Sources

- US Department of the Treasury, daily Treasury par yield curve
- Bank of England, Interactive Statistical Database
- European Central Bank Data Portal, euro area yield curve
- Japan Ministry of Finance, JGB interest rates
- Bank of Canada, Valet API, selected benchmark bond yields
- Reserve Bank of Australia, table F2 capital market yields

All are official publications of the issuing authority or its central bank.

### Pricing

**$0.004 per row.** The first 2 rows of every run are free, and note rows (an unknown country, a maturity nobody publishes, a source that did not respond) are never charged.

A latest snapshot of all six countries at the four key maturities is about 20 rows, or **$0.08**. A full month of daily 10 year yields for all six countries is about 130 rows, or **$0.52**. A terminal subscription that carries the same six curves starts in the hundreds of dollars a month.

### Related actors

- **US Treasury Yields & Interest Rates Scraper** - one country in depth: auctions, bills, TIPS, average interest on the debt.
- **SOFR & Money Market Rates: Benchmarks and Fed Operations** - the overnight funding market underneath these curves.
- **European Economic Indicators** - inflation, unemployment and growth for the same economies.

### How to run it via API

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapemint~government-bond-yields-worldwide/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"spreads","countries":["US","GB","EA","JP","CA","AU"],"daysBack":10}'
```

# Actor input Schema

## `mode` (type: `string`):

latest = each country's newest published curve. history = the same rows across a date range. spreads = one row per country per date with the 2s10s slope, the inversion flag and the 10 year spread against the US and the euro area on the same date.

## `countries` (type: `array`):

US, GB (United Kingdom), EA (euro area), JP (Japan), CA (Canada), AU (Australia). Names work too, for example "Japan". Empty returns all six.

## `maturities` (type: `array`):

Points on the curve, for example 2Y, 5Y, 10Y, 30Y. Empty returns every maturity each country publishes. Not every country publishes every point: the United Kingdom has no 2 year series, and only the US publishes maturities under 3 months.

## `daysBack` (type: `integer`):

How far back to pull, counting from the end date. Bond markets publish on business days, and national holidays differ by country.

## `startDate` (type: `string`):

YYYY-MM-DD. Overrides days back for a fixed window.

## `endDate` (type: `string`):

YYYY-MM-DD. Defaults to today.

## `includePolicyRate` (type: `boolean`):

Adds the policy rate as a row where the source publishes it alongside the curve (Bank of England Bank Rate).

## `includeRealYields` (type: `boolean`):

Adds real return and indexed bond yields where published (Canada, Australia). They are marked kind = real and are never mixed into the nominal curve or into any spread.

## `maxRows` (type: `integer`):

Cap on rows returned. Controls total cost.

## Actor input object example

```json
{
  "mode": "latest",
  "countries": [
    "US",
    "GB",
    "EA",
    "JP",
    "CA",
    "AU"
  ],
  "maturities": [
    "2Y",
    "5Y",
    "10Y",
    "30Y"
  ],
  "daysBack": 10,
  "startDate": "",
  "endDate": "",
  "includePolicyRate": false,
  "includeRealYields": false,
  "maxRows": 300
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "countries": [
        "US",
        "GB",
        "EA",
        "JP",
        "CA",
        "AU"
    ],
    "maturities": [
        "2Y",
        "5Y",
        "10Y",
        "30Y"
    ],
    "daysBack": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapemint/government-bond-yields-worldwide").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "countries": [
        "US",
        "GB",
        "EA",
        "JP",
        "CA",
        "AU",
    ],
    "maturities": [
        "2Y",
        "5Y",
        "10Y",
        "30Y",
    ],
    "daysBack": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapemint/government-bond-yields-worldwide").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "countries": [
    "US",
    "GB",
    "EA",
    "JP",
    "CA",
    "AU"
  ],
  "maturities": [
    "2Y",
    "5Y",
    "10Y",
    "30Y"
  ],
  "daysBack": 10
}' |
apify call scrapemint/government-bond-yields-worldwide --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapemint/government-bond-yields-worldwide"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Nu2XzHvLFTjXGB5Ic/builds/8ye71S3iw8G9Uq08g/openapi.json
