GUS icon

GUS

Consume GUS (Polish Statistics Office) API

Overview

This node integrates with the Polish Statistics Office (GUS) API to retrieve detailed company information and reports based on various identifiers such as REGON, NIP, or KRS numbers. Specifically, the Get Full Report operation fetches a comprehensive report for a company identified by its REGON number. It supports multiple report types, including legal person, physical person, local unit, and public reports.

Common scenarios where this node is beneficial include:

  • Verifying detailed company data for compliance or due diligence.
  • Automating retrieval of official business reports in workflows.
  • Integrating GUS data into CRM or ERP systems for enriched company profiles.

Practical example:

  • A user inputs a company's REGON number and selects the "BIR11OsPrawna" report type. The node automatically detects if the entity is a legal or physical person and retrieves the full detailed report accordingly, optionally including the raw XML response as binary data for archival or further processing.

Properties

Name Meaning
REGON Number The REGON number of the company for which to retrieve the full report. This is a required identifier.
Report Type The type of report to retrieve. Options include:
• BIR11OsPrawna (Legal Person) - Auto-detects entity type and tries alternatives if needed
• BIR11OsFizyczna (Physical Person)
• BIR11JednLokal (Local Unit)
• PublDaneRaportPrawna (Public Legal Report)
• PublDaneRaportFizyczna (Public Physical Report)
Silos ID Optional Silos ID parameter for the report, used to specify a particular data silo if applicable.
Additional Options Collection of optional settings:
• Auto Login: Automatically login to the API (default: true)
• BIR Version: API version to use ("1.0" or "1.1", default "1.1")
• Auto Solve Captcha: Use anti-captcha.com service to solve captchas automatically
• Request Timeout (seconds): Timeout for API requests, recommended 30+ seconds (min 5, max 120)
• Include Raw Response: Include original raw response from GUS API as binary data

Output

The node outputs JSON objects containing the detailed company report data retrieved from the GUS API. For the Get Full Report operation, the output includes:

  • The full structured report data fields as returned by the API.
  • Metadata fields such as:
    • _usedReportType: The actual report type that was successfully used (may differ from requested if auto-detection occurred).
    • _requestedReportType: The originally requested report type.
    • _regonForReport: The REGON number queried.
    • _meta: Contains operation, resource, and item index information.
  • If enabled, the original raw response from the GUS API is included as binary data under the property gus_full_report. This binary data typically contains the raw XML report or JSON error details, useful for archival or debugging.

If the API requires captcha solving and it is not enabled or solved, the node outputs an error JSON indicating captcha is required.

In case no data is found, the node outputs a message indicating no data was found for the given parameters.

Dependencies

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

Troubleshooting

  • Captcha Required Error: If the API returns a captcha challenge and automatic solving is not enabled, the node will output an error asking to solve the captcha manually or enable auto-solving with an anti-captcha.com API key.
  • Timeouts and Connection Errors: Common network errors like socket hang up, connection reset, or timeouts may occur due to GUS API server load or network issues. The node retries up to 3 times with exponential backoff. Increasing the timeout setting can help mitigate these issues.
  • No Data Found: If the REGON number is invalid or no report exists for the selected report type, the node will throw an error or return a message indicating no data was found.
  • Invalid API Key or Environment: Initialization failures often indicate incorrect API credentials or wrong environment selection (sandbox vs production). Verify credentials and environment configuration.
  • Report Type Auto-detection: When using the auto-detect report type, the node attempts multiple report types until one succeeds. If all fail, an error listing all tried types and last error is thrown.

Links and References

Discussion