Command-line tool and TypeScript library

regstat

A TypeScript API client and CLI for the Regionaldatenbank Deutschland GENESIS REST API (version 2020) at www.regionalstatistik.de — Germany’s regional official-statistics database, run by the statistical offices of the Bund and the Länder. It carries the official figures below the federal level: down to Regierungsbezirk, Kreis (district) and Gemeinde (municipality) — population, employment, elections, land use, and much more, keyed by the official AGS/ARS regional codes.

Version 0.0.5 npm GitHub API reference

Install

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

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

Access

Needs a free account with the data provider: set REGIONALSTATISTIK_API_TOKEN, or REGIONALSTATISTIK_USERNAME and REGIONALSTATISTIK_PASSWORD. No credentials are bundled; the README explains how to register.

Quick start

regstat hello                                        # connectivity check (no auth)
regstat logincheck                                   # validate your credentials
regstat find "bevölkerung kreise" --category tables  # search for tables
regstat catalogue tables "12411*"                    # browse tables by code
regstat metadata table 12411-01-01-4                 # describe a table
regstat data table 12411-01-01-4 --region-key 08221 --start-year 2020 --compact
regstat data tablefile 12411-01-01-4 --region-key "08*" --format ffcsv -o bevoelkerung-bw.zip

Commands

All commands, arguments and options →

Claude Code skills

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

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

TypeScript library

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