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 NIP" operation fetches detailed company data using the NIP (Tax Identification Number). This is useful for verifying company details, performing compliance checks, or enriching datasets with official company records.

Common scenarios include:

  • Validating a company's tax ID before business transactions.
  • Automatically retrieving company metadata in accounting or CRM workflows.
  • Enriching lead or contact data with official company information.

Example: Given a valid NIP number, the node returns structured company details such as name, address, and registration data from the official GUS database.

Properties

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

Output

The node outputs JSON objects containing the company data retrieved from the GUS API corresponding to the provided NIP number. Each output item includes:

  • The main company information fields as returned by the API.
  • A _meta field with metadata about the operation, resource, and item index.
  • Optionally, if enabled, a _rawResponse field with the full raw API response.
  • If the "Include Raw Response" option is enabled, the raw response is also available as binary data attached under a property named gus_raw_response.

If the API requires captcha solving and it is not handled automatically, the output will contain an error message indicating that captcha input is needed.

If no data is found for the given NIP, the output contains a message indicating no data was found.

Dependencies

  • Requires an API key credential for authenticating with 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 is necessary.
  • Recommended to configure request timeout to at least 30 seconds due to possible slow responses.

Troubleshooting

  • Network Errors: Common errors like "socket hang up", "ECONNRESET", "ETIMEDOUT", or "connect ECONNREFUSED" indicate network issues or GUS API server overload. Retrying after some time usually resolves these.
  • Captcha Required: If the API returns a captcha challenge and auto-solving is disabled or misconfigured, the node outputs an error asking for manual captcha resolution or enabling auto-solve with a valid anti-captcha API key.
  • Invalid NIP or No Data: If the NIP number is invalid or no company matches it, the node returns a message stating no data found.
  • API Key Issues: Failure to initialize the GUS client often means incorrect or missing API credentials or wrong environment selection (sandbox vs production).
  • Timeouts: If requests time out, consider increasing the timeout setting (up to 120 seconds).

Links and References

Discussion