v2

latestOpenAPI 3.1.02026-07-2662567.7 KB

Get a law document

Retrieve one law document — a statute section, regulation, constitutional provision, guidance document, or a container node (title / chapter / part) — with its verbatim text, hierarchy context, and version history.

Lookup methods (provide exactly ONE):

  • citation — canonical citation (e.g. "42 U.S.C. § 1983", "Cal. Code Regs. tit. 22, § 51451"). Matching ignores punctuation, spacing, and § / sec. / section style, but not abbreviation differences.
  • register_citation — Federal Register or state register citation of a rule document (e.g. "89 FR 12345").
  • path — full ltree path (from a search result or a previous get); add collection since paths are only unique per collection.
  • id — document UUID (always unambiguous; ids come from search results, children, versions, or matches).

Currency & versions. By default the lookup resolves to the CURRENT version (see /laws/search for the derivation). When the document has version history, versions lists every version with its dates and currency flags. An id lookup returns that exact version; historical versions and widened lookups require full historical access.

Container nodes. When the resolved document is not a leaf (node_type: "PARENT"), children lists its current children in the code's authored order — navigation rows only (number, citation, title, sort order; no html), capped at 250 with the true count in children_total. Fetch a child's text by its id, or navigate up via the document's parent_id. For containers with many children, search directly for the target section instead of walking the tree.

Responses are discriminated by status:

  • founddocument + children + versions
  • ambiguous (citation matched several documents) — matches to pick from
  • not_found (HTTP 404) — message explains; it may suggest retrying with include_historical when only non-current versions exist.
post/laws/get

Request body

idstring uuid
pathstring

Full ltree path; pair with collection

citationstring

Canonical citation; matching ignores punctuation, spacing, and § / sec. / section style, but not abbreviation differences

register_citationstring

Federal Register / state register citation

collectionstring

Collection id or human-readable name that disambiguates path/citation/register-citation lookups

include_historicalboolean

Allow resolving superseded or future-effective versions

Example request

{
  "path": "cfr.t21.cI.scH.p820",
  "citation": "42 U.S.C. § 1983",
  "register_citation": "89 FR 12345",
  "collection": "cfr"
}

Response

Document found (or ambiguous — see status)

status'found' | 'ambiguous' | 'not_found'
children_totalinteger

True number of current children (children[] holds at most 250)

messagestring

Only for status=not_found

Example response

{
  "document": {
    "collection_name": "Code of Federal Regulations",
    "collection_type": "regulation",
    "state": "Federal",
    "country": "US"
  }
}