Actions41
- Companies Actions
- Search companies
- Search companies (POST)
- Enrich company
- Search companies by name
- Search companies by prompt
- Search similar companies
- Count companies
- Count companies (POST)
- Enrich company by email
- Enrich company by social
- Get email patterns
- Ask company
- Get company context
- Fetch companies analytics
- Export companies analytics
- Lists Actions
- Locations Actions
- Business data Actions
- Actions Actions
- Prompts Actions
- Utilities Actions
Overview
This node integrates with The Companies API to count the number of companies matching specified criteria. It is useful for scenarios where you want to quickly determine how many companies fit certain segmentation rules or search parameters without retrieving full company details.
Practical examples include:
- Counting companies in a specific industry or location.
- Determining the number of companies with a certain revenue range or employee size.
- Quickly assessing market segments based on custom query rules.
Properties
| Name | Meaning |
|---|---|
| Query | A set of conditions (rules) used to filter companies. Each rule specifies an attribute (e.g., business type, industry, domain), an operator (And/Or), a comparison sign (Equals, Greater, etc.), and one or more values to match. |
| Search | A free-text search string to find companies matching the text. |
| Search fields | Specific fields to apply the search string to. Multiple fields can be specified to narrow down the search scope. |
| Action ID | An optional numeric identifier related to a specific action context within the platform, used as part of the query parameters. |
Details on "Query" rules attributes include (not exhaustive):
- About > business type
- About > industries
- About > total employees
- Domain > domain
- Finances > revenue
- Locations > headquarters > country > code
- Socials > linkedin > ID
- Technologies > active
- And many others as listed in the property options.
Operators for combining rules: And, Or.
Comparison signs supported: Equals, Exact equals, Greater, Lower, Not equals.
Output
The node outputs JSON data containing the count of companies that match the provided query or search criteria. The output structure is:
{
"json": {
"data": <number>
}
}
Where <number> is the count of companies found.
No binary data output is produced by this operation.
Dependencies
- Requires an API token credential for authenticating with The Companies API.
- Uses the official SDK from The Companies API to perform requests.
- No additional environment variables are required beyond the API token.
Troubleshooting
- Unknown operation error: If the operation parameter is incorrect or unsupported, the node throws an error indicating "Unknown operation". Ensure the operation is set to "countCompanies".
- SDK method not found: If the underlying SDK does not have the expected method, an error will be thrown. This usually indicates a version mismatch or misconfiguration.
- Invalid query parameters: Providing malformed or incomplete query rules may cause the API to reject the request. Validate that all required fields in the query rules are properly set.
- Empty or missing credentials: The node requires a valid API token; missing or invalid tokens will cause authentication failures.
- Continue on Fail: If enabled, errors for individual items will be returned as JSON error objects instead of stopping execution.
Links and References
- The Companies API Documentation
- The Companies API SDK GitHub Repository
- n8n Documentation on Creating Custom Nodes