Error format
All errors return JSON with this structure:Error codes
Handling errors
Rate limits
When a rate limit is exceeded, the response body includes a
retry_after value in seconds inside error.details. For portfolios requiring more than 10,000 daily queries, distribute load across multiple funded wallets.
Case not found — auto-scrape
When a 404case_not_found is returned, DocketLayer automatically enqueues the case for its next scrape cycle. Retrying the same query a few minutes later will typically succeed once the normalization service has populated the case.
Source court availability
DocketLayer’s data depends on source court availability. During maintenance windows, affected courts return 503 responses. The/v2/status endpoint reflects known maintenance windows and is the best source for current system state.
Common mistakes
Wrong court code — Use the court code exactly as listed in/v2/status. Common examples: nysd, deb, cand. Do not include .uscourts.gov or any other suffix.
Wrong case ID format — Each court’s expected case ID format is in /v2/status under case_id_format. For US federal courts the pattern is division:year-type-number — e.g. 1:24-cv-01234. See the case ID format guide.
Depleted wallet — A $0 USDC balance causes all queries to return 402. Monitor your wallet balance and refund before it runs dry.
Uncovered court — Querying a court not in the current coverage list returns 422. Always check /v2/status first.
Future last_checked — A last_checked timestamp later than the current time returns 400. This can happen if your system clock is ahead of UTC.