# UK ONS Economic Data — CPI, GDP, Unemployment, Housing (`gochujang/uk-ons-economic-data`) Actor

Fetch UK economic indicators from the Office for National Statistics (ONS): CPI/CPIH inflation, GDP growth, unemployment, retail sales, house prices, trade balance, earnings, Bank Rate, and more. 20 pre-configured series. Free, no API key required.

- **URL**: https://apify.com/gochujang/uk-ons-economic-data.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 ons indicator fetcheds

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

## UK ONS Economic Data — CPI, GDP, Unemployment, House Prices

Fetch official UK economic statistics from the Office for National Statistics (ONS) API. Covers CPI and CPIH inflation (headline and core), GDP growth (QoQ and YoY), unemployment rate, employment rate, average earnings, retail sales, industrial production, house price index, trade balance, Bank Rate, consumer credit, mortgage lending, and government borrowing. 20 pre-configured indicators. Free, no API key required.

### What It Does

- Fetches 20 pre-configured UK economic time series directly from the ONS API
- All indicators fetch concurrently for speed
- Returns standardized records: indicator, date, value, unit, frequency
- Configurable `since` date to limit history
- Gracefully skips unavailable series with a warning

### Available Indicators

| Key | Name | Frequency |
|-----|------|-----------|
| `cpih_headline` | CPIH Headline Inflation YoY | Monthly |
| `cpih_core` | CPIH Core ex. Energy & Food YoY | Monthly |
| `cpi_headline` | CPI Headline Inflation YoY | Monthly |
| `cpi_core` | CPI Core ex. Energy & Food YoY | Monthly |
| `gdp_qoq` | GDP Growth QoQ | Quarterly |
| `gdp_yoy` | GDP Growth YoY | Quarterly |
| `gdp_index` | GDP Chained Volume Index | Quarterly |
| `unemployment_rate` | ILO Unemployment Rate | Quarterly |
| `employment_rate` | Employment Rate 16-64 | Quarterly |
| `average_weekly_earnings` | Average Weekly Earnings YoY | Monthly |
| `retail_sales` | Retail Sales Volume Index | Monthly |
| `industrial_production` | Index of Production | Monthly |
| `house_price_index` | UK House Price Index YoY | Monthly |
| `trade_balance` | Total Trade Balance (£m) | Monthly |
| `bank_rate` | Bank of England Bank Rate | Monthly |
| `net_consumer_credit` | Net Consumer Credit Lending (£m) | Monthly |
| `net_mortgage_lending` | Net Mortgage Lending (£m) | Monthly |
| `public_sector_net_borrowing` | Public Sector Net Borrowing (£m) | Monthly |
| `pmi_manufacturing` | PMI Manufacturing | Monthly |
| `current_account` | Current Account Balance (£m) | Quarterly |

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `indicators` | array | 12 key indicators | ONS indicator keys to fetch |
| `since` | string | `"2010 Jan"` | Start date (ONS format: `"2010 Jan"`, `"2010 Q1"`, or `"2010"`) |

### Sample Output

```json
[
  {
    "indicator": "cpih_headline",
    "indicator_name": "CPIH Headline Inflation YoY (UK, monthly)",
    "country": "United Kingdom",
    "date": "2024 Jun",
    "value": 2.7,
    "unit": "Annual rate of change (%)",
    "frequency": "monthly"
  },
  {
    "indicator": "gdp_qoq",
    "indicator_name": "GDP Growth QoQ (UK, quarterly)",
    "country": "United Kingdom",
    "date": "2024 Q1",
    "value": 0.7,
    "unit": "% change on previous quarter",
    "frequency": "quarterly"
  },
  {
    "indicator": "house_price_index",
    "indicator_name": "UK House Price Index YoY (UK, monthly)",
    "country": "United Kingdom",
    "date": "2024 Jun",
    "value": 2.7,
    "unit": "Annual % change, all dwellings",
    "frequency": "monthly"
  }
]
```

