Ons Timeseries
ons_timeseriesUK Office for National Statistics (ONS) headline series by series ID (CDID): UK CPI and CPIH consumer price inflation, RPI, unemployment and employment rates, average weekly earnings, GDP and GDP growth, retail sales, public finances, population. Returns the full series (years, quarters, months) plus latest, the most recent observation with its period (e.g. "2026 OCT") and release date, so "what was UK CPI inflation in the latest release" is one call. Headline CDIDs: D7G7 = CPI annual rate, the 12-month inflation rate, all items; L55O = CPIH annual rate; CZBH = RPI annual rate; CHAW = RPI index; MGSX = unemployment rate, aged 16+, seasonally adjusted; LF24 = employment rate, aged 16-64; KAB9 = average weekly earnings, total pay, GBP; ABMI = GDP chained volume, GBP million, quarterly; IHYQ = GDP quarter-on-quarter growth, %. Pass EITHER code (a CDID; it is looked up across ONS datasets, and dataset_id such as "MM23" or "DRSI" only disambiguates a CDID published in several; a bare dataset code such as "PN2" returns that dataset's series list to pick a CDID from) OR uri (the www.ons.gov.uk path, e.g. "/economy/grossdomesticproductgdp/timeseries/abmi/pn2"). (Named ons_timeseries, get_series is used by many other economic-data packs.)
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "EAWP"
},
"name": "ons_timeseries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | No | ONS timeseries URI, e.g. "/economy/grossdomesticproductgdp/timeseries/abmi/pn2". Used instead of `code`. | |
| code | No | ONS series ID (CDID), e.g. "EAWP", "ABMI", "MGSX". A dataset code (e.g. "PN2") lists that dataset's series instead. | |
| dataset_id | No | Optional dataset code to disambiguate a CDID published in several datasets, e.g. "PN2" or "UKEA". |