GovInfo
GovInfo is the official publishing service of the US Government Publishing Office, and the authoritative home for federal government documents. In one place it brings together the Federal Register, the Code of Federal Regulations, the Congressional Record, bills, public laws, congressional reports, and presidential documents, most of it available as clean, structured text with rich metadata rather than scanned page images.
There are two good ways in. The GovInfo API lets you query and fetch individual documents on demand, which suits keeping a collection current or pulling specific records as you need them. For building a corpus from scratch, the bulk data repository is the better route: whole collections are published as packaged `XML` and other structured formats you can download and process offline. Much of it ships as granular XML with explicit tags for sections, dates, and identifiers, so you can chunk along real document structure instead of guessing at where one passage ends and the next begins.
The standout for RAG builders is the licensing. As works of the US federal government, this content sits in the public domain, so you can use, redistribute, and build on it commercially with no attribution requirement and no licence to negotiate. That makes GovInfo one of the cleanest large legal and regulatory sources to put under a product.
A couple of things to plan for. The volume and variety are considerable, so decide up front which collections you actually need rather than ingesting the lot. And although the text is well-structured, legal and regulatory language is long and heavily cross-referential, so retrieval quality improves markedly if you keep document hierarchy and citations intact when you chunk.
GovInfo pairs naturally with the eCFR, which gives you a continuously updated view of federal regulations, and with CourtListener for case law. Use GovInfo as your backbone for federal statutes, regulations, and the legislative record, and add the others where you need live regulation text or judicial opinions.
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.
BAILII (British and Irish Legal Information Institute)
Free access to British and Irish primary legal materials, covering UK and Ireland case law and legislation. Alongside the National Archives, one of the main free sources for reading UK judgments.
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.