Skip to main content

Clerk — AI-native legal data layer for the agentic economy

Clerk

The AI-native legal data layer for the agentic economy.

Clerk provides permissionless access to 500M+ US federal court records across 94 federal courts through 11 data endpoints. Built on Base, it eliminates subscriptions and API keys by using x402 micropayments at just $0.001 per query in USDC. Stack legal intelligence into any AI agent workflow.

Live at clerk.solvrlabs.ai · Built by Solvr Labs · 1B+ $CLERK = free unlimited


What is Clerk?

Clerk is an x402-paid API that exposes US federal court records to AI agents. No API keys to manage. No subscriptions. No forms. Agents call the endpoint, the 402 response triggers a USDC payment, the call retries automatically, and the agent receives JSON.

The agent calls. The 402 fires. The agent pays. The data returns. No keys, no forms, no humans in the loop.

Install

pip install clerk-api

Requires Python 3.10+. One dependency: httpx (or requests as a fallback).

Quick start

/search works in demo mode without payment — perfect for trying the SDK first:

from clerk_api import ClerkClient

client = ClerkClient()  # no auth — demo mode

cases = client.search("SEC v Ripple")
for case in cases:
    print(f"{case['case_name']} — {case['court']} — {case['date_filed']}")

For full access on paid endpoints, you send USDC externally first (any wallet on Base — MetaMask, Bankr, web3.py, etc.) to Clerk's payment wallet, then pass the resulting transaction hash to the client:

import os
from clerk_api import ClerkClient

# 1. Send $0.001 USDC to the Clerk payment wallet on Base (you do this
#    out-of-band using any web3 client). Capture the resulting tx hash.
# 2. Pass the tx_hash to the SDK. The client encodes it as an x402
#    payment header that the server validates against the on-chain tx.
client = ClerkClient(tx_hash=os.environ["CLERK_PAYMENT_TX"])

docket = client.docket("67614382")
print(docket)

Free unlimited access: wallets holding 1B+ $CLERK on Base bypass per-call payment entirely. The protocol auto-detects $CLERK balance from the payment context.

Endpoints

Endpoint What Price
GET /search?q=... Federal case search $0.001 USDC
GET /docket/{id} Full docket details $0.001
GET /parties?name=... Entity lookup $0.001
GET /judges?name=... Judicial profile $0.001
GET /citations?q=... Opinions / precedents $0.001
GET /opinion/{id} Full opinion text $0.001
GET /filings/{docket_id} Docket timeline $0.001
GET /oral-arguments?q=... Oral argument transcripts $0.001
GET /document/{doc_id} Document + download URL $0.001
GET /court/{court_id} Court metadata $0.001
GET /health Health check free

Full API reference: ENDPOINTS.md

$CLERK token

Pay-per-query via x402 micropayments. Or hold 1B+ $CLERK on Base to unlock unlimited free queries on every endpoint.

The protocol auto-detects $CLERK balance from your signing wallet on each request.

Delegated signer pattern (production)

For agent ops at scale, never put your main $CLERK-holding wallet in a script. Instead, delegate signing to a fresh wallet funded only with gas.

python examples/register_delegates.py --csv my_agents.csv

Your main wallet stays cold; agent wallets do all the signing. See examples/register_delegates.py.

Demo mode

/search works without payment in demo mode (limited results per IP per hour). Use it to test the integration before wiring up x402.

client = ClerkClient()  # no key — demo mode
results = client.search("Binance", limit=5)

Limits

  • Federal courts only (94 district courts + appellate). State courts not covered.
  • Sealed dockets are not exposed.
  • Surfaces public records only. Not legal advice — interpretation requires a licensed attorney.

License

MIT


Links

Support the project

Hold $CLERK on Base for free unlimited queries, or trade on DEXScreener.

0x20EabA9d6818529cfFFA2c1C63B97A02a0049bA3

DEXScreener


Clerk — Court Records, On Demand

Clerk — The Permissionless Legal Data Layer for the Agent Economy.

Metadata

Release files for clerk-api 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clerk-api 0.1.1
File Size Uploaded
clerk_api-0.1.1.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clerk-api 0.1.1
File Interpreter ABI Platform
clerk_api-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.9 kB

Release files / clerk_api-0.1.1.tar.gz

Download URL clerk_api-0.1.1.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d8268060d94ea17b12b6571a50f32b27d9d7eae9b37f29b3a03a7c944169273e
BLAKE2b-256 checksum
How to use checksums
39849f846fe7cb65763d4ce00904d4c9bd8bbb49cba98ecb6d7f25c87cd2d900
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / clerk_api-0.1.1-py3-none-any.whl

Download URL clerk_api-0.1.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e17b8da226fe0d018d6ad916aa3ee2ec1c98e9ad544a3648ed290f93627b37b
BLAKE2b-256 checksum
How to use checksums
dc6869b0e6840311e72a08ba1599cae7e20285e6b96388e854c7d18bae0b122d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page