> ## 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.

# Quickstart

> Get compliance results in under a minute

The platform has two data domains: **court rules** (filing compliance for 20+ courts and 630+ judges) and **enforcement intelligence** (privacy enforcement actions from 21 jurisdictions). This quickstart covers court rules via the REST API. For enforcement data, see [Enforcement Data](/concepts/enforcement-data) and [MCP: Enforcement Data](/guides/mcp-enforcement).

By the end of this quickstart, you will have:

* Listed available courts and judges
* Retrieved judge-specific filing rules
* Run a compliance check against those rules

All from your terminal in under 5 minutes.

This guide walks through four calls: discover courts, list judges, get applicable rules, and check a document. All requests require a Bearer token. See [Authentication](/authentication) for details.

```
Authorization: Bearer YOUR_API_KEY
```

## 1. See the universe

Start by listing all courts to see what's available:

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl 'https://api.courtrules.app/api/v1/courts' \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

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

  headers = {"Authorization": "Bearer YOUR_API_KEY"}
  resp = requests.get("https://api.courtrules.app/api/v1/courts", headers=headers)
  courts = resp.json()
  print(f"{courts['meta']['total_districts']} districts, {courts['meta']['districts_with_data']} with data")
  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const headers = { Authorization: "Bearer YOUR_API_KEY" };
  const resp = await fetch("https://api.courtrules.app/api/v1/courts", { headers });
  const { courts, meta } = await resp.json();
  console.log(`${meta.total_districts} districts, ${meta.districts_with_data} with data`);
  ```
</CodeGroup>

All courts are mapped. 20+ have judge data. Your plan determines which courts you can query. Use the `accessible_districts` field in the response to see what's available to you.

## 2. List judges in a district

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl 'https://api.courtrules.app/api/v1/judges?district_id=edny' \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  resp = requests.get(
      "https://api.courtrules.app/api/v1/judges",
      headers=headers,
      params={"district_id": "edny"},
  )
  judges = resp.json()
  for j in judges["judges"]:
      print(f"{j['name']} - {j['slug']}")
  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const resp = await fetch("https://api.courtrules.app/api/v1/judges?district_id=edny", { headers });
  const { judges } = await resp.json();
  judges.forEach((j) => console.log(`${j.name} - ${j.slug}`));
  ```
</CodeGroup>

Returns all judges for the district. Use the `slug` field when calling [`/rules`](/api-reference/rules) or [`/check`](/api-reference/check).

## 3. Get rules for a judge

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl 'https://api.courtrules.app/api/v1/rules?judge_slug=gary-r-brown&district_id=edny&document_scope=brief_support&motion_type=Rule_56' \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  resp = requests.get(
      "https://api.courtrules.app/api/v1/rules",
      headers=headers,
      params={
          "judge_slug": "gary-r-brown",
          "district_id": "edny",
          "document_scope": "brief_support",
          "motion_type": "Rule_56",
      },
  )
  rules = resp.json()
  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const resp = await fetch(
    "https://api.courtrules.app/api/v1/rules?" +
      new URLSearchParams({
        judge_slug: "gary-r-brown",
        district_id: "edny",
        document_scope: "brief_support",
        motion_type: "Rule_56",
      }),
    { headers },
  );
  const { rules } = await resp.json();
  ```
</CodeGroup>

Returns the full rule set organized by authority layer: FRCP, Local Rules, and Standing Order.

## 4. Check a document

Send document metadata to the [`/check`](/api-reference/check) endpoint:

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST https://api.courtrules.app/api/v1/check \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "judge_slug": "gary-r-brown",
      "district_id": "edny",
      "document_scope": "brief_support",
      "motion_type": "Rule_56",
      "is_pro_se": false,
      "pmc_completed": true,
      "opposing_party_pro_se": false,
      "filing_role": "movant",
      "document": {
        "page_count": 18,
        "word_count": 7200
      }
    }'
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  resp = requests.post(
      "https://api.courtrules.app/api/v1/check",
      headers=headers,
      json={
          "judge_slug": "gary-r-brown",
          "district_id": "edny",
          "document_scope": "brief_support",
          "motion_type": "Rule_56",
          "is_pro_se": False,
          "pmc_completed": True,
          "opposing_party_pro_se": False,
          "filing_role": "movant",
          "document": {"page_count": 18, "word_count": 7200},
      },
  )
  result = resp.json()
  print(f"Status: {result['summary']['status']}")
  for r in result["results"]:
      print(f"  [{r['status']}] {r['message']} ({r['source']})")
  ```

  ```typescript Node.js theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const resp = await fetch("https://api.courtrules.app/api/v1/check", {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({
      judge_slug: "gary-r-brown",
      district_id: "edny",
      document_scope: "brief_support",
      motion_type: "Rule_56",
      is_pro_se: false,
      pmc_completed: true,
      opposing_party_pro_se: false,
      filing_role: "movant",
      document: { page_count: 18, word_count: 7200 },
    }),
  });
  const { summary, results } = await resp.json();
  console.log(`Status: ${summary.status}`);
  results.forEach((r) => console.log(`  [${r.status}] ${r.message} (${r.source})`));
  ```
</CodeGroup>

## Minimal vs. full document input

The `document` object only requires `page_count` and `word_count`. With just these two fields, the API checks:

* Page and word limits (judge-specific and local rules)
* Courtesy copy requirements
* Pre-motion conference requirements
* Filing gate and bundling rules

To get structural checks (caption, signature, required sections), provide the optional fields. See [Document Structure](/concepts/document-structure) for the full schema.

## Understanding results

Each result has:

| Field      | Description                                                     |
| ---------- | --------------------------------------------------------------- |
| `severity` | `CRITICAL`, `WARNING`, or `INFO`                                |
| `category` | What kind of rule (e.g. `PAGE_LIMIT`, `CAPTION`, `PMC`)         |
| `message`  | Human-readable explanation                                      |
| `source`   | Citation (e.g. `FRCP 10(a)`, `EDNY LR 7.1(c)`, `Brown SO §2.B`) |
| `status`   | `FAIL`, `PASS`, or `ACTION_REQUIRED`                            |

The summary `status` is:

* **`COMPLIANT`:** No failures, no action items
* **`REVIEW`:** No failures, but action items exist (e.g. courtesy copy reminder)
* **`NON_COMPLIANT`:** At least one FAIL result

## Next steps

* [API Reference](/api-reference/overview): Full endpoint reference with schemas, parameters, and live playground
* [Same Document, Different Judge](/guides/same-document-different-judge): See why the same filing gets different results for different judges
* [Integration Patterns](/guides/integration-patterns): How to integrate the API into your application
* [Building with AI Agents](/guides/building-with-ai-agents): Use the OpenAPI spec with LLMs
