OpenCaseLaw Citation Integrity API

The Citation Integrity API from OpenCaseLaw — 3 operation(s) for citation integrity.

GitHub OpenAPI

Operations 3

GET /cite Build a canonical Swiss citation #
POST /attest Audit a draft for fabricated / invalid citations #
POST /verify-claim Verify that a decision supports a claim (Sonnet-4.6 judge) #

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-integrity-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-integrity-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenCaseLaw Citation Integrity 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 Integrity
paths:
  /cite:
    get:
      tags:
      - Citation Integrity
      summary: Build a canonical Swiss citation
      description: 'Given any Swiss case reference (decision_id, BGE ref, docket number), returns the canonical citation string in DE / FR / IT, the canonical URL with #e-N-M pinpoint anchor, and a verbatim rule_statement. When the reference doesn''t resolve, returns exists=false + close_matches for typo-correction. Call this BEFORE writing any case citation.'
      operationId: api_cite_cite_get
      parameters:
      - name: reference
        in: query
        required: true
        schema:
          type: string
          description: 'Case reference: ''BGE 140 III 86'', ''4A_747/2012'', ''bger_4A_747_2012'', ''MKGE 16 Nr. 1''.'
          title: Reference
        description: 'Case reference: ''BGE 140 III 86'', ''4A_747/2012'', ''bger_4A_747_2012'', ''MKGE 16 Nr. 1''.'
      - name: pinpoint
        in: query
        required: false
        schema:
          type: string
          description: Optional Erwägung/consid. number, e.g. '2.3'.
          title: Pinpoint
        description: Optional Erwägung/consid. number, e.g. '2.3'.
      - name: language
        in: query
        required: false
        schema:
          type: string
          description: Primary language for the citation_string field (de/fr/it). All three variants always returned.
          default: de
          title: Language
        description: Primary language for the citation_string field (de/fr/it). All three variants always returned.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /attest:
    post:
      tags:
      - Citation Integrity
      summary: Audit a draft for fabricated / invalid citations
      description: Parses all Swiss-case citations (BGE/BGer/BVGer/BStGer/BPatGer/MKGE/ATF/TF/TAF/TPF/TFB/ATMC/STMC) in a draft response, verifies each decision exists in the corpus, and verifies any pinpoint (E./consid.) actually exists in that decision's structured Erwägungen. Returns {ok, citations_found, citations_ok, issues_count, annotated_text, issues}. CALL THIS before finalizing any LLM response containing ≥1 case citation.
      operationId: api_attest_attest_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/_AttestBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /verify-claim:
    post:
      tags:
      - Citation Integrity
      summary: Verify that a decision supports a claim (Sonnet-4.6 judge)
      description: 'Given a legal claim + a decision (+ optional Erwägung pinpoint), an independent Sonnet judge determines whether the decision''s verbatim text supports the claim. Returns {supports: yes|partial|no|contradicts|unrelated, confidence, supporting_excerpt, qualifying_excerpt, reasoning}. Use when paraphrasing a decision or drawing a proposition from a complex Erwägung — counters the mis-grounding / reasoning-error class measured at 17-33% on commercial legal-RAG tools by Magesh et al., ''Hallucination-Free?'', Stanford RegLab, 2024 (cited authority exists but doesn''t actually support the proposition).'
      operationId: api_verify_claim_verify_claim_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/_VerifyClaimBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    _VerifyClaimBody:
      properties:
        claim:
          type: string
          title: Claim
        decision_id:
          type: string
          title: Decision Id
        pinpoint:
          title: Pinpoint
          type:
          - string
          - 'null'
      type: object
      required:
      - claim
      - decision_id
      title: _VerifyClaimBody
    _AttestBody:
      properties:
        redacted_text:
          title: Redacted Text
          type:
          - string
          - 'null'
        draft_text:
          title: Draft Text
          type:
          - string
          - 'null'
        audit_grounding:
          type: boolean
          title: Audit Grounding
          default: false
        audit_quotes:
          type: boolean
          title: Audit Quotes
          default: false
        client_redactor_version:
          title: Client Redactor Version
          type:
          - string
          - 'null'
        client_redactor_summary:
          title: Client Redactor Summary
          additionalProperties: true
          type:
          - object
          - 'null'
      type: object
      title: _AttestBody
      description: 'Pro /attest body. The Word add-in (>=v3 redactor) sends

        ``redacted_text``. Older clients sent ``draft_text``; both are

        accepted for a transition window. The server-side redaction guard

        runs against whichever field was supplied, so a missed redaction

        is caught either way.'
    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