GUS icon

GUS

Consume GUS (Polish Statistics Office) API

Overview

This node integrates with the Polish GUS (Statistics Office) API to retrieve company information based on various identifiers. Specifically, the "Get by KRS" operation allows users to fetch detailed company data using a KRS number, which is a unique identifier assigned to companies registered in Poland's National Court Register.

Common scenarios for this node include:

  • Verifying company details during onboarding or compliance checks.
  • Enriching customer databases with official company data.
  • Automating business intelligence workflows that require up-to-date company registration info.

For example, a user can input a KRS number and receive structured company data such as name, address, and registration status directly from the official government source.

Properties

Name Meaning
KRS Number The KRS number to search for (required). Example: "0000123456".
Additional Options A collection of optional settings:
- Auto Login Whether to automatically login to the API (boolean, default: true).
- BIR Version BIR API version to use; options are "1.0" or "1.1" (default: "1.1").
- Auto Solve Captcha Whether to automatically solve captchas using an anti-captcha service (boolean, default: false).
- Request Timeout (seconds) Timeout for API requests in seconds; recommended 30+ seconds due to possible slowness (min 5, max 120).
- Include Raw Response Whether to include the original raw response from the GUS API as binary data (boolean, default: false).

Output

The node outputs JSON objects containing the company data retrieved from the GUS API based on the provided KRS number. The structure typically includes fields returned by the API such as company name, registration details, and other metadata.

If the "Include Raw Response" option is enabled, the node also attaches the original raw API response as binary data. This raw data can be XML or JSON depending on the API response format and is useful for advanced processing or archival purposes.

In case a captcha challenge is required by the API and automatic solving is not enabled, the output will contain an error message indicating the need to solve the captcha manually.

If no data is found for the given KRS number, the node outputs a message indicating "No data found".

Dependencies

  • Requires an API key credential for authenticating with the GUS API.
  • Optionally requires an anti-captcha.com API key if automatic captcha solving is enabled.
  • Uses the node-regon library internally to communicate with the GUS API.
  • Network connectivity to the GUS API endpoints must be available.
  • Recommended to configure request timeout to at least 30 seconds due to potential slowness of the GUS API.

Troubleshooting

  • Captcha Required: If the API returns a captcha challenge and auto-solving is disabled or no anti-captcha API key is provided, the node will output an error asking the user to solve the captcha manually or enable auto-solving.
  • Timeouts and Connection Errors: Common network errors like socket hang-ups, connection resets, or timeouts may occur due to the GUS API server load or network issues. The node retries up to three times with exponential backoff before failing.
  • Invalid KRS Number: If the KRS number does not correspond to any company, the node outputs a "No data found" message.
  • API Key or Environment Misconfiguration: Failure to initialize the client usually indicates incorrect API credentials or environment settings. Verify the API key and whether sandbox or production mode is selected.
  • Request Timeout Too Low: Setting the timeout below 5 seconds may cause premature failures; it is recommended to keep it at 30 seconds or higher.

Links and References

Discussion