https://api.courtrules.app
The REST API covers court rules (compliance checks, judge rules, document classification). Enforcement data is available through the MCP server at mcp.courtrules.app, which also exposes court rules tools.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/courts | List all courts |
GET | /api/v1/courts/:id | Get a single court’s details |
GET | /api/v1/judges | List judges for a district |
GET | /api/v1/rules | Get applicable rules for a judge |
GET | /api/v1/profile | Get a judge’s full compliance profile |
GET | /api/v1/documents | List source documents for a judge |
GET | /api/v1/documents/{id}/pdf | Download a source document PDF |
POST | /api/v1/check | Check document compliance |
POST | /api/v1/classify | Classify a PDF and extract metadata |
GET | /openapi.json | Download the OpenAPI specification |
Authentication
All endpoints require a Bearer token in theAuthorization header:
Interactive playground
Each endpoint page in this section includes a live request builder. Select an endpoint from the sidebar, fill in parameters, and send real requests againsthttps://api.courtrules.app. You’ll need your API key from console.courtrules.app.
OpenAPI specification
The complete OpenAPI 3.1 spec is available as a public endpoint (no authentication required):Content type
AllPOST requests must use Content-Type: application/json.
Most responses are application/json. Document PDF endpoints (/documents/{id}/pdf) return application/pdf.
Error responses
Error responses follow a consistent format with actionable guidance:Rate limits
All endpoints are rate-limited per API key using a sliding window:| Endpoint | Limit |
|---|---|
POST /classify | 5 RPM |
POST /check | 60 RPM |
GET /courts, /judges, /rules | 300 RPM |
X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers. When exceeded, the API returns 429 with a Retry-After header.
See Rate Limits for retry guidance and common mistakes.
HTTP status codes
| Code | Meaning |
|---|---|
200 | Success |
400 | Invalid request (missing params, validation failure) |
401 | Missing or invalid Authorization header |
403 | Invalid API key, or district not yet accessible |
404 | Resource not found (judge not in district, unknown district ID) |
429 | Rate limit exceeded |
502 | Classification failed (timeout or upstream error on /classify) |