> ## Documentation Index
> Fetch the complete documentation index at: https://docs.courtrules.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Extracted Rules

> Query validated extracted filing rules from active source documents, including state court e-filing, timing, service, fee, courtesy-copy, and courtroom rules

Search and page through every rule we hold, across all courts. Filter by court, judge, rule type, workflow phase, case type, or text. Results are newest first and paged with `limit` and `offset`.

<ParamField query="district_id" type="string">
  Court identifier, such as `il-cook-circuit`, `ca-los-angeles-superior`, or `edny`.
</ParamField>

<ParamField query="judge_slug" type="string">
  Judge, calendar, department, or courtroom slug. Court-level rules use `court`.
</ParamField>

<ParamField query="include_court_rules" type="boolean">
  When `judge_slug` is supplied, include court-level rules where `judge_slug` is `court`. Defaults
  to `true`.
</ParamField>

<ParamField query="logic_type" type="string">
  Filter by structured rule type, such as `ElectronicFilingRule`, `FilingTimingRule`, `ServiceRule`,
  `FilingFeeRule`, or `CourtesyCopyRule`.
</ParamField>

<ParamField query="workflow_phase" type="string">
  Filter by workflow phase, such as `FILING`, `CASE_INITIATION`, or `MOTION_PRACTICE`.
</ParamField>

<ParamField query="case_type" type="string">
  Filter by case type. General rules and rules without an explicit case-type limit are included.
</ParamField>

<ParamField query="q" type="string">
  Search summary, source text, tags, and structured data. Every word must appear in the rule.
  Example: `rejected cure`.
</ParamField>

<ParamField query="limit" type="number">
  Maximum rules per page. Defaults to `100`, maximum `500`.
</ParamField>

<ParamField query="offset" type="number">
  Number of matching rules to skip. Defaults to `0`. Pass `meta.next_offset` from the previous page
  to read the next one.
</ParamField>

<RequestExample>
  ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl 'https://api.courtrules.app/api/v1/extracted-rules?district_id=il-cook-circuit&logic_type=ElectronicFilingRule&case_type=civil&limit=25' \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "rules": [
      {
        "rule_id": "7c8b4dd2-1df6-4c34-b33f-0fdf3f4b6734",
        "district_id": "il-cook-circuit",
        "judge_slug": "court",
        "source_url": "https://www.cookcountycourtil.gov/about/circuit-court-rules",
        "source_url_key": "cook-county-circuit-rules",
        "document_version_id": "4b2c4f3a-b31e-47fd-9d8b-6e8c6d3eb7e0",
        "doc_kind": "local_rules",
        "logic_type": "ElectronicFilingRule",
        "workflow_phase": "FILING",
        "content": {
          "source_text": "Verbatim source text from the official rule document.",
          "summary": "Civil filings must be submitted electronically unless an exception applies.",
          "rule_tags": ["e_filing", "civil"],
          "workflow_phase": "FILING",
          "visual_severity": "CRITICAL",
          "structured_data": {
            "logic_type": "ElectronicFilingRule",
            "description": "Civil filings must use the court-approved electronic filing system."
          },
          "citation_source": {
            "section": "General Administrative Order"
          }
        }
      }
    ],
    "meta": {
      "total": 1,
      "returned": 1,
      "limit": 25,
      "offset": 0,
      "next_offset": null,
      "district_id": "il-cook-circuit",
      "include_court_rules": true,
      "logic_type": "ElectronicFilingRule",
      "case_type": "civil"
    }
  }
  ```
</ResponseExample>

## Response fields

<ResponseField name="rules" type="array">
  Validated extracted filing rules with provenance.
</ResponseField>

<ResponseField name="content" type="object">
  The validated extracted rule payload. It includes source text, summary, tags, workflow phase,
  severity, structured data, and citation details when captured.
</ResponseField>

<ResponseField name="source_url" type="string">
  Official source URL for the rule.
</ResponseField>

<ResponseField name="document_version_id" type="string">
  Source document version used for the extraction.
</ResponseField>

<ResponseField name="meta" type="object">
  <Expandable title="Meta">
    <ResponseField name="total" type="integer">
      Number of rules matching the filters, across all pages
    </ResponseField>

    <ResponseField name="returned" type="integer">
      Number of rules in this page
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Page size requested
    </ResponseField>

    <ResponseField name="offset" type="integer">
      Number of matching rules skipped
    </ResponseField>

    <ResponseField name="next_offset" type="integer | null">
      Offset of the next page, or `null` on the last page
    </ResponseField>
  </Expandable>
</ResponseField>

## Paging

Read a whole court by following `next_offset` until it is `null`:

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
import requests

rules, offset = [], 0
while offset is not None:
    page = requests.get(
        "https://api.courtrules.app/api/v1/extracted-rules",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        params={"district_id": "ca-los-angeles-superior", "limit": 500, "offset": offset},
    ).json()
    rules += page["rules"]
    offset = page["meta"]["next_offset"]
```

Rules are ordered newest first. If the court's documents are re-checked while you page, a rule can move between pages; re-read from `offset=0` when you need an exact snapshot.

## Filtering behavior

When `judge_slug` is provided, the endpoint returns rules for that unit. With `include_court_rules=true`, the response also includes court-level rules for the same court. This lets clients combine court rules with judge, calendar, department, or courtroom overrides.

This endpoint exposes raw extracted rules first. It does not yet resolve conflicts or compute the final effective rule set for a filing.

## Limits

* **Text and case-type searches:** `q` and `case_type` read every candidate rule before matching, up to 10,000 candidates. That covers any single court. A search across all courts with a common word returns `422`; add `district_id`, `judge_slug`, `logic_type`, `workflow_phase`, or more specific words.
* **Unknown court:** a `district_id` we do not map returns `404`.

For one judge's complete rule set in a single call, grouped into court-wide and judge layers, use [`/rules`](/api-reference/rules).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.