Skip to main content
DocketLayer uses standard HTTP status codes. The core principle: you are never charged for a failed query. Charges apply only to successful 200 responses.

Error codes

CodeMeaningCharged
200Successful queryYes
402Payment absent, invalid, or insufficientNo
400Malformed request or missing required fieldsNo
404Case not found in the specified courtNo
422Court code not recognized or not currently coveredNo
429Rate limit exceededNo
503PACER or CM/ECF temporarily unavailableNo
504Query timeoutNo
500Internal server errorNo

Handling errors

response = client.get("https://api.docketlayer.com/v1/case", json={...})

if response.status_code == 200:
    data = response.json()
    # Process docket data

elif response.status_code == 402:
    # Payment failed
    # Check: wallet balance, x402 configuration, Solana network status

elif response.status_code == 404:
    # Case not found
    # Check: case_id format, court_code — verify against /v1/status

elif response.status_code == 422:
    # Court not covered
    # Check /v1/status for current coverage list

elif response.status_code == 429:
    # Rate limited — 60 req/min, 10,000 req/day per wallet
    retry_after = response.json().get("retry_after")
    time.sleep(retry_after or 60)

elif response.status_code == 503:
    # PACER temporarily unavailable
    # Check /v1/status for maintenance windows
    # Retry with exponential backoff

Rate limits

LimitValue
Requests per minute60 per wallet
Requests per day10,000 per wallet
When a rate limit is exceeded, the response includes a retry_after field (in seconds) indicating when the limit resets. For portfolios requiring more than 10,000 daily queries, distribute load across multiple funded wallets.

PACER availability

DocketLayer’s data depends on PACER and CM/ECF availability. During PACER maintenance windows, affected courts return 503 responses. The /v1/status endpoint reflects known maintenance windows and is the best source for current system state.
curl https://api.docketlayer.com/v1/status

Common mistakes

Wrong court code — Use the court code exactly as listed in /v1/status. Common examples: nysd, deb, cand. Do not include .uscourts.gov or any other suffix. Wrong case ID format — Federal case numbers follow the pattern division:year-type-number. Example: 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 /v1/status first.