
Case-law precedent search (CourtListener, US)
Finds US court opinions most on point for a legal question or fact pattern: searches CourtListener's case-law index (optionally limited to courts and filing dates), reads the top opinions, and returns the best matches with a holding passage verified verbatim against the opinion text, plus citation, court, date, precedential status and a source hash. A second skeptical pass flags matches that look off point. It finds precedents for a question; it does not verify citations a brief already contains (use legal-cite-verifier for existence, name, year and quote checks). It is not a citator (no subsequent history or overruling check) and not legal advice. Coverage is limited to CourtListener's index; abstains with no_precedent_found rather than guessing.
What you get
Gets a researcher to a short list of on-point opinions with checkable quotes and source hashes in one call, instead of hours of keyword searching.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/precedent-search. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/precedent-search \
-H 'content-type: application/json' \
-d '{"question":"Does a warrantless search of a cell phone seized incident to a lawful arrest violate the Fourth Amendment?","courts":["scotus","ca9"],"max_results":3}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
question | string; length 20..2000 | yes | The legal issue and key facts. Quote a phrase to require it verbatim in the search. |
courts | array<string>; max 10 items | no | CourtListener court ids such as "scotus", "ca9", "cal", "calctapp". Omit to search all courts. |
filed_after | string | no | Earliest filing date, YYYY-MM-DD. |
filed_before | string | no | Latest filing date, YYYY-MM-DD. |
max_results | integer; 1..8 | no | Default 5. |
include_excerpts | boolean | no | Default true. When false, the holding passage text is omitted from the output (quote_verified and quote_offset are still reported). |
Example request body
{
"question": "Does a warrantless search of a cell phone seized incident to a lawful arrest violate the Fourth Amendment?",
"courts": [
"scotus",
"ca9"
],
"max_results": 3
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "ok", "no_precedent_found" | no | |
question_sha256 | string | no | |
queries_used | array<string> | no | Free-text queries sent to CourtListener; court and date filters are applied separately. |
courts | array<string> | no | |
precedents | array<object> | no | |
candidates_seen | array<object> | no | |
llm | object | no | selection {provider, model} (null when no model call was needed) and adversarial ok|unavailable|skipped. |
not_a_citator | boolean | no | |
notice | string | no | |
limits | object | no |
Pay and connect
Available through: x402 (USDC on Base), MCP, RapidAPI, Apify.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent