# Courts — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access the complete California Rules of Court including all 10 titles, Standards of Judicial Administration, and Ethics Standards for Neutral Arbitrators by searching specific rules, browsing tables of contents, or retrieving full chapter texts. Search across judicial procedure, civil rules, criminal rules, probate rules, family rules, and more to find the exact court guidance you need.

**Category:** Government & Public Data | **Website:** [courts.ca.gov/cms/rules/index/two](https://courts.ca.gov/cms/rules/index/two) | **Docs:** [parse.bot/marketplace/4c25c47d-abd4-4557-8aea-fdcadebd5907/courts-ca-gov-api](https://parse.bot/marketplace/4c25c47d-abd4-4557-8aea-fdcadebd5907/courts-ca-gov-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-courts-ca-gov-api-4c25c47d/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_chapter_rules

Get the full text of multiple rules from a title, optionally filtered by division or chapter number. Fetches each rule's page individually. Use the limit parameter to control how many rules are retrieved (each is a separate HTTP round-trip). Without filters, returns rules from the start of the title.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `chapter` | string | No | Filter by chapter number or text (e.g., '1' matches 'Chapter 1'). Omitting returns rules from all chapters. |
| `division` | string | No | Filter by division number or text (e.g., '1' matches 'Division 1'). Omitting returns rules from all divisions. |
| `limit` | integer | No | Maximum number of rules to fetch. |
| `title_slug` | string | No | Title identifier slug. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-courts-ca-gov-api-4c25c47d/get_chapter_rules \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"chapter":"<string>","division":"<string>","limit":"<integer>","title_slug":"<string>"}'
```

### get_rule_text

Get the full text of a specific rule by its ID. Returns the rule title and complete text content parsed from the official page. For numbered titles, passing just the number (e.g. '2_3') is accepted and normalized to 'rule2_3'.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `rule_id` | string | Yes | Rule identifier from the table of contents (e.g., 'rule2_3', 'ethics1', 'standard2_1'). For numbered titles, passing just the number like '2_3' is also accepted and will be normalized to 'rule2_3'. |
| `title_slug` | string | No | Title identifier slug. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-courts-ca-gov-api-4c25c47d/get_rule_text \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rule_id":"<string>","title_slug":"<string>"}'
```

### get_table_of_contents

Get the table of contents for a specific title, listing all rules with their division and chapter hierarchy. Each rule entry includes its slug, display name, division, chapter, and relative path. Useful for discovering rule IDs before fetching full text.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `title_slug` | string | No | Title identifier slug. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-courts-ca-gov-api-4c25c47d/get_table_of_contents \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title_slug":"<string>"}'
```

### list_titles

List all available titles in the California Rules of Court. Returns a static list of title identifiers, their full names, and table-of-contents paths. No pagination — the full catalog fits in one response.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-courts-ca-gov-api-4c25c47d/list_titles \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
