# Bank of England — Bank Rate, Gilts, CPI/RPI, GBP FX (`gochujang/bank-of-england-data`) Actor

Bank of England official statistics: Bank Rate (since 1694), CPI/RPI inflation, nominal par gilt yields (5yr & 10yr daily, 2yr monthly), GBP exchange rates (EUR, USD daily). No API key required. PPE $0.0001/row.

- **URL**: https://apify.com/gochujang/bank-of-england-data.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.10 / 1,000 data record returneds

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bank of England Data

Official Bank of England statistics fetcher. No API key required.

Fetches Bank Rate history (since 1694), nominal par gilt yields (5yr & 10yr daily, 2yr monthly), CPI and RPI inflation indices from ONS, and daily GBP spot exchange rates (EUR/GBP, USD/GBP).

### What You Get

Each output record contains:

| Field | Description |
|---|---|
| `series` | Series identifier (e.g. `bank_rate`, `gilt_10y`) |
| `series_name` | Human-readable name |
| `date` | `YYYY-MM-DD` |
| `value` | Numeric value |
| `unit` | Unit (e.g. `%`, `Index, base year 2015=100`, `GBP per EUR`) |
| `frequency` | `daily`, `monthly`, `event-driven` |
| `source` | Data provider |

### Available Series

| Series Key | Name | Frequency | Source |
|---|---|---|---|
| `bank_rate` | Official Bank Rate | Event-driven (change dates) | BOE |
| `gilt_2y` | 2-Year Gilt Yield (IUMBV34, end-month) | Monthly | BOE |
| `gilt_5y` | 5-Year Nominal Par Gilt Yield (IUDSNPY) | Daily | BOE |
| `gilt_10y` | 10-Year Nominal Par Gilt Yield (IUDMNPY) | Daily | BOE |
| `cpi` | CPI Index, All Items (D7BT, 2015=100) | Monthly | ONS |
| `rpi` | RPI All Items Index (CHAW, Jan 1987=100) | Monthly | ONS |
| `eur_gbp` | EUR/GBP Spot Rate (XUDLERS) | Daily | BOE |
| `usd_gbp` | USD/GBP Spot Rate (XUDLUSS) | Daily | BOE |

### Input

```json
{
  "series": ["bank_rate", "gilt_5y", "gilt_10y", "cpi"],
  "startDate": "2020-01-01",
  "endDate": "2025-12-31"
}
```

| Parameter | Type | Default | Description |
|---|---|---|---|
| `series` | string\[] | `["bank_rate","gilt_5y","gilt_10y","cpi"]` | Which series to fetch |
| `startDate` | string | 365 days ago | Start date (`YYYY-MM-DD`) |
| `endDate` | string | Today | End date (`YYYY-MM-DD`) |
| `telegramBotToken` | string | — | Optional Telegram bot token for notification |
| `telegramChatId` | string | — | Optional Telegram chat ID |

### Example Output

```json
[
  {
    "series": "bank_rate",
    "series_name": "Bank of England Official Bank Rate",
    "date": "2024-08-01",
    "value": 5.0,
    "unit": "%",
    "frequency": "event-driven",
    "source": "Bank of England"
  },
  {
    "series": "gilt_10y",
    "series_name": "UK 10-Year Nominal Par Gilt Yield",
    "date": "2024-09-20",
    "value": 3.935,
    "unit": "% per annum",
    "frequency": "daily",
    "source": "Bank of England IADB"
  },
  {
    "series": "cpi",
    "series_name": "CPI Index (All Items, 2015=100)",
    "date": "2024-08-01",
    "value": 133.3,
    "unit": "Index, base year 2015=100",
    "frequency": "monthly",
    "source": "Office for National Statistics (ONS)"
  },
  {
    "series": "eur_gbp",
    "series_name": "EUR/GBP Spot Exchange Rate",
    "date": "2024-09-20",
    "value": 1.1912,
    "unit": "GBP per EUR",
    "frequency": "daily",
    "source": "Bank of England IADB"
  }
]
```

### Pricing

- **First 4 GB-secs**: Free
- **Per data record returned**: $0.0001

A typical run fetching all 8 series for one year returns approximately 2,000–3,000 records (costs ~$0.20–$0.30 in data fees, usually less than $0.01 in compute).

### Data Sources

- **Bank Rate & Gilt Yields & FX**: [Bank of England Interactive Statistical Database (IADB)](https://www.bankofengland.co.uk/boeapps/database/)
- **CPI & RPI**: [Office for National Statistics](https://www.ons.gov.uk/)

All data is official UK government / central bank statistics, freely available without registration.

### Notes

- Bank Rate records represent **change events** (dates when the rate changed), not daily observations.
- Gilt 2yr yield (`gilt_2y`) is an end-of-month figure (IUMBV34); 5yr and 10yr are daily nominal par yields from the BOE yield curve model.
- CPI and RPI are index levels, not year-on-year percentage changes.
- Exchange rates are GBP-denominated spot rates (e.g. EUR/GBP = how many GBP per 1 EUR).
- The BOE database goes back to 1963 for most series; Bank Rate history extends to 1694.

# Actor input Schema

## `series` (type: `array`):

Which data series to fetch. Options: bank_rate, gilt_2y, gilt_5y, gilt_10y, cpi, rpi, eur_gbp, usd_gbp.

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

Fetch data from this date (YYYY-MM-DD). Defaults to 365 days ago.

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

Fetch data up to this date (YYYY-MM-DD). Defaults to today.

## `telegramBotToken` (type: `string`):

Optional Telegram bot token for notifications.

## `telegramChatId` (type: `string`):

Optional Telegram chat ID for notifications.

## Actor input object example

```json
{
  "series": [
    "bank_rate",
    "gilt_5y",
    "gilt_10y",
    "cpi"
  ],
  "startDate": "",
  "endDate": "",
  "telegramBotToken": "",
  "telegramChatId": ""
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/bank-of-england-data").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("gochujang/bank-of-england-data").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 '{}' |
apify call gochujang/bank-of-england-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gochujang/bank-of-england-data"
        }
    }
}
```

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/UyjmHJ4I9bTk1upCm/builds/oapqdoLHGsJnzsiKK/openapi.json
