OpenCaseLaw Research API

The Research API from OpenCaseLaw — 5 operation(s) for research.

GitHub OpenAPI

Operations 5

POST /tool/{name} Call any research tool and get its structured payload #
GET /tool List the research tools #
GET /doctrine Get doctrine for a legal topic #
GET /case-brief/{case} Get structured case brief #
GET /exam-question Generate exam question #

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-research-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-research-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenCaseLaw Research 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: Research
paths:
  /tool/{name}:
    post:
      tags:
      - Research
      summary: Call any research tool and get its structured payload
      description: 'Every tool the MCP server offers, callable over plain HTTP: POST a JSON object of arguments (the tool''s inputSchema; see GET /api/tool) and receive the handler''s own dict — fields rather than Markdown. A tool-reported error comes back as HTTP 200 with an `error` key and `_is_error` true; an unknown tool is 404; invalid arguments are 422. Read-only; the same rate limits apply.'
      operationId: api_tool_call_tool__name__post
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
          title: Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /tool:
    get:
      tags:
      - Research
      summary: List the research tools
      description: Every tool with its description and input schema; POST /api/tool/{name} calls one.
      operationId: api_tool_list_tool_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /doctrine:
    get:
      tags:
      - Research
      summary: Get doctrine for a legal topic
      description: Statute text + authority-ranked BGEs + doctrine timeline + commentary excerpt.
      operationId: api_get_doctrine_doctrine_get
      parameters:
      - name: query
        in: query
        required: true
        schema:
          type: string
          description: Legal topic, statute reference, or concept
          title: Query
        description: Legal topic, statute reference, or concept
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /case-brief/{case}:
    get:
      tags:
      - Research
      summary: Get structured case brief
      description: 'Structured case brief: facts, reasoning, statutes, authority, related cases. Includes citation_string_{de,fr,it} + canonical_url + rule_statement at the top level for copy-ready citation.'
      operationId: api_get_case_brief_case_brief__case__get
      parameters:
      - name: case
        in: path
        required: true
        schema:
          type: string
          description: Decision ID, docket number, or BGE reference
          title: Case
        description: Decision ID, docket number, or BGE reference
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /exam-question:
    get:
      tags:
      - Research
      summary: Generate exam question
      description: Generate a law exam question from a real BGE fact pattern.
      operationId: api_generate_exam_question_exam_question_get
      parameters:
      - name: topic
        in: query
        required: true
        schema:
          type: string
          description: Legal topic (e.g., Vertragsrecht, Haftpflicht)
          title: Topic
        description: Legal topic (e.g., Vertragsrecht, Haftpflicht)
      - name: exclude_ids
        in: query
        required: false
        schema:
          type: string
          description: Comma-separated decision IDs to exclude
          title: Exclude Ids
        description: Comma-separated decision IDs to exclude
      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