BAILII (British and Irish Legal Information Institute)
BAILII is a free online library of primary law from the UK and Ireland: the actual judgments, statutes, and statutory instruments, rather than commentary about them. It covers the main jurisdictions (England and Wales, Scotland, Northern Ireland, and Ireland) and a long run of courts and tribunals, from the higher appeal courts down through many specialist tribunals. For a lot of practitioners and researchers it has been the first place to read a judgment without a paid subscription.
Everything is served as web pages, one document per URL, with no bulk download and no official API. That shapes how you use it for RAG. Targeted retrieval works well: you can look up and fetch a specific judgment by its citation and pull the text out of the page. Harvesting the whole collection is another matter, both technically (you would be scraping page by page) and legally.
That legal point is the one to take seriously. Most of the content sits under Crown copyright and the Open Government Licence, which does allow reuse with attribution, but BAILII layers its own terms on top and is best treated as free to read rather than free to redistribute in bulk. Free access is not the same as an open reuse licence, so check the terms before you build a commercial index on the full corpus, and credit the source where you use it.
BAILII is best suited to a UK or Irish legal RAG project where you need reliable primary text for retrieval and citation, especially for older or tribunal-level material. For newer English and Welsh judgments with cleaner structured data (XML and a documented API), the National Archives' Find Case Law service is often the better route, and the two work well side by side: Find Case Law for structured recent decisions, BAILII for its broader historical and cross-jurisdiction coverage.
Related sources
AustLII
A free resource of medium-neutral case law and unreported judgments for all Australian jurisdictions, covering the whole country since 1995.
Awesome LegalTech
A curated list of legal technology resources: open-source platforms, AI models, companies, datasets, and tools spanning the global legal ecosystem. Useful for tracking new entrants in a fast-moving space.
Cambridge Law Corpus
A research dataset of more than 250,000 UK court cases, mostly from the 21st century but with some reaching back to the 16th century. Built by the University of Cambridge for legal natural language processing work, it is available under restricted access for research use.
CanLII
A national legal information institute covering Canada's federal and provincial jurisdictions, hosting over 300 databases of legislation and case law. Bilingual, with thousands of commentaries on Canadian court decisions.