OpenCaseLaw Citation Graph API

The Citation Graph API from OpenCaseLaw — 3 operation(s) for citation graph.

GitHub OpenAPI

Operations 3

GET /citations/{decision_id} Find citations for a decision #
GET /appeal-chain/{decision_id} Trace appeal chain #
GET /leading-cases Find leading cases #

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-citation-graph-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-citation-graph-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenCaseLaw Citation Graph 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: Citation Graph
paths:
  /citations/{decision_id}:
    get:
      tags:
      - Citation Graph
      summary: Find citations for a decision
      description: Show what a decision cites and what cites it. Uses the reference graph with 9.65M citation edges.
      operationId: api_find_citations_citations__decision_id__get
      parameters:
      - name: decision_id
        in: path
        required: true
        schema:
          type: string
          description: Decision ID (e.g., bger_6B_1_2025)
          title: Decision Id
        description: Decision ID (e.g., bger_6B_1_2025)
      - name: direction
        in: query
        required: false
        schema:
          type: string
          description: 'Citation direction: both, outgoing, or incoming'
          default: both
          title: Direction
        description: 'Citation direction: both, outgoing, or incoming'
      - name: min_confidence
        in: query
        required: false
        schema:
          type: number
          maximum: 1
          minimum: 0
          description: Minimum confidence score (0-1)
          default: 0.3
          title: Min Confidence
        description: Minimum confidence score (0-1)
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 200
          minimum: 1
          description: Max citations per direction per page
          default: 50
          title: Limit
        description: Max citations per direction per page
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          description: Pagination offset per direction (see *_has_more / next_offset)
          default: 0
          title: Offset
        description: Pagination offset per direction (see *_has_more / next_offset)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /appeal-chain/{decision_id}:
    get:
      tags:
      - Citation Graph
      summary: Trace appeal chain
      description: Trace the appeal chain (Instanzenzug) for a decision. Shows prior and subsequent instances.
      operationId: api_find_appeal_chain_appeal_chain__decision_id__get
      parameters:
      - name: decision_id
        in: path
        required: true
        schema:
          type: string
          description: Decision ID (e.g., bger_6B_1_2025)
          title: Decision Id
        description: Decision ID (e.g., bger_6B_1_2025)
      - name: min_confidence
        in: query
        required: false
        schema:
          type: number
          maximum: 1
          minimum: 0
          description: Minimum confidence score (0-1)
          default: 0.3
          title: Min Confidence
        description: Minimum confidence score (0-1)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /leading-cases:
    get:
      tags:
      - Citation Graph
      summary: Find leading cases
      description: Find the most-cited decisions for a topic or statute. Authority ranking based on citation graph. Each result carries citation_string_{de,fr,it} + canonical_url + rule_statement for copy-ready use.
      operationId: api_find_leading_cases_leading_cases_get
      parameters:
      - name: query
        in: query
        required: false
        schema:
          type: string
          description: Text query to filter by topic (max 4,000 chars)
          title: Query
        description: Text query to filter by topic (max 4,000 chars)
      - name: law_code
        in: query
        required: false
        schema:
          type: string
          description: Law code (e.g., BV, OR, ZGB, StGB)
          title: Law Code
        description: Law code (e.g., BV, OR, ZGB, StGB)
      - name: article
        in: query
        required: false
        schema:
          type: string
          description: Article number (requires law_code)
          title: Article
        description: Article number (requires law_code)
      - name: court
        in: query
        required: false
        schema:
          type: string
          description: Court filter (e.g., bger, bge, bvger)
          title: Court
        description: Court filter (e.g., bger, bge, bvger)
      - name: date_from
        in: query
        required: false
        schema:
          type: string
          description: Start date (YYYY-MM-DD)
          title: Date From
        description: Start date (YYYY-MM-DD)
      - name: date_to
        in: query
        required: false
        schema:
          type: string
          description: End date (YYYY-MM-DD)
          title: Date To
        description: End date (YYYY-MM-DD)
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: Max results
          default: 20
          title: Limit
        description: Max results
      - name: include_pinpoint
        in: query
        required: false
        schema:
          type: boolean
          description: Attach a pinpoint Erwägung citation to the top 3 results when a free-text query is given. Set false to skip the lookup.
          default: true
          title: Include Pinpoint
        description: Attach a pinpoint Erwägung citation to the top 3 results when a free-text query is given. Set false to skip the lookup.
      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