ONS Consumer Prices Index (CPIH)
ons.stats.cpihRetrieve UK Consumer Prices Index Including Housing costs (CPIH) from the ONS. Monthly index values (2015=100) for the overall index or individual categories (food, energy, transport, etc.). Data goes back to 1988. Default returns the headline CPIH overall index (CP00) for the UK. Use the category parameter to drill into sub-categories such as "CP01" (food & beverages), "CP04" (housing & energy), "CP07" (transport). Returns up to 60 most recent months by default. Source: ONS dataset cpih01, OGL v3.0.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of most recent time periods to return (1–300, default 60). Data is monthly. | |
| category | No | ONS aggregate code for the CPIH category. Default "CP00" (Overall Index). Other examples: "CP01" (Food & beverages), "CP02" (Alcohol & tobacco), "CP04" (Housing & energy), "CP07" (Transport). See /v1/datasets/cpih01/editions/time-series/versions/latest/dimensions/aggregate/options for full list. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present only when the call failed. Includes error code, message, request_id, and any provider-specific extras. | |
| result | No | Tool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response. |