Command-line tool and TypeScript library
destatis
A TypeScript API client and CLI for the DESTATIS GENESIS-Online REST API (version 2020) — the German Federal Statistical Office’s official-statistics database at www-genesis.destatis.de.
Install
Needs Node.js 20 or newer. Installs the destatis command:
npm i -g @maschinenlesbar.org/destatis-genesis-cliAccess
Needs a free account with the data provider: set DESTATIS_API_TOKEN, or DESTATIS_USERNAME and DESTATIS_PASSWORD. No credentials are bundled; the README explains how to register.
Quick start
destatis hello # connectivity check (no auth)
destatis logincheck # validate your credentials
destatis find "Bevölkerung" --category tables # search for tables
destatis catalogue tables "124*" # browse tables by code
destatis metadata table 12411-0001 # describe a table
destatis data table 12411-0001 --start-year 2020 --compact
destatis data tablefile 12411-0001 --format ffcsv -o pop.zipCommands
-
helloConnectivity check (helloworld/whoami) — needs no credentials
-
logincheckValidate your credentials (helloworld/logincheck)
-
findFull-text search across statistics, tables, cubes, variables and time series
-
catalogueBrowse the catalogue: list objects by code selection (e.g. `124*`)
-
metadataDescribe an object's structure (metadata) by its code
-
dataRetrieve statistical data (tables, cubes, time series, results)
Claude Code skills
The destatis-genesis plugin teaches Claude to use destatis. Install it from the maschinenlesbar.org marketplace:
/plugin marketplace add maschinenlesbar-org/plugins
/plugin install destatis-genesis@maschinenlesbar/destatis-genesis:destatis-data-fetch/destatis-genesis:destatis-statistics-finder/destatis-genesis:destatis-table-download
TypeScript library
@maschinenlesbar.org/destatis-genesis-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.