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.
Install
Needs Node.js 20 or newer. Installs the regstat command:
npm i -g @maschinenlesbar.org/regionalstatistik-cliAccess
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.zipCommands
-
helloConnectivity check (helloworld/whoami) — needs no credentials
-
logincheckValidate your credentials (helloworld/logincheck)
-
findFull-text search across statistics, tables, cubes, variables and time series (e.g. `regstat find "bevölkerung kreise" --category tables`)
-
catalogueBrowse the catalogue: list objects by code selection (e.g. `12411*`)
-
metadataDescribe an object's structure (metadata) by its code
-
dataRetrieve statistical data (tables, cubes, time series, results)
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/regionalstatistik:regionalstatistik-data-fetch/regionalstatistik:regionalstatistik-statistics-finder/regionalstatistik:regionalstatistik-table-download
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.