Policy · API usage
Fair-use policy
OpenCaseLaw is free public infrastructure for Swiss legal research. There are no API keys, no sign-up and no paywall. Researchers, journalists, educators, individual lawyers and AI clients are welcome to use the endpoints freely. This page documents the rate guidance for commercial integrators whose volume could otherwise destabilise the service.
Short version. Honest use needs no coordination. If your product is going to fire one of the LLM-backed endpoints (/attest, /verify-claim, /mock-decision, /exam-question, /doctrine, /trends) more than ~200 times per day per IP, please reach out at team@jonashertner.com so we can give you a higher quota.
Why these endpoints have quotas
A subset of the public tools fan out to Claude (Anthropic) under the hood — typically Sonnet-4.6, which costs OpenCaseLaw on the order of $0.05–$0.50 per call depending on document size. A commercial integrator embedding one of these tools in an inner product loop can easily generate tens of thousands of calls per day, costing the project thousands of dollars per day with no awareness on their end. The quotas exist so that this never happens by accident.
The non-LLM tools (full-text search, citation graph traversal, statute lookup, scholarship retrieval, decision metadata, structured Erwägung extraction, etc.) are not quota’d. They run against local SQLite indices and cost ~nothing per call. Use freely.
Quota table (free / unauthenticated tier)
Per IP per day, resetting at 00:00 UTC:
| Endpoint | Tool name | Calls / day / IP |
|---|
When the daily quota is exceeded, the endpoint returns HTTP 429 Too Many Requests with a JSON body documenting the limit and the seconds remaining until reset. The Retry-After response header carries the same value.
All other endpoints have only nginx rate limiting (30 req/s per IP on /api/*, 10 req/s on /sse, burst 50).
Higher quotas for commercial use
If your product or research project needs more headroom on the LLM-backed endpoints, email team@jonashertner.com with:
- A short description of what you’re building.
- Your expected daily volume per endpoint.
- The IPs or IP ranges from which requests will originate (so we can confirm the right caller is using the issued key).
We mint an X-OCL-Key for you, which carries a quota multiplier (typically 10× for organic integrations like cantonal-government adopters, up to 100× for paid commercial use). Send the key as the X-OCL-Key header on each request:
curl -H "X-OCL-Key: ocl_xxxxxxxx..." \
-H "Content-Type: application/json" \
-d '{"draft_text": "..."}' \
https://mcp.opencaselaw.ch/api/attest
Paid commercial tiers are billed via Stripe at cost-recovery rates that map roughly to our actual Anthropic API spend per call. There is no margin layered on top — the project is non-profit.
Word add-in users
The Pro tier of the OpenCaseLaw Word add-in (CHF 5/month) includes 25 AI-tool calls per day shared across the four Pro features (Verify, Strengthen, Find Support, Reflect). That quota is enforced inside the billing path and is independent of the fair-use policy above; Pro users do not need an X-OCL-Key for the Word add-in.
What we monitor
- Aggregate Anthropic API spend, with daily alerts when burn is unusual.
- Per-IP quota counters (
output/quota.db), with audit trail of exceeded-quota events. - Per-tool error rates and timing distributions.
We do not log raw queries or response bodies — see the privacy policy for the differential-privacy rollup we publish in lieu of access logs.
If you hit a quota and you shouldn’t have
Honest mistakes happen — caches cold, retries amplified, a benchmark run that escaped the dev box. Email team@jonashertner.com with the timestamp + endpoint and we’ll reset the counter and discuss what your real volume looks like. We’d rather unblock you than have you silently fail.
This policy is intentionally lightweight and revisable. If you see a way it’s failing legitimate users, please tell us. The corpus stays CC0; the code stays MIT; the API stays free for the use cases that motivated this project (research, education, individual practice).