OpenCaseLaw Commentaries API

The Commentaries API from OpenCaseLaw — 2 operation(s) for commentaries.

GitHub OpenAPI

Operations 2

GET /commentaries/search Search commentaries #
GET /commentaries/{abbreviation} Get commentary for a law #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/opencaselaw-ch:opencaselaw-ch-commentaries-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

opencaselaw-ch-commentaries-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenCaseLaw Commentaries API
  description: Swiss court decisions, statutes, commentaries, scholarship, and citation graph. 1,040,000+ published decisions from Swiss federal, cantonal, and regulatory bodies, 5,546 federal laws, 16,400 cantonal acts, 1,100+ commentaries, 51,000+ OA scholarship records.
  version: 1.0.0
servers:
- url: https://mcp.opencaselaw.ch/api
  description: OpenCaseLaw public REST API
- url: /api
  description: Relative — for self-hosted or reverse-proxied deployments
tags:
- name: Commentaries
paths:
  /commentaries/search:
    get:
      tags:
      - Commentaries
      summary: Search commentaries
      description: 'Search the article-anchored commentaries: OnlineKommentar.ch / OpenLegalCommentary.ch and the Kommentar zur Schaffhauser Verwaltungsrechtspflege.'
      operationId: api_search_commentaries_commentaries_search_get
      parameters:
      - name: query
        in: query
        required: false
        schema:
          type: string
          description: Search query
          title: Query
        description: Search query
      - name: q
        in: query
        required: false
        schema:
          type: string
          description: Alias for `query`.
          title: Q
        description: Alias for `query`.
      - name: abbreviation
        in: query
        required: false
        schema:
          type: string
          description: Filter by law abbreviation
          title: Abbreviation
        description: Filter by law abbreviation
      - name: language
        in: query
        required: false
        schema:
          type: string
          description: Filter by language
          title: Language
        description: Filter by language
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 50
          minimum: 1
          description: Max results
          default: 10
          title: Limit
        description: Max results
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /commentaries/{abbreviation}:
    get:
      tags:
      - Commentaries
      summary: Get commentary for a law
      description: Get OnlineKommentar commentary for a specific law article.
      operationId: api_get_commentary_commentaries__abbreviation__get
      parameters:
      - name: abbreviation
        in: path
        required: true
        schema:
          type: string
          description: Law abbreviation (e.g., OR, ZGB)
          title: Abbreviation
        description: Law abbreviation (e.g., OR, ZGB)
      - name: sr_number
        in: query
        required: false
        schema:
          type: string
          description: SR number
          title: Sr Number
        description: SR number
      - name: article
        in: query
        required: false
        schema:
          type: string
          description: Article number
          title: Article
        description: Article number
      - name: language
        in: query
        required: false
        schema:
          type: string
          description: 'Language: de, fr, it'
          default: de
          title: Language
        description: 'Language: de, fr, it'
      - name: canton
        in: query
        required: false
        schema:
          type: string
          description: Canton code for a cantonal act (e.g. SH with VRG or JG)
          title: Canton
        description: Canton code for a cantonal act (e.g. SH with VRG or JG)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            type: string
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
          type: object
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError