# UK ONS Statistics API: CPI, GDP, Jobs & Wages

UK Office for National Statistics time series: CPI, CPIH, core and services inflation, RPI, GDP growth, monthly GDP, unemployment, employment, pay growth, retail sales, public borrowing and trade. 17 presets or any ONS series ID (CDID), with release and next-release dates.

$0.16 per 1,000 observations

[Get an API key](https://pushbuild.com/apis/app/signup?api=uk-ons-statistics)

Example request

```
POST /uk-ons-statistics/run
{
  "presets": [
    "cpi-annual-rate",
    "gdp-quarterly-growth",
    "unemployment-rate",
    "regular-pay-growth"
  ],
  "maxItems": 20
}
```

## What a response looks like

POST /uk-ons-statistics/run{"maxItems": 5, "presets": ["cpi-annual-rate", "gdp-quarterly-growth", "unemployment-rate", "regular-pay-growth"]}

```
{"count": 5, "items": [{ "cdid": "D7G7", "change": null, "dataset": "MM23", "frequency": "monthly", "month": "October", "period": "2024 OCT", "preset": "cpi-annual-rate", "quarter": null, "seasonalAdjustment": null, "title": "CPI ANNUAL RATE 00: ALL ITEMS 2015=100", … ]}
```

`change` by `cdid` in this sample response

| cdid | change | dataset | frequency | month | period |
| --- | --- | --- | --- | --- | --- |
| D7G7 |  | MM23 | monthly | October | 2024 OCT |
| D7G7 | 0.3 | MM23 | monthly | November | 2024 NOV |
| D7G7 | -0.1 | MM23 | monthly | December | 2024 DEC |
| D7G7 | 0.5 | MM23 | monthly | January | 2025 JAN |
| D7G7 | -0.2 | MM23 | monthly | February | 2025 FEB |

Real rows returned by this API on 2026-11-09 for the request shown.

## What it returns

UK official statistics from the Office for National Statistics, one row per series and period, with the date of the latest release and the next scheduled one.

| field | meaning |
| --- | --- |
| `cdid`, `dataset`, `preset`, `title` | ONS series ID, dataset, preset name and ONS title |
| `unit`, `seasonalAdjustment`, `frequency` | as published |
| `period`, `year`, `quarter`, `month` | the observation period |
| `value`, `change` | value and change from the previous period |
| `updated`, `releaseDate`, `nextRelease` | when the value was last updated, the latest release and the next one |
| `source` | the series page on ons.gov.uk |

## Request

`POST https://api.pushbuild.com/uk-ons-statistics/run` with a JSON body. Send your key in the `X-API-Key` header.

| Field | Type | Description |
| --- | --- | --- |
| `presets` | list of strings | Headline UK series. Default when nothing is chosen: CPI annual rate, GDP quarterly growth, unemployment rate and regular pay growth. |
| `cdids` | list of strings | Any four-character ONS series ID, optionally with its dataset, for example ABMI/QNA (GDP level) or D7BT (CPI index). |
| `frequency` | string: , monthly, quarterly, annual | Which version of a series to return when ONS publishes several. Default: `""`. |
| `lastN` | integer | Most recent observations per series. Ignored when fromPeriod or toPeriod is set. Default: `24`. |
| `fromPeriod` | string | Return every observation from this year. Optional. |
| `toPeriod` | string | Return observations up to this year. Optional. |
| `changes` | boolean | Add the change from the previous observation in the same series. Default: `true`. |
| `maxItems` | integer | Maximum items to return (1-500). Default: `100`. |

### Example

```
curl -X POST https://api.pushbuild.com/uk-ons-statistics/run \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"presets": ["cpi-annual-rate", "gdp-quarterly-growth", "unemployment-rate", "regular-pay-growth"], "maxItems": 20}'
```

### Response

```
{"count": 20, "truncated": false, "seconds": 1.4, "items": [ { ... } ]}
```

Each call returns up to 500 items. Records that fail validation or are not found are flagged in the items and not charged.

## Pricing

Pay only for results returned: $0.16 per 1,000 observations. No charge for errors or empty searches.

| Observations | Cost |
| --- | --- |
| 1,000 | $0.16 |
| 10,000 | $1.60 |
| 100,000 | $16.00 |
| 1,000,000 | $160.00 |
| 6,249 a month | Free ($1 monthly credit) |

## Use it from Claude, ChatGPT or Cursor

This API is also an MCP server: `https://api.pushbuild.com/mcp/uk-ons-statistics`. Add it to any assistant that supports remote MCP servers, with your key in the `X-API-Key` header. Same prices. [Setup for each app](https://pushbuild.com/apis/mcp.html).

## Related APIs

- [Statistics Canada API: CPI, Jobs, GDP, Retail & Housing API](https://pushbuild.com/apis/statistics-canada-data.html): Statistics Canada data from the official Web Data Service: CPI and core inflation, unemployment and employment, wages, monthly and quarterly GDP, retail and manufacturing sales, housing starts and prices, building permits, exports and population.
- [SingStat API: Singapore CPI, Core Inflation, GDP & NODX API](https://pushbuild.com/apis/singapore-singstat-data.html): Singapore Department of Statistics data from the official Table Builder API: CPI, MAS core inflation, GDP, unemployment, retail sales, industrial production and non-oil domestic exports presets, any Table Builder table, and table search..
- [Ireland CSO API: CPI, Unemployment, GDP, House Prices & Tables API](https://pushbuild.com/apis/ireland-cso-statistics.html): Central Statistics Office Ireland data from its official PxStat API: CPI, HICP, monthly unemployment, GDP and GNP, residential property prices, retail sales and industrial production presets, or any CSO table with dimension filters..
- [Eurostat API: EU GDP, Inflation, Unemployment by Country API](https://pushbuild.com/apis/eurostat-indicators.html): Official Eurostat statistics for EU countries: GDP growth, HICP inflation, unemployment, government debt and deficit, industrial production, retail sales, house prices, sentiment and population, or any Eurostat dataset by code, with change vs previous period and year ago..
- [UK Property Prices: Land Registry Sold Prices API](https://pushbuild.com/apis/uk-property-prices.html): Every residential property sale in England and Wales since 1995 from HM Land Registry Price Paid data: price, date, full address, property type, tenure and new-build flag.
- [UK Food Hygiene Ratings API](https://pushbuild.com/apis/uk-food-hygiene.html): Search Food Standards Agency hygiene ratings for every UK restaurant, takeaway, pub, shop and caterer by name, town, postcode or radius.

## Tell us what you need built.

Questions about this API, higher volumes, or a data source you need that we don't cover yet.

[hello@pushbuild.com](mailto:hello@pushbuild.com?subject=API%20question)

## New APIs and data, twice a month

New data APIs, coverage changes and analysis from Pushbuild. No spam; one click to leave.

---
As of 2026-12-03. Source: https://pushbuild.com/apis/uk-ons-statistics.html