### Use Cases

**GBP/USD macro analysis** — Monitor UK inflation (CPIH), growth (GDP QoQ), and employment to anticipate Bank of England rate decisions and GBP directional moves.

**BoE rate path forecasting** — Track CPI, average earnings, and GDP together to model the MPC's reaction function and build GBP rate probability models.

**UK housing market** — Combine `house_price_index`, `net_mortgage_lending`, and `bank_rate` for a complete picture of the UK property market cycle.

**UK fiscal health** — Monitor `public_sector_net_borrowing` monthly to track the UK government's fiscal position and debt trajectory.

**UK consumer health** — `retail_sales`, `net_consumer_credit`, and `average_weekly_earnings` together paint the consumer spending picture.

**UK trade & current account** — Track `trade_balance` and `current_account` for GBP pressure from external imbalances.

### Pricing

- **$0.002 per indicator fetched** (PPE — Pay Per Event)
- Default run (12 indicators) ≈ $0.024

### FAQ

**Do I need an API key?**
No. The ONS API is free and open — no registration required.

**How current is the data?**
ONS data is updated on release day. Major releases (CPI, GDP, employment) follow the UK statistical release calendar. Typical lag: 3–6 weeks for monthly data, 6–8 weeks for quarterly.

**What is CPIH vs CPI?**
CPIH includes owner occupiers' housing costs (OOH), making it the ONS's preferred measure of consumer price inflation. CPI excludes OOH and is the Bank of England's official target measure (2%).

**Can I get regional UK data (Scotland, Wales, etc.)?**
The current catalog covers UK-wide aggregates. Regional series have different ONS codes — submit a request via Apify issues.

### Data Source

Official [ONS API](https://api.ons.gov.uk) — UK Office for National Statistics, free public data.

***

### Related actors

- [ECB Economic Data Tracker](https://apify.com/gochujang/ecb-economic-data) — Eurozone HICP and ECB rates to compare with UK CPI and Bank Rate for GBP/EUR dynamics
- [BIS Central Bank Rates](https://apify.com/gochujang/bis-central-bank-data) — Global central bank policy rates including BoE in international context
- [OECD Stats Tracker](https://apify.com/gochujang/oecd-stats-tracker) — OECD comparative data for UK benchmarking against G7 peers

### Feedback

If this actor powers your UK macro research, a review helps others find it: [Leave a review on Apify Store](https://apify.com/gochujang/uk-ons-economic-data#reviews)

***

**Keywords:** UK economy, ONS, Office for National Statistics, GDP, inflation, CPI, unemployment, UK macro data, economic indicators, UK statistics, FRED, British economy, macroeconomics

# Actor input Schema

## `indicators` (type: `array`):

Indicator keys to fetch. Available: cpih_headline, cpih_core, cpi_headline, cpi_core, gdp_qoq, gdp_yoy, gdp_index, unemployment_rate, employment_rate, average_weekly_earnings, retail_sales, industrial_production, house_price_index, trade_balance, bank_rate, net_consumer_credit, net_mortgage_lending, public_sector_net_borrowing, pmi_manufacturing, current_account.

## `since` (type: `string`):

Return data on or after this date. ONS date format: '2010 Jan' (monthly) or '2010 Q1' (quarterly) or '2010' (annual).

## Actor input object example

```json
{
  "indicators": [
    "cpih_headline",
    "cpih_core",
    "cpi_headline",
    "gdp_qoq",
    "gdp_yoy",
    "unemployment_rate",
    "employment_rate",
    "average_weekly_earnings",
    "retail_sales",
    "house_price_index",
    "trade_balance",
    "bank_rate"
  ],
  "since": "2010 Jan"
}
```

# Actor output Schema

## `results` (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/uk-ons-economic-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/uk-ons-economic-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/uk-ons-economic-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gochujang/uk-ons-economic-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/5TD0a9QvmFeezcyI7/builds/RhxawyREZRzI66pOe/openapi.json
