Command-line tool and TypeScript library
mastr
A dependency-light TypeScript client + CLI for the Marktstammdatenregister (MaStR) — the Bundesnetzagentur’s register of the German electricity & gas market: ~9 million generation and consumption units (solar, wind, storage, CHP, …). Wraps the public “erweiterte öffentliche Einheitensuche”. A bund.dev API.
Install
Needs Node.js 20 or newer. Installs the mastr command:
npm i -g @maschinenlesbar.org/marktstammdatenregister-cliAccess
No account, no API key, no configuration — install and query.
Quick start
mastr stromerzeugung --total # how many electricity-generation units? → 9063887
mastr stromerzeugung --filter "Energieträger~eq~'2495'" --total # …how many are solar? → 6267133
mastr stromerzeugung --sort "Bruttoleistung-desc" --page-size 20 --iso-dates
mastr gaserzeugung --page 1 --page-size 50
mastr filters stromerzeugung # the filterable columns + dropdown codesCommands
-
stromerzeugungElectricity-generation units (Stromerzeugung)
-
stromverbrauchElectricity-consumption units (Stromverbrauch)
-
gaserzeugungGas-generation units (Gaserzeugung)
-
gasverbrauchGas-consumption units (Gasverbrauch)
-
filtersList the filterable columns (names, types, dropdown codes) for a category
Claude Code skills
The mastr plugin teaches Claude to use mastr. Install it from the maschinenlesbar.org marketplace:
/plugin marketplace add maschinenlesbar-org/plugins
/plugin install mastr@maschinenlesbar/mastr:mastr-filters/mastr:mastr-search/mastr:mastr-unit
What the skills answer, with real examples → Skill descriptions and requirements →
TypeScript library
@maschinenlesbar.org/marktstammdatenregister-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.