Skip to main content

AI-native legal data layer for the agentic economy. 500M+ US federal court records via x402 on Base.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clerk_api-0.1.1.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clerk_api-0.1.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file clerk_api-0.1.1.tar.gz.

File metadata

  • Download URL: clerk_api-0.1.1.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for clerk_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d8268060d94ea17b12b6571a50f32b27d9d7eae9b37f29b3a03a7c944169273e
MD5 ca765c246f1472bcec1f87ea2ec6318e
BLAKE2b-256 39849f846fe7cb65763d4ce00904d4c9bd8bbb49cba98ecb6d7f25c87cd2d900

See more details on using hashes here.

File details

Details for the file clerk_api-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: clerk_api-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for clerk_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e17b8da226fe0d018d6ad916aa3ee2ec1c98e9ad544a3648ed290f93627b37b
MD5 d3582c4facce78e1a8ff0eb512c45be4
BLAKE2b-256 dc6869b0e6840311e72a08ba1599cae7e20285e6b96388e854c7d18bae0b122d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page