Skip to content
RAG Repo

data.gov.uk is the UK government's central catalogue of open public sector data, run by the Government Digital Service. It does not host most of the data itself; it is an index of more than 47,000 datasets published by central departments, local councils, the NHS, and other public bodies, with each entry describing what the data covers, who publishes it, how often it is refreshed, and where to download it.

The catalogue runs on CKAN, an open data platform, so there is a full API behind it: you can search datasets, filter by publisher or topic, and retrieve metadata as JSON programmatically. The underlying files are most often CSV, JSON, and XML, and a good number of the live datasets (transport timetables, spending records) are served through their own APIs, so you can pull fresh figures on demand rather than working from a stale snapshot.

For a RAG system answering questions about UK public services, local government, policy, or official statistics, this is the natural first stop. Coverage is genuinely broad: crime figures, planning applications, school performance, prescribing data, house prices, and departmental spending all sit here. Because the data is mostly tabular, the practical work is turning rows into readable passages, or a structured store your retriever can query, rather than dumping raw CSV into a vector index.

The main caveat is consistency. Because thousands of separate bodies publish independently, formats, update schedules, and quality vary a lot, and some links point to datasets that have moved or gone stale, so check each dataset's own page for its refresh date. Almost everything is published under the Open Government Licence v3.0, so you can reuse it in commercial and non-commercial work as long as you credit the source; a handful of entries carry their own terms, so glance at the licence before you build on one. It is the UK counterpart to data.gov in the US and data.europa.eu across the EU: use whichever matches the jurisdiction your questions are about.

ukgovernmentopen-datastatisticspublic-sector

Related sources