v2

latestOpenAPI 3.1.02026-07-2662567.7 KB

Search laws

Full-text search over statutes, regulations, constitutions, and agency guidance (US federal + all 50 states + DC).

Currency. Results are the law in force TODAY by default. Currency is derived, not stored: a document is current iff (1) it is not marked historical, (2) its effective_date is not in the future (a not-yet-effective amendment is stored but is not yet the law), and (3) no newer version is already in force, and (4) it is not a TOMBSTONE. Set current_only: false to search historical and future-effective versions too; each result carries is_current and is_historical so you can tell them apart. Historical search requires an API key with full historical access.

Filters.

  • states — full state names or USPS abbreviations; federal law is "Federal". Values are validated server-side.
  • collection_types — statute / regulation / constitution / guidance / executive_order / notice.
  • collections — specific codes by id or human-readable name (see /laws/collections). Values are resolved server-side.
  • path_prefix — restrict to a subtree of a code via its ltree path (e.g. "cfr.t21" = all of 21 CFR). Pair it with collections; paths are only unique within a collection.
  • effective_date_from/to, publication_date_from/to — ISO dates, inclusive. Note many state statutes have no source-stated effective date (the field is null and such docs would be excluded by an effective_date range filter).

State surveys. state_counts in the response gives estimated per-state hit counts for the whole query (not just the returned page) — use it to scope the survey, then verify each state with a filtered search.

Pagination: page (1-indexed) and page_size (max 50). Results beyond the first 10,000 cannot be paginated; narrow the query instead.

post/laws/search

Request body

querystring required

Full-text query, matched against document text, headings, and citations

statesstring[]

State names or USPS abbreviations; federal law is "Federal". Values are validated server-side.

collection_typesstring[]
collectionsstring[]

Restrict to collection ids or human-readable names (see /laws/collections). Values are resolved server-side.

path_prefixstring

Restrict to a subtree via a dot-separated ltree path prefix. Pair with collections — paths are only unique within a collection.

effective_date_fromstring date
effective_date_tostring date
publication_date_fromstring date
publication_date_tostring date
current_onlyboolean

When true (default), only documents that are the law in force today. Currency is derived — not historical, not future-effective, no in-force successor version.

pageinteger
page_sizeinteger

Example request

{
  "query": "telehealth prescribing controlled substances",
  "states": [
    "California",
    "TX",
    "Federal"
  ],
  "collections": [
    "cfr",
    "Texas Administrative Code"
  ],
  "path_prefix": "cfr.t21"
}

Response

Search results

totalinteger

Estimated matching documents for the whole query

pageinteger
page_sizeinteger
state_countsobject

Estimated per-state hit counts for the whole query (not just this page). Verify each state with a filtered search.

Example response

{
  "results": [
    {
      "collection_id": "cfr",
      "collection_type": "regulation",
      "state": "Federal",
      "country": "US",
      "path": "cfr.t21.cI.scH.p820.spA.s820_1",
      "number": "820.1",
      "title": "Scope.",
      "citation": "21 C.F.R. § 820.1"
    }
  ],
  "state_counts": {
    "California": 41,
    "Texas": 17,
    "Federal": 210
  }
}