About
About OpenCaseLaw
OpenCaseLaw is an open dataset of Swiss case law with a machine-readable interface to federal and cantonal legislation, built for both people and language models (LLMs). Free to use, updated daily, supported by the Swiss National Science Foundation (SNSF) and ETH Zurich.
§01 Mission
Mission
Swiss legal research today is fragmented, mostly behind paywalls, and hard to reach for language models. The result: law students paying for expensive commercial databases, and LLMs hallucinating article text because they have no authoritative source.
OpenCaseLaw makes publicly published Swiss court decisions and the current text of relevant statutes freely available in a searchable, citation-linked, machine-readable format — for research, teaching, practice, and AI agents.
§02 Methodology
Methodology
- Sources: 58 scrapers covering the Federal Supreme Court, Federal Administrative Court, Federal Criminal Court, regulatory decisions (FINMA, ComCo, FDPIC, IndepBC, ElCom, etc.) and all 26 cantons. entscheidsuche.ch as a fallback source.
- Deduplication: docket normalisation, text similarity (MinHash), regeste priority. Identifies duplicates and links records published under two identifiers instead of deleting them, so the original records stay available.
- Indexing: SQLite FTS5 with BM25 ranking. Full daily rebuild, atomic swap, so MCP workers keep serving during rebuilds.
- Citation graph: over 10 million citations between decisions, over 12 million references to statute articles. Bidirectional, with appeal-chain resolution.
- Search: BM25 + Reciprocal Rank Fusion + meta-harness tuning + Haiku reranking. MRR@10 = 0.647 on a 100-query golden set (online, March 2026).
- Legislation: over 5,500 federal laws from the Fedlex SPARQL endpoint (over 130,000 articles in DE/FR/IT), mirrored locally every month and indexed with SQLite FTS5. Cantonal and intercantonal acts directly from the official portals of 24 cantons, via LexFind for the others.
Full technical documentation in the GitHub repository.
§03 Numbers
Numbers
§04 License & citation
License & citation
- Data: CC0 1.0 Public Domain — Swiss court decisions are public documents.
- Code: MIT License (github.com/ETH-Center-for-Law-and-Economics/caselaw).
- Commentaries: CC-BY-4.0 (OnlineKommentar.ch); CC BY-SA for the text of the Kommentar zur Schaffhauser Verwaltungsrechtspflege (EIZ Publishing).
Use without attribution is allowed, but appreciated: "Source: OpenCaseLaw.ch". For academic use, please cite the accompanying paper (Zenodo entry coming).
§05 Founder & operation
Founder & operation
OpenCaseLaw was founded by Jonas Hertner, who built the corpus, the search and the open interfaces as an independent, non-commercial project.
OpenCaseLaw is part of the research project Responsible AI for the Swiss Judiciary, in which ETH Zurich, the University of Basel and EPFL investigate how AI can support the work of Swiss courts, combining legal science, computer science and behavioural economics. The project is funded by the Swiss National Science Foundation (SNSF).
Today, OpenCaseLaw is operated by the Center for Law & Economics at ETH Zurich. For questions and feedback, see Contact & imprint.