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.

Version 0.0.6 npm GitHub API reference

Install

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

npm i -g @maschinenlesbar.org/destatis-genesis-cli

Access

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.zip

Commands

All commands, arguments and options →

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

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.