us-regulations / README.md
docketx's picture
Card: link to the DocketX GitHub (legal-scrambler, claude-for-legal plugin)
10869ed verified
|
Raw History Blame Contribute Delete
10.6 kB
metadata
license: cc0-1.0
language:
  - en
task_categories:
  - text-retrieval
  - question-answering
size_categories:
  - 100K<n<1M
tags:
  - legal
  - law
  - regulations
  - cfr
  - federal-law
  - us-law
  - administrative-law
  - public-domain
  - rag
  - legal-nlp
pretty_name: US Federal Regulations — Code of Federal Regulations (verbatim)
configs:
  - config_name: all
    data_files: data/*/regulations.jsonl.gz
    default: true
dataset_info:
  config_name: all
  features:
    - name: id
      dtype: string
    - name: level
      dtype: string
    - name: jurisdiction
      dtype: string
    - name: code
      dtype: string
    - name: section
      dtype: string
    - name: citation
      dtype: string
    - name: title
      dtype: string
    - name: text
      dtype: string
    - name: source
      dtype: string
    - name: license
      dtype: string
    - name: retrieved_at
      dtype: string
    - name: extra
      dtype: string

US Federal Regulations — the CFR, held word for word

Code & tools: github.com/docketx — legal-scrambler pseudonymises a case file on your own hardware before a frontier model sees it; claude-for-legal is the Claude Code plugin (docketx-open-law) that loads these datasets and checks citations against them.

222,767 regulations — 219,061 CFR sections and 3,706 appendices — across all 49 titles of the Code of Federal Regulations, each one as the agency publishes it.

Statutes say what Congress wrote. The CFR says what the agencies actually require, and for most regulated work the regulation is the operative text: an employer's duty under 29 C.F.R. § 1910.1200, a broker's under 17 C.F.R. § 240.10b-5. This is the other half of federal law, and it is here verbatim — a paraphrase is not usable in a filing.

What is in it

CFR title name records of which appendices source file last built by GPO
1 General Provisions 271 0 11-Aug-2026 20:55
2 Federal Financial Assistance 1,577 70 19-Aug-2026 20:28
3 The President 20 0 20-May-2024 17:04
4 Accounts 221 1 19-Jul-2024 22:33
5 Administrative Personnel 5,340 35 04-Sep-2026 20:29
6 Domestic Security 589 11 13-Aug-2026 21:09
7 Agriculture 16,373 124 10-Sep-2026 21:29
8 Aliens and Nationality 923 0 10-Sep-2026 21:27
9 Animals and Animal Products 2,340 0 20-Aug-2026 21:15
10 Energy 5,344 193 10-Sep-2026 21:32
11 Federal Elections 560 0 09-Jun-2026 20:48
12 Banks and Banking 7,171 255 09-Sep-2026 21:53
13 Business Credit and Assistance 1,657 6 01-Sep-2026 21:44
14 Aeronautics and Space 6,370 166 04-Sep-2026 20:32
15 Commerce and Foreign Trade 2,348 175 31-Aug-2026 22:19
16 Commercial Practices 2,194 83 01-Sep-2026 21:48
17 Commodity and Securities Exchanges 3,394 79 09-Sep-2026 21:50
18 Conservation of Power and Water Resources 2,026 11 25-Aug-2026 21:21
19 Customs Duties 3,132 35 27-Aug-2026 21:06
20 Employees' Benefits 5,589 31 10-Sep-2026 21:29
21 Food and Drugs 8,333 4 09-Sep-2026 21:50
22 Foreign Relations 3,311 41 01-Sep-2026 21:46
23 Highways 1,015 41 02-Sep-2026 20:48
24 Housing and Urban Development 4,848 23 21-Aug-2026 21:35
25 Indians 4,710 9 10-Dec-2025 00:35
26 Internal Revenue 6,013 0 09-Sep-2026 21:51
27 Alcohol, Tobacco Products and Firearms 3,857 0 18-Aug-2026 21:40
28 Judicial Administration 3,051 50 02-Sep-2026 20:50
29 Labor 7,201 102 10-Sep-2026 21:31
30 Mineral Resources 5,793 13 09-Sep-2026 21:50
31 Money and Finance: Treasury 5,345 70 27-Aug-2026 21:08
32 National Defense 3,702 114 18-Aug-2026 21:41
33 Navigation and Navigable Waters 4,619 25 10-Sep-2026 21:30
34 Education 3,170 32 10-Sep-2026 21:30
36 Parks, Forests, and Public Property 3,081 27 25-Aug-2026 21:21
37 Patents, Trademarks, and Copyrights 1,267 11 27-Aug-2026 21:07
38 Pensions, Bonuses, and Veterans' Relief 2,871 16 28-Aug-2026 21:24
39 Postal Service 1,125 6 15-Jun-2026 20:53
40 Protection of Environment 24,639 1,276 10-Sep-2026 22:07
41 Public Contracts and Property Management 2,945 11 01-Sep-2026 22:05
42 Public Health 7,244 25 14-Aug-2026 21:38
43 Public Lands: Interior 5,207 14 13-Aug-2026 21:13
44 Emergency Management and Assistance 907 6 24-Jun-2026 14:49
45 Public Welfare 5,652 33 01-Sep-2026 22:05
46 Shipping 8,372 51 02-Sep-2026 20:52
47 Telecommunication 4,734 15 04-Sep-2026 20:31
48 Federal Acquisition Regulations System 10,128 10 02-Sep-2026 20:52
49 Transportation 8,944 238 10-Sep-2026 21:45
50 Wildlife and Fisheries 3,244 168 02-Sep-2026 21:20

All 49 CFR titles are complete. CFR Title 35 does not appear because it is Reserved — the eCFR's own title index marks it reserved: true, so 49 titles is the whole Code, not a subset.

Every count in that table was measured by reading the file in data/ on 2026-09-11. Nothing is estimated and nothing is taken from an index page's own total.

As of

The text is the current CFR as republished by the U.S. Government Publishing Office from the Electronic Code of Federal Regulations, pulled 2026-09-11. The eCFR title index reported itself up_to_date_as_of 2026-09-09 at pull time. GPO rebuilds a title's bulk file when that title changes, so each title carries its own build date — the right-hand column above, and extra.bulk_last_modified on every row. Titles that agencies rarely touch carry older build dates by design: Title 3 (The President) was last rebuilt 20-May-2024, and the eCFR title index gives its latest_amended_on as 2015-03-17.

This is a snapshot, not a live feed. For a section that has been amended since its title's build date, check the eCFR URL in source.

How complete is it — checked against the live eCFR

Completeness is not asserted, it is measured. For every one of the 49 titles we asked the eCFR's own structure endpoint (/api/versioner/v1/structure/2026-09-09/title-{n}.json, an allowed path) for the list of section identifiers it currently publishes, and compared it with what is in these files:

count
section identifiers the eCFR listed as live on 2026-09-09 220,526
section identifiers held here 219,055 (99.33%)
listed by eCFR, not held here 1,520
held here, no longer listed by eCFR 49

Of the 1,520 not held, 1,476 carry no text of their own in the source — they are undesignated group headings whose substance lives in their subsections (48 C.F.R. 1.105 Issuance, 29 C.F.R. 2530.200a Scope) or pure cross-reference headings (29 C.F.R. 1917.28). The remaining 44, together with the 49 we hold that the eCFR no longer lists, are the lag between a title's GPO build date and 2026-09-09.

No title is a partial pull. Every title is whole as of its build date.

The record

Twelve columns, all strings — the same shape as docketx/us-statutes, so the two can be read together:

id, level (federal), jurisdiction (us), code (e.g. 29 C.F.R.), section (e.g. 1910.1200), citation (e.g. 29 C.F.R. § 1910.1200), title, text (verbatim), source (the eCFR URL for that section), license, retrieved_at, extra.

extra is a JSON string (parse it with json.loads) carrying the place of the section in the Code — cfr_title, cfr_title_name, chapter, chapter_name, subchapter, part, part_name, subpart, subpart_name, subject_group, the eCFR node id, the source_credit (the Federal Register history note printed with the section), and the bulk_file / bulk_last_modified it came from.

from datasets import load_dataset
ds = load_dataset("docketx/us-regulations")                       # all 49 titles
osha = ds["train"].filter(lambda r: r["code"] == "29 C.F.R.")     # one title

Where it came from, and how

  • Source: the official bulk XML at https://www.govinfo.gov/bulkdata/ECFR/title-{n}/ECFR-title{n}.xml — GPO's bulk republication of the current eCFR, one file per title, 824,347,237 bytes in total.
  • robots first. https://www.govinfo.gov/robots.txt places no Disallow on /bulkdata/, and GPO publishes a bulkdata sitemap for the ECFR collection. Every request identified itself as DocketRouterBot/1.0 (+https://docketrouter.ai/bot) and was paced at 1.5s.
  • What we did not do. eCFR's own full-text endpoints — /api/versioner/v1/full/ and /api/renderer/v1/content/ — are Disallowed in https://www.ecfr.gov/robots.txt, so they were not used and no user-agent was switched to get around them. Only …/api/versioner/v1/titles.json, which no rule covers, was read, for title names and the as-of date.
  • Not text: 7,171 sections and appendices marked [Reserved] in the source carry no text and are not included; a further 1,683 entries are heading-only stubs (an undesignated group heading such as 48 C.F.R. 1.105, whose text lives in its subsections) or appendices that exist only as a scanned form image. Nothing was dropped that had extractable text. Tables are rendered as pipe-separated rows; images are not transcribed, and the figure filenames are kept in extra.graphics.
  • Appendices follow the source. Appendices attached to a part or subpart are their own records (3,706 of them). Where the source nests an appendix inside a section — as it does with the mandatory Appendices A-F to 29 C.F.R. § 1910.1200 — that text is part of that section's record, which is why the 1910.1200 row is 307,615 characters long.

Licence

The Code of Federal Regulations is a work of the United States Government — published by the Office of the Federal Register (National Archives and Records Administration) and the Government Publishing Office — and is in the public domain in the United States. Every row carries license: public-domain-government-work. No claim of copyright is made over this compilation.

Part of the DocketX open legal corpus, alongside docketx/us-statutes, docketx/court-rules, docketx/us-caselaw, docketx/oral-arguments-us and docketx/us-judges.