Skip to main content
POST
Search US court opinions

Authorizations

Authorization
string
header
required

API key issued from the developer dashboard. Pass as Authorization: Bearer vq_key_... (preferred).

Headers

Idempotency-Key
string | null

Optional. 16 to 255 visible ASCII characters (a UUIDv4 works). Repeating the same request with the same key replays the original 2xx response for 24 hours without charging again. The same key on a different request is rejected. With the account's cacheQueryDerivedData retention setting off, no body is stored and a retry answers 409 idempotency_replay_unavailable, still without a second charge.

Required string length: 16 - 255
Pattern: ^[\x21-\x7e]+$
Example:

"3f9c2a1e-7b44-4d0a-9c1e-5a6b7c8d9e0f"

Body

application/json

Body of POST /us/cases/search.

query
string
required

Words to find in opinion text. Every word must appear (AND). Put an exact phrase in double quotes: "qualified immunity" excessive force needs the phrase, in that order, and both other words. At most 50 free words and 3 quoted phrases.

Required string length: 1 - 1000
Example:

"qualified immunity excessive force"

courtIds
string[] | null

Only these courts. Combined with state as an intersection.

Maximum array length: 50
Pattern: ^US_[A-Z0-9_]{2,40}$
Example:
state
enum<string> | null

Two-letter state or territory code: only that state's courts. Case-insensitive (CA and ca both work); an unknown code is a 422.

Available options:
al,
ak,
as,
az,
ar,
ca,
co,
ct,
de,
dc,
fl,
ga,
gu,
hi,
id,
il,
in,
ia,
ks,
ky,
la,
me,
md,
ma,
mi,
mn,
ms,
mo,
mt,
ne,
nv,
nh,
nj,
nm,
ny,
nc,
nd,
mp,
oh,
ok,
or,
pa,
pr,
ri,
sc,
sd,
tn,
tx,
ut,
vt,
vi,
va,
wa,
wv,
wi,
wy
Example:

"ca"

dateFrom
string<date> | null
Example:

"1990-01-01"

dateTo
string<date> | null
Example:

"2020-12-31"

publicationStatus
enum<string>[] | null
Maximum array length: 7
Available options:
published,
unpublished,
unknown,
errata,
separate,
in_chambers,
relating_to
Example:
judgeId
string | null

Cases this judge sat on or wrote an opinion in.

Pattern: ^USJDG_[0-9A-F]{20}$
Example:

"USJDG_0123456789ABCDEF0123"

sort
enum<string>
default:relevance

relevance (default, best match first), decision_date (newest first), decision_date_asc (oldest first) or cited_by (most cited first). A sort other than relevance orders the best matching opinions the search ranks, not every match in the corpus: narrow the query or the filters when the order matters.

Available options:
relevance,
decision_date,
decision_date_asc,
cited_by
Example:

"decision_date"

minCitedBy
integer | null

Only cases cited by at least this many other cases. Applied to the best matching opinions the search ranks.

Required range: 1 <= x <= 1000000
Example:

10

courtSystem
enum<string> | null

Only courts of this system. Combined with courtIds, state and courtLevel as an intersection.

Available options:
federal,
state,
territorial,
tribal,
military
Example:

"federal"

courtLevel
enum<string> | null

Only courts of this level. Combined with courtIds, state and courtSystem as an intersection.

Available options:
supreme,
appellate,
trial,
bankruptcy,
bankruptcy_appellate,
special,
attorney_general,
agency,
other
Example:

"appellate"

caseName
string | null

Only cases whose title contains this text, any letter case. At least 3 characters.

Required string length: 3 - 200
Example:

"Miranda"

docketNumber
string | null

Only cases whose docket number contains this text, any letter case. At least 3 characters.

Required string length: 3 - 200
Example:

"70-18"

limit
integer
default:20
Required range: 1 <= x <= 100
Example:

10

offset
integer
default:0
Required range: 0 <= x <= 10000
Example:

20

passages
integer
default:1

How many passages of the best matching opinion each hit carries, 1 to 3 (about 500 characters each, best first). The price does not change.

Required range: 1 <= x <= 3
Example:

3

Response

Successful Response

results
CaseLawSearchHit · object[]
required

The rows of this page, in the order the route sorts them.

count
integer
required

Number of rows in results on this page.

limit
integer
required

Page size that was applied: the limit asked for, or the default.

offset
integer
required

Number of rows skipped: the offset asked for.

hasMore
boolean
required

True when another page follows: ask again with offset plus limit.

creditsConsumed
integer
required

Credits this call cost. 0 on a free route.

processingTimeMs
number
required

Server time spent on this call, in milliseconds.