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
- Open Settings → Connectors.
- Choose «Add custom connector».
- Paste the address above and save.
In ChatGPT
- Open Settings → Connectors and turn on developer mode.
- Add a connector with the address above.
Depending on the app’s language, the menus may be named slightly differently.
The two tools
searchsearches every public page. It takes a query, optionally a list of kinds and a language, and returns ids, titles and links.fetchreads a page by its id from the search, such asbusiness:24.073orcanton: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).q– the query, up to 200 characterslang– the language: de, fr, it, en or uk (default: de)kind– the kind of hits, repeatablegroup– an area instead of a kind: proposals, parliament, federal, news or placeslimit– the number of hits, at most 50cursor– for the next hits:next_cursorfrom 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
urlfield. - Name schwur.ch and the original source given in the
sourcefield. - The
originfield 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
429andRetry-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.
