Skip to content
RAG Repo

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.

uslegislationregulationspublic-domainapibulk-download

Related sources