---
title: "Get a law document"
method: POST
path: "/laws/get"
---

# Get a law document

`POST /laws/get`

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`:**
- `found` — `document` + `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.

## Request body

- LawsGetRequest — Provide exactly ONE of id, path, citation, register_citation.
  - `id` string, uuid
  - `path` string — Full ltree path; pair with collection
  - `citation` string — Canonical citation; matching ignores punctuation, spacing, and § / sec. / section style, but not abbreviation differences
  - `register_citation` string — Federal Register / state register citation
  - `collection` string — Collection id or human-readable name that disambiguates path/citation/register-citation lookups
  - `include_historical` boolean — Allow resolving superseded or future-effective versions

## Response `200`

Document found (or ambiguous — see `status`)

- LawsGetResponse — Discriminated by `status` — found / ambiguous (404 for not_found).
  - `status` 'found' | 'ambiguous' | 'not_found'
  - `document` LawDocument
    - `id` string, uuid
    - `parent_id` string, uuid, nullable — Parent node — fetch it to zoom out to surrounding context
    - `collection_id` string
    - `collection_name` string
    - `collection_type` string
    - `state` string
    - `country` string
    - `path` string
    - `node_type` 'LEAF' | 'PARENT' | 'TOMBSTONE'
    - `number` string, nullable
    - `title` string, nullable
    - `citation` string, nullable
    - `register_citation` string, nullable
    - `effective_date` string, date, nullable
    - `publication_date` string, date, nullable
    - `source_as_of` string, date, nullable — The source's own "current as of" date, when stated
    - `is_current` boolean — Derived — the law in force today
    - `is_historical` boolean — Source/pipeline marked this version superseded
    - `sort_order` integer, nullable
    - `source_url` string, nullable — The official source page
    - `url` string, uri — Midpage page for this exact version
    - `html` string, nullable — Verbatim document text as HTML (null for most containers)
  - `children` LawChild[] — Present for container nodes — current children in authored order, capped at 250 (see children_total). Navigation only; fetch a child by id for its text. Empty for leaves.
    - `id` string, uuid
    - `path` string
    - `node_type` string
    - `number` string, nullable
    - `title` string, nullable
    - `citation` string, nullable
    - `sort_order` integer, nullable
    - `effective_date` string, date, nullable
  - `children_total` integer — True number of current children (children[] holds at most 250)
  - `versions` LawVersion[] — The document's version chain (empty when it has no version history). Every version with dates and currency; is_requested marks the returned one.
    - `id` string, uuid
    - `effective_date` string, date, nullable
    - `publication_date` string, date, nullable
    - `source_as_of` string, date, nullable
    - `is_historical` boolean
    - `is_current` boolean
    - `is_requested` boolean — True for the version returned as `document`
  - `matches` LawMatch[] — Only for status=ambiguous — candidate documents; retry by id
    - `id` string, uuid
    - `collection_id` string
    - `collection_type` string
    - `state` string, nullable
    - `path` string
    - `citation` string, nullable
    - `title` string, nullable
    - `is_current` boolean
  - `message` string — Only for status=not_found

## Other responses

- `400` — Validation error (e.g. zero or multiple lookup keys)
- `401` — Unauthorized
- `403` — Historical access requires a full-access API key
- `404` — No document matched

---

[API](https://skmtc.dev/midpage/apis/midpage-data-services-api.md) · [All operations](https://skmtc.dev/midpage/apis/midpage-data-services-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/midpage/midpage-data-services-api/revisions/8d436f13cd7e/schema)
