GovData Docs

Economics API Reference

Five UK economic series from the ONS: CPI, CPIH, RPI, unemployment, and house price index.

Base URL: https://api.govdata.dev/v1

Inflation Time Series

GET /v1/economics/inflation/:metric

Historical inflation observations for a given metric. Returns monthly data points with optional date range filtering.

Parameters

Parameter Type Required Description
metric string (path) Yes cpi, cpih, or rpi
from string (query) No Start date in YYYY-MM format
to string (query) No End date in YYYY-MM format
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.govdata.dev/v1/economics/inflation/cpi?from=2024-01&to=2024-06"

Response

{
  "data": {
    "metric": "cpi",
    "name": "Consumer Prices Index",
    "observations": [
      { "date": "2024-01", "value": 4.0, "index": 131.5 },
      { "date": "2024-02", "value": 3.4, "index": 131.8 },
      { "date": "2024-03", "value": 3.2, "index": 132.0 },
      { "date": "2024-04", "value": 2.3, "index": 132.5 },
      { "date": "2024-05", "value": 2.0, "index": 132.8 },
      { "date": "2024-06", "value": 2.0, "index": 132.9 }
    ]
  },
  "meta": {
    "api_version": "v1",
    "licence": "Open Government Licence v3.0",
    "source": "Office for National Statistics",
    "source_url": "https://www.ons.gov.uk/economy/inflationandpriceindices"
  }
}

Latest Observation

GET /v1/economics/inflation/:metric/latest

Returns the most recent published observation for the given metric.

Parameters

Parameter Type Description
metric string (path) cpi, cpih, or rpi
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.govdata.dev/v1/economics/inflation/cpi/latest

Response

{
  "data": {
    "dataset_id": "cpi",
    "dataset_name": "Consumer Prices Index (CPI)",
    "unit": "percent",
    "time_period": "2025 FEB",
    "date": "2025-02-01",
    "value": 2.8,
    "geography": "K02000001"
  },
  "meta": {
    "api_version": "v1",
    "licence": "Open Government Licence v3.0",
    "source": "Office for National Statistics",
    "source_url": "https://www.ons.gov.uk/economy/inflationandpriceindices"
  }
}

Economic Indicators

GET /v1/economics/indicators/:metric

Historical economic indicator data. Returns time series observations with optional date range filtering.

GDP quarterly growth

The gdp metric contains 284 quarterly GDP observations from 1955 Q2 to 2026 Q1. It is the ONS IHYQ headline quarter-on-quarter growth series, seasonally adjusted, in percent.

Captured from the reset development API after the 6 August 2026 ONS import:

{
  "data": {
    "dataset_id": "gdp",
    "dataset_name": "Gross Domestic Product (quarterly growth)",
    "unit": "percent",
    "observations": [
      { "time_period": "2026 Q1", "date": "2026-01-01", "value": 0.6, "geography": "K02000001" },
      { "time_period": "2025 Q4", "date": "2025-10-01", "value": 0.2, "geography": "K02000001" }
    ]
  },
  "meta": {
    "api_version": "v1",
    "licence": "Open Government Licence v3.0",
    "source": "ONS",
    "source_url": "https://www.ons.gov.uk"
  },
  "pagination": { "total": 5, "page": 1, "per_page": 10, "total_pages": 1 }
}

Parameters

Parameter Type Required Description
metric string (path) Yes unemployment (rate) or hpi (house price index)
from string (query) No Start date in YYYY-MM-DD format
to string (query) No End date in YYYY-MM-DD format
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.govdata.dev/v1/economics/indicators/unemployment?from=2024-01&to=2024-12"

Response

{
  "data": {
    "dataset_id": "unemployment",
    "dataset_name": "Unemployment Rate",
    "unit": "percent",
    "observations": [
      { "time_period": "2024 JAN", "date": "2024-01-01", "value": 4.0, "geography": "K02000001" },
      { "time_period": "2024 FEB", "date": "2024-02-01", "value": 4.1, "geography": "K02000001" }
    ]
  },
  "meta": {
    "api_version": "v1",
    "licence": "Open Government Licence v3.0",
    "source": "Office for National Statistics",
    "source_url": "https://www.ons.gov.uk"
  }
}

Latest Indicator

GET /v1/economics/indicators/:metric/latest

Returns the most recent published observation for the given economic indicator.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.govdata.dev/v1/economics/indicators/unemployment/latest

Economic data is sourced from the Office for National Statistics and updated weekly. Contains public sector information licensed under the Open Government Licence v3.0.

Data Coverage

Source Office for National Statistics (ONS)
Date range CPI 1989–, CPIH 1989–, RPI 1948–, unemployment 1971–, HPI 1989–
Records ~3,234 data points across 6 metrics
Updated Weekly (Monday)
Limitations Most series publish with a 1–2 month lag; unemployment typically runs around 2 months behind the other series and was 4 months behind at the August 2026 audit.