The content is machine-translated from German and has not been reviewed; the German original is authoritative. Quotations from sources appear in their original language.

Home / Data & interfaces

Data & interfaces

Everything on schwur.ch can be used by machines too – for research, analyses and tools of your own. Behind it is the same index the search uses.

Connect to Claude or ChatGPT (MCP)

Through the Model Context Protocol (MCP), an AI assistant can search schwur.ch itself and read the pages it finds. The server’s address:

https://schwur.ch/mcp

Streamable HTTP · no sign-in · read-only

In Claude

  1. Open Settings → Connectors.
  2. Choose «Add custom connector».
  3. Paste the address above and save.

In ChatGPT

  1. Open Settings → Connectors and turn on developer mode.
  2. Add a connector with the address above.

The two tools

  • search searches every public page. It takes a query, optionally a list of kinds and a language, and returns ids, titles and links.
  • fetch reads a page by its id from the search, such as business:24.073 or canton:ge, and returns the page’s text, its source and the link.

Ask, for example: How did the National Council vote on financing the 13th AHV pension?

Search API

An open JSON interface, with no sign-in and no key.

GET /api/v1/search
The search. Each hit has a title, snippet, date, the link to its page (url), the origin of its language (origin) and its source (source).
  • qthe query, up to 200 characters
  • langthe language: de, fr, it, en or uk (default: de)
  • kindthe kind of hits, repeatable
  • groupan area instead of a kind: proposals, parliament, federal, news or places
  • limitthe number of hits, at most 50
  • cursorfor the next hits: next_cursor from the previous answer
/api/v1/search/suggest
up to 8 titles as suggestions, from 2 characters on
/api/v1/search/kinds
every kind of hit, with its name and a description
/api/v1/openapi.json
the full description of the interface (OpenAPI)

Example: the first hit for «AHV», in French

curl 'https://schwur.ch/api/v1/search?q=AHV&lang=fr&limit=1'

For language models

/llms.txt sums up for language models what schwur.ch is, how to search it and how to cite it – in English, following the llms.txt convention.

Terms of reuse

Reuse is free, provided schwur.ch and the original source are named.

  • Link every statement to the page it comes from – a hit’s url field.
  • Name schwur.ch and the original source given in the source field.
  • The origin field says whether a text is the original, an official translation, a translation made for schwur.ch, or German standing in for a missing translation. Say so when you quote a translation.
  • Opinion summaries of the podcast «Bern einfach» come with title and link only: the Nebelspalter agreed to their being shown on schwur.ch – not to their being passed on.

Otherwise, the Terms of use apply.

Limits

  • At most 60 searches a minute per client; beyond that, the interface answers with 429 and Retry-After.
  • Please cache answers. The index is rebuilt every two hours; each answer says when (index_built_at).
  • Not available: declared interests and access badges (visible to signed-in accounts only), discussion posts, drafts and withheld items.
  • Searches are not stored.