npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-destatis

v1.0.3

Published

n8n node for accessing the GENESIS API of the German Federal Statistical Office (Destatis)

Readme

n8n-nodes-destatis

This is an n8n community node that lets you access the GENESIS API of the German Federal Statistical Office (Destatis) and regional statistical offices in your n8n workflows.

GENESIS-Online is the database of the Federal Statistical Office of Germany, providing access to a wide range of statistical data about Germany.

Regionalstatistik provides access to regional statistical data from all German statistical offices at federal and state level.

Important: This node is a community node and NOT an official Destatis node. It is provided as-is and is not supported by Destatis or the regional statistical offices. Read Destatis API Guide and License for more information.

n8n is a fair-code licensed workflow automation platform.

Features

This node provides access to the following resources:

Authentication

  • Login Check: Test your API credentials

Catalogue

  • List Cubes: Browse available data cubes
  • List Tables: Browse available tables
  • List Statistics: Browse available statistics
  • Search: Full-text search across the catalogue

Data

  • Get Table: Download table data in various formats (Excel, CSV, Flatfile CSV)
  • Get Cube: Download data cubes
  • Get Time Series: Download time series data

Metadata

  • Get Cube Metadata: Retrieve metadata for data cubes
  • Get Table Metadata: Retrieve metadata for tables
  • Get Statistic Metadata: Retrieve metadata for statistics

Transform

  • Pivot Table: Transform input data into pivot table format with grouping and aggregation

Installation

Follow the installation guide in the n8n community nodes documentation.

Manual Installation

  1. Navigate to your n8n installation directory
  2. Install the package:
    npm install n8n-nodes-destatis
  3. Restart n8n

Configuration

Getting API Credentials

For Destatis (Federal Statistics)

  1. Register for free at GENESIS-Online
  2. After login, navigate to "Webservice-Schnittstelle (API)"
  3. Copy your API Token (recommended) or use your username/password

For Regionalstatistik (Regional Statistics)

  1. Register for free at Regionalstatistik
  2. After login, navigate to "Webservice-Schnittstelle (API)" or "Mein Account"
  3. Copy your API Token (recommended) or use your username/password

Note: Regionalstatistik credentials are separate from Destatis credentials. You need to register separately for each service.

Setting up Credentials in n8n

Destatis API Credentials

  1. In n8n, go to CredentialsNew
  2. Search for Destatis API
  3. Choose authentication method:
    • API Token (recommended): Paste your API token
    • Username & Password: Enter your credentials
  4. The Base URL is pre-configured to https://www-genesis.destatis.de/genesisWS/rest/2020
  5. Test the credentials
  6. Save

Regionalstatistik API Credentials

  1. In n8n, go to CredentialsNew
  2. Search for Regionalstatistik API
  3. Choose authentication method:
    • API Token (recommended): Paste your API token
    • Username & Password: Enter your credentials
  4. The Base URL is pre-configured to https://www.regionalstatistik.de/genesisws/rest/2020
  5. Test the credentials
  6. Save

Usage

Example 1: Get Consumer Price Index Data

  1. Add a Destatis node to your workflow
  2. Select credentials
  3. Set:
    • Resource: Data
    • Operation: Get Table
    • Code: 61111-0004 (Monthly Consumer Price Index)
    • Language: English or German
  4. Configure additional options:
    • Start Year: 2020
    • Format: Excel or Flatfile CSV
    • Transpose: true/false

Example 2: Search for Statistics

  1. Add a Destatis node
  2. Set:
    • Resource: Catalogue
    • Operation: Search
    • Search Term: "Bevölkerung" (Population)
    • Page Length: 50

Example 3: Browse Price Statistics

  1. Add a Destatis node
  2. Set:
    • Resource: Catalogue
    • Operation: List Cubes
    • Selection Pattern: 61* (all price statistics)
    • Page Length: 100

Example 4: Transform Data with Pivot Table

The Transform resource allows you to pivot and aggregate data from any previous node.

  1. Add a Destatis node to get data (e.g., Get Table)
  2. Add another Destatis node connected to the first
  3. Set:
    • Resource: Transform
    • Operation: Pivot Table
    • Row Dimensions: time (column names, NOT expressions)
    • Column Dimensions: statistics_label (or leave empty for simple grouping)
    • Value Column: value
    • Aggregation Function: Sum, Count, Average, or Median
    • Filters (optional): 2_variable_label = "Milchkühe"

Important Notes:

  • Row Dimensions and Column Dimensions must be column names, not n8n expressions
    • ✅ Correct: time
    • ❌ Wrong: {{ $json.time }} (this evaluates to the value, not the column name)
  • Use comma-separated values for multiple dimensions: time,1_variable_label,2_variable_label
  • Column Dimensions is optional - leave empty to perform simple grouping without pivoting
  • Filters support expressions in the value part: {{ $json['selected_column'] }} = "value"
  • All input items are processed together to create the pivot table

How it works:

  • Groups data by unique combinations of Row Dimensions
  • Creates new columns from Column Dimension values
  • Aggregates values according to the selected function
  • Returns one row per unique Row Dimension combination

Example Output:

{
  "time": "2025-11P1M",
  "1_variable_label": "Deutschland insgesamt",
  "Viehbestandserhebung Rinder": 374277,
  "Andere Statistik": 123456
}

Data Formats

The node supports multiple output formats:

  • ffcsv (Flatfile CSV): Best for data processing (recommended)
  • xlsx (Excel): Best for manual review
  • csv (Standard CSV): Compatible with most tools
  • html (HTML): For display purposes

Advanced Features

Filtering Data

You can filter table and cube data using:

  • Start/End Year: Limit the time range
  • Classifying Variables: Filter by classification dimensions
  • Regional Variables: Filter by geographic regions

Working with Large Tables

For tables with more than 40,000 values:

  • Split requests by year range
  • Use the Flatfile CSV format for efficient processing
  • Consider using the job queue (requires username/password authentication)

Handling Compressed Data

The Destatis API sometimes returns data as a ZIP archive, even if compression is disabled. If you receive a binary ZIP file:

  1. Add the Compression node after the Destatis node.
  2. Set the operation to Decompress.
  3. Use the Read Binary File node (or similar) to access the extracted CSV.

API Documentation

For detailed API documentation, visit:

Compatibility

  • Tested with n8n version 1.0.0+
  • Uses GENESIS API version 2020

Resources

License

MIT

Support

For issues and questions:

Version History

1.0.3

  • Added support for Regionalstatistik API
  • New credential type: Regionalstatistik API
  • Access to regional statistical data from all German federal states
  • Same functionality as Destatis API (authentication, catalogue, data, metadata)

1.1.0

  • Added Transform resource with Pivot Table operation
  • Pivot functionality supports:
    • Row and column dimensions with flexible grouping
    • Multiple aggregation functions (Sum, Count, Average, Median)
    • Optional filtering with expression support
    • Works with any input data, not just Destatis data

1.0.0

  • Initial release
  • Support for authentication, catalogue browsing, data download, and metadata retrieval
  • Multiple output formats (Excel, CSV, Flatfile CSV)
  • German and English language support