Command-line tool and TypeScript library

ka

German parliamentary Kleine Anfragen from 17 incompatible documentation systems, in one standardized, reproducible, machine-readable format — fetched from the parliament that published them, read deterministically, and stored as a record you can re-derive from the archived bytes.

Version 0.10.0 npm GitHub API reference

Install

Needs Node.js 22 or newer. Installs the ka command:

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

Access

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

Quick start

# Ingest a window of Berlin's Schriftliche Anfragen (question + answer + PDF text)
ka sync --source berlin --since 2024-01-01 --limit 50

# Search it
ka search "Brücken Zustand" --parliament berlin --year 2024
ka show berlin-19-18221

# Get the canonical record, or another rendering of it
ka get berlin-19-18221 --format json     # canonical JSON: the stored bytes
ka get berlin-19-18221 --format md       # readable
ka get berlin-19-18221 --format jsonld   # schema.org

# Prove it: re-run the extraction from the archived bytes and compare
ka verify berlin-19-18221

# See what the extractor refused to answer
ka review

# Bulk output
ka export --format csv --out corpus.csv
ka feed --party GRÜNE --out gruene.atom

Commands

All commands, arguments and options →

TypeScript library

@maschinenlesbar.org/openka-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.