Skip to content
RAG Repo

UN Data is a single search interface that reaches across the many statistical databases the United Nations system maintains, saving you from hopping between individual agency sites. From one place it queries 32 databases holding more than 60 million records that reach back to 1970. Behind that front door sit well-known collections: UN Comtrade international trade figures, energy production and consumption statistics, greenhouse gas inventories, national accounts, population and gender data, and the headline development indicators governments and researchers cite constantly.

You browse and filter in the browser, choosing a country, an indicator, and a year range, then export the result as CSV or XML. The data is country-year time series rather than prose, so a RAG pipeline needs a verbalising step: each row becomes a short factual sentence, for example "In 2015, country X produced Y tonnes of Z," which a retriever can then match against a natural-language question. Budget most of your effort for that conversion and for reconciling country names and codes across databases.

This is a solid choice whenever a system has to answer factual questions about global trade, energy, population, or development and needs a recognised international body behind the answer. It works well next to the World Bank's Open Data and Eurostat: UN Data is the broad, multi-agency net, the World Bank is cleaner and better documented for headline indicators, and Eurostat goes deeper on European detail.

The wrinkle is that each underlying database is run by a different UN organisation, so there is no single blanket licence. The overall stance is generally open, but commercial use is unclear and you are expected to attribute the specific source agency rather than the UN in general. Confirm the conditions on the exact database you draw from before you redistribute anything or build a paid product on top of it.

statisticsunglobaldevelopmenttradeenergy

Related sources