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-materialien-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: 3.2.0
info:
title: OpenCaseLaw Materialien 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: Materialien
paths:
/materialien/{law_code}:
get:
tags:
- Materialien
summary: Get preparatory materials for a law article
description: 'Returns the Federal Council Botschaft data: legislative intent, key arguments, design choices, rejected alternatives, and parliamentary modifications.'
operationId: api_get_materialien_materialien__law_code__get
parameters:
- name: law_code
in: path
required: true
schema:
type: string
description: Law abbreviation (e.g., BGFA, BV)
title: Law Code
description: Law abbreviation (e.g., BGFA, BV)
- name: article
in: query
required: false
schema:
type: string
description: Article number (e.g., '1', '8')
title: Article
description: Article number (e.g., '1', '8')
- name: doc_type
in: query
required: false
schema:
type: string
pattern: ^(botschaft|bericht_bundesrat|stellungnahme_bundesrat|bericht_kommission|erlassentwurf|vorentwurf_erlass|vernehmlassung_eroeffnung)$
description: 'Optional Fedlex document type for `botschaft_documents` (botschaft, bericht_bundesrat, stellungnahme_bundesrat, bericht_kommission, erlassentwurf, vorentwurf_erlass, vernehmlassung_eroeffnung). Default: all types.'
title: Doc Type
description: 'Optional Fedlex document type for `botschaft_documents` (botschaft, bericht_bundesrat, stellungnahme_bundesrat, bericht_kommission, erlassentwurf, vorentwurf_erlass, vernehmlassung_eroeffnung). Default: all types.'
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/materialien:
get:
tags:
- Materialien
summary: Search preparatory materials
description: Full-text search across all Botschaft data.
operationId: api_search_materialien_materialien_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: law_code
in: query
required: false
schema:
type: string
description: Filter by law code
title: Law Code
description: Filter by law code
- name: limit
in: query
required: false
schema:
type: integer
maximum: 50
minimum: 1
description: Max results
default: 10
title: Limit
description: Max results
- name: doc_type
in: query
required: false
schema:
type: string
pattern: ^(botschaft|bericht_bundesrat|stellungnahme_bundesrat|bericht_kommission|erlassentwurf|vorentwurf_erlass|vernehmlassung_eroeffnung)$
description: Accepted for symmetry with /api/search-botschaft; a no-op on this curated digest (echoed back as doc_type_filter).
title: Doc Type
description: Accepted for symmetry with /api/search-botschaft; a no-op on this curated digest (echoed back as doc_type_filter).
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/article-purpose/{sr_number}/{article}:
get:
tags:
- Materialien
summary: Get verbatim Botschaft text explaining an article's purpose
description: Joins the verbatim Federal Council Botschaft corpus (post-2003 BBl, Akoma Ntoso XML preferred) with the article-Botschaft link table. Returns one entry per Botschaft (originating + amendments) with verbatim paragraphs the LLM can quote with `bbl_citation, S. {printed_page}` references (printed_page null = no pinpoint). Draft statute text comes apart in `draft_texts`. Coverage rolls out as the Phase 2 ingestion processes ~1500 BBl publications from amendment_refs.
operationId: api_get_article_purpose_article_purpose__sr_number___article__get
parameters:
- name: sr_number
in: path
required: true
schema:
type: string
description: SR number of the law (e.g. '220' for OR)
title: Sr Number
description: SR number of the law (e.g. '220' for OR)
- name: article
in: path
required: true
schema:
type: string
description: Article number (e.g. '41', '41a')
title: Article
description: Article number (e.g. '41', '41a')
- name: language
in: query
required: false
schema:
type: string
pattern: ^(de|fr|it)$
description: Botschaft language
default: de
title: Language
description: Botschaft language
- name: max_paragraphs
in: query
required: false
schema:
type: integer
maximum: 20
minimum: 1
default: 8
title: Max Paragraphs
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/search-botschaft:
get:
tags:
- Materialien
summary: Topical FTS5 search over the verbatim Botschaft corpus
description: 'Where /article-purpose answers ''why does Art. X exist?'', /search-botschaft answers ''show me every Botschaft passage about TOPIC X''. Returns BM25-ranked paragraphs with bbl_citation, page, section path, and an article anchor where the parser could identify one. FTS5 syntax supported: quoted phrases, AND/OR/NOT operators, prefix queries.'
operationId: api_search_botschaft_search_botschaft_get
parameters:
- name: query
in: query
required: false
schema:
type: string
description: Search terms (FTS5 syntax)
title: Query
description: Search terms (FTS5 syntax)
- name: q
in: query
required: false
schema:
type: string
description: Alias for `query`.
title: Q
description: Alias for `query`.
- name: language
in: query
required: false
schema:
type: string
pattern: ^(de|fr|it)$
description: Optional language filter — leave unset to search all three official languages of the verbatim Botschaft corpus.
title: Language
description: Optional language filter — leave unset to search all three official languages of the verbatim Botschaft corpus.
- name: year_min
in: query
required: false
schema:
type: integer
description: Earliest source-Botschaft publication year (inclusive)
title: Year Min
description: Earliest source-Botschaft publication year (inclusive)
- name: year_max
in: query
required: false
schema:
type: integer
description: Latest source-Botschaft publication year (inclusive)
title: Year Max
description: Latest source-Botschaft publication year (inclusive)
- name: doc_type
in: query
required: false
schema:
type: string
pattern: ^(botschaft|bericht_bundesrat|stellungnahme_bundesrat|bericht_kommission|erlassentwurf|vorentwurf_erlass|vernehmlassung_eroeffnung|erlaeuternder_bericht|vernehmlassungsvorlage|ergebnisbericht|stellungnahmen|synoptische_tabelle|vernehmlassung_diverses)$
description: 'Optional Fedlex document type: botschaft, bericht_bundesrat, stellungnahme_bundesrat, bericht_kommission, erlassentwurf, vorentwurf_erlass, vernehmlassung_eroeffnung, or a Vernehmlassung document: erlaeuternder_bericht, vernehmlassungsvorlage, ergebnisbericht, stellungnahmen, synoptische_tabelle, vernehmlassung_diverses. Leave unset for all; every hit carries doc_type + doc_type_label (Fedlex''s DE/FR/IT name).'
title: Doc Type
description: 'Optional Fedlex document type: botschaft, bericht_bundesrat, stellungnahme_bundesrat, bericht_kommission, erlassentwurf, vorentwurf_erlass, vernehmlassung_eroeffnung, or a Vernehmlassung document: erlaeuternder_bericht, vernehmlassungsvorlage, ergebnisbericht, stellungnahmen, synoptische_tabelle, vernehmlassung_diverses. Leave unset for all; every hit carries doc_type + doc_type_label (Fedlex''s DE/FR/IT name).'
- name: limit
in: query
required: false
schema:
type: integer
maximum: 50
minimum: 1
default: 20
title: Limit
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/article-history/{sr_number}/{article}:
get:
tags:
- Materialien
summary: Chronological story of a statute article
description: Combines current article text + every linked Botschaft (enacted + amendments) + leading court interpretations + doctrinal commentary into a single dated timeline. One call returns the full legislative + judicial + doctrinal arc of an article. Each timeline entry has a `kind` field (botschaft | court_decision | commentary) and a stable URI.
operationId: api_get_article_history_article_history__sr_number___article__get
parameters:
- name: sr_number
in: path
required: true
schema:
type: string
description: SR number of the federal law
title: Sr Number
description: SR number of the federal law
- name: article
in: path
required: true
schema:
type: string
description: Article number
title: Article
description: Article number
- name: language
in: query
required: false
schema:
type: string
pattern: ^(de|fr|it)$
default: de
title: Language
- name: leading_cases_limit
in: query
required: false
schema:
type: integer
maximum: 15
minimum: 1
default: 5
title: Leading Cases Limit
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