Actions5
- Company Actions
Overview
This node integrates with the GUS (Polish Statistics Office) API to retrieve company data from Poland’s official business registry. The Search operation under the Company resource allows users to find companies based on various address and name criteria such as company name, province, district, municipality, city, and street.
Typical use cases include:
- Finding companies located in a specific region or city.
- Filtering companies by partial or full company names.
- Enriching datasets with official company information for compliance, marketing, or research purposes.
For example, a user can search for all companies named "ABC" located in the Warsaw province or narrow down results to those on a particular street.
Properties
| Name | Meaning |
|---|---|
| Search Criteria | Filters to specify search parameters: |
| - Company Name | Company name to search for (string). |
| - Province | Province (voivodeship) name (string). |
| - District | District (powiat) name (string). |
| - Municipality | Municipality (gmina) name (string). |
| - City | City name (string). |
| - Street | Street name (string). |
| Additional Options | Extra settings affecting the request behavior: |
| - Auto Login | Boolean flag to automatically login to the API before requests (default: true). |
| - BIR Version | Selects the BIR API version to use: "1.0" or "1.1" (default: "1.1"). |
| - Auto Solve Captcha | Whether to automatically solve captchas using an anti-captcha service (default: false). |
| - Request Timeout (seconds) | Timeout for API requests in seconds; recommended 30+ seconds due to slow API (min 5, max 120). |
| - Include Raw Response | Whether to include the original raw response from the GUS API as binary data (default: false). |
Output
The node outputs JSON objects representing the company data returned by the GUS API matching the search criteria. Each output item corresponds to one company record.
If the Include Raw Response option is enabled, the node attaches the original raw API response as binary data to the output. This raw data can be XML or JSON depending on the API response format and operation.
In case of captcha challenges, the output will contain an error message indicating that captcha solving is required, along with captcha details.
If no data matches the search criteria, the node outputs a JSON object with a message stating "No data found".
Each output JSON also includes metadata about the operation, resource, and item index for traceability.
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
node-regonlibrary internally to interact with the GUS API. - Network connectivity to the GUS API endpoints is necessary.
- Recommended to configure a request timeout of at least 30 seconds due to potentially slow responses from the GUS API.
Troubleshooting
- Captcha Required Error: If the API returns a captcha challenge, the node outputs an error with captcha details. To resolve, either manually solve the captcha or enable the auto captcha solving option with a valid anti-captcha.com API key.
- 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. Increasing the request timeout or retrying later often helps.
- No Data Found: If the search criteria are too restrictive or incorrect, no results will be returned. Verify the input filters for accuracy.
- Invalid API Key or Environment: Initialization failures usually indicate invalid credentials or wrong environment selection (sandbox vs production). Double-check API keys and environment settings.
- Request Limits: The GUS API may impose rate limits or usage restrictions; excessive requests might lead to temporary blocks.
Links and References
- GUS (Polish Statistics Office) Official Website
- node-regon GitHub Repository
- anti-captcha.com Service (for automatic captcha solving)