OpenCaseLaw Exports API

The Exports API from OpenCaseLaw — 5 operation(s) for exports.

GitHub OpenAPI

Operations 5

GET /decisions/{decision_id}/export.docx Download a decision as Word (.docx) #
GET /decisions/{decision_id}/export.pdf Download a decision as PDF #
GET /decisions/{decision_id}/export.bib Download a decision as BibTeX #
GET /decisions/{decision_id}/export.ris Download a decision as RIS (Zotero/EndNote/Mendeley) #
GET /atom/{court}.xml Atom feed of newest decisions for a court #

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-exports-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-exports-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenCaseLaw Exports 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: Exports
paths:
  /decisions/{decision_id}/export.docx:
    get:
      tags:
      - Exports
      summary: Download a decision as Word (.docx)
      description: Returns a Word document containing the canonical citation, Regeste, and structured Erwägungen of the decision — ready to drop into a brief or memo. Falls back to plain-text (.txt) if python-docx is not installed on the server.
      operationId: api_export_docx_decisions__decision_id__export_docx_get
      parameters:
      - name: decision_id
        in: path
        required: true
        schema:
          type: string
          description: Canonical decision ID
          title: Decision Id
        description: Canonical decision ID
      responses:
        '200':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /decisions/{decision_id}/export.pdf:
    get:
      tags:
      - Exports
      summary: Download a decision as PDF
      description: 'Returns a PDF rendering of the decision in the canonical OpenCaseLaw style: Times New Roman 12 pt, 1.2 line spacing, monochrome, A4. Falls back to plain-text (.txt) if reportlab is not installed.'
      operationId: api_export_pdf_decisions__decision_id__export_pdf_get
      parameters:
      - name: decision_id
        in: path
        required: true
        schema:
          type: string
          description: Canonical decision ID
          title: Decision Id
        description: Canonical decision ID
      responses:
        '200':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /decisions/{decision_id}/export.bib:
    get:
      tags:
      - Exports
      summary: Download a decision as BibTeX
      description: Returns a BibTeX `@misc{...}` entry suitable for LaTeX bibliographies and reference managers.
      operationId: api_export_bibtex_decisions__decision_id__export_bib_get
      parameters:
      - name: decision_id
        in: path
        required: true
        schema:
          type: string
          description: Canonical decision ID
          title: Decision Id
        description: Canonical decision ID
      responses:
        '200':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /decisions/{decision_id}/export.ris:
    get:
      tags:
      - Exports
      summary: Download a decision as RIS (Zotero/EndNote/Mendeley)
      description: Returns an RIS bibliographic record (TY-CASE) consumable by Zotero, EndNote, Mendeley, and other common reference managers.
      operationId: api_export_ris_decisions__decision_id__export_ris_get
      parameters:
      - name: decision_id
        in: path
        required: true
        schema:
          type: string
          description: Canonical decision ID
          title: Decision Id
        description: Canonical decision ID
      responses:
        '200':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /atom/{court}.xml:
    get:
      tags:
      - Exports
      summary: Atom feed of newest decisions for a court
      description: Atom 1.0 feed of the 50 most recently published decisions from a given court, newest publication date first (decision date where the court publishes none). Subscribe in any feed reader (NetNewsWire, Inoreader, Feedbin, etc.) to get a daily digest of newly published decisions.
      operationId: api_atom_court_atom__court__xml_get
      parameters:
      - name: court
        in: path
        required: true
        schema:
          type: string
          description: Court code (e.g. bger, bvger, zh_obergericht)
          title: Court
        description: Court code (e.g. bger, bvger, zh_obergericht)
      responses:
        '200':
          description: Successful Response
        '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