Skip to content
RAG Repo

ONS (Office for National Statistics)

The Office for National Statistics is the UK's official statistics producer, and its output is the authoritative record of how the country lives and works. That runs from the ten-yearly Census to monthly inflation, quarterly GDP, employment and wages, population estimates for small local areas, and regular releases on health, migration, crime, and wellbeing. Nearly every dataset ships with a bulletin that explains the method, coverage, and known quality issues, which is unusually strong provenance to attach to a number.

You can browse and download data from the ONS website as CSV, Excel, and JSON, and a good share is reachable through APIs for programmatic pulls. For labour market and census detail, the sister Nomis service exposes a fuller API. ONS tables are often wide and multi-dimensional, so for RAG the useful move is to reshape them into short factual statements, each carrying its own figure, period, geography, and units, rather than embedding raw spreadsheets, which retrievers struggle with.

This is the source to trust for any system answering questions about UK demographics, the economy, or the labour market. Grounding answers in ONS figures rather than second-hand numbers lifted from news coverage buys you both accuracy and a citable origin, which matters when a wrong statistic does more harm than no answer.

On the legal side you are on firm ground: everything is published under the Open Government Licence v3.0, so commercial and non-commercial reuse are both fine as long as you credit the source. The caveats are practical. Figures are revised after first release, geographies and definitions shift between census years, and small-area data may be rounded or suppressed to protect privacy, so keep the release date and any revision notes beside each value.

Pair ONS with data.gov.uk for other UK public datasets, Nomis for granular labour and census figures, and Eurostat or the OECD when you need to set the UK against other countries.

ukgovernmentstatisticscensuseconomics

Related sources