Legislation.gov.uk
Legislation.gov.uk publishes the text of UK primary and secondary legislation: Acts of Parliament, statutory instruments, and equivalent law from the devolved administrations. Many items are available in both their original and current, amended form, so you can retrieve the law as it stands today or as it was on a given date.
The whole database is available as structured XML and as linked data, where each provision has a stable web address you can query directly. This structure makes it well suited to RAG systems that need to cite a specific section rather than a whole document.
The content is published under the Open Government Licence v3.0, which lets you copy, adapt, and reuse it freely as long as you credit the source.
Related sources
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.
EDGAR (SEC Filings)
The US Securities and Exchange Commission's repository of corporate filings, including annual reports (10-K), quarterly reports (10-Q), current reports (8-K), and proxy statements. You can search the full text or pull filings in bulk through an API, which makes it a rich source for financial and regulatory RAG.
EUR-Lex
The official portal for European Union law. It provides EU treaties, legislation, case law, and legislative proposals in 24 languages, with bulk download available. A dependable source for multilingual legal and regulatory RAG across the EU.
Free Law Project / CourtListener
The largest open collection of US court opinions, oral argument recordings, and judicial financial disclosures, run by the nonprofit Free Law Project. Its RECAP Archive holds hundreds of millions of federal court docket entries, and journalists at the Wall Street Journal and ProPublica have used it for investigations. A solid base for US legal RAG.