Command-line tool and TypeScript library

bundeswahl

Query the official German federal election results from your terminal. bundeswahl is a command-line tool over the Bundeswahlleiterin open data for the Bundestagswahl 2025: first- and second-vote results by Bund, Land and Wahlkreis, the parties, the 299 constituencies, and per-constituency structural data — as clean JSON you can pipe straight into jq.

Version 0.0.6 npm GitHub API reference

Install

Needs Node.js 20 or newer. Installs the bundeswahl command:

npm i -g @maschinenlesbar.org/bundeswahlleiterin-cli

Access

No account, no API key, no configuration — install and query.

Quick start

# National second-vote (Zweitstimme) result for one party
bundeswahl results --area-type Bund --vote 2 --party SPD

# Who won the direct mandate (Erststimme) in Kiel, and by how much?
bundeswahl results --area-type Wahlkreis --area Kiel --vote 1 --group-type Partei \
  | jq -r 'map(select(.anzahl != null)) | sort_by(-.anzahl)[] | "\(.gruppenname)\t\(.anzahl)\t\(.prozent)%"'

# The 299 constituencies in Bavaria
bundeswahl wahlkreise --land Bayern | jq -r '.[].name'

# Structural data for one Wahlkreis
bundeswahl structure --wahlkreis Kiel

Commands

All commands, arguments and options →

Claude Code skills

The bundeswahl plugin teaches Claude to use bundeswahl. Install it from the maschinenlesbar.org marketplace:

/plugin marketplace add maschinenlesbar-org/plugins
/plugin install bundeswahl@maschinenlesbar

TypeScript library

@maschinenlesbar.org/bundeswahlleiterin-cli is also a typed API client you can import in your own code, with no runtime HTTP dependencies.

The tool, not the data

The data comes from the provider behind the API, under its own terms — see DATA_LICENSE.md. The code is dual-licensed AGPL-3.0-or-later or commercial — see LICENSING.md.