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 companies based on complex query conditions. It allows users to specify detailed filters and search criteria to segment companies according to various attributes such as industry, location, financials, technologies, and more.
Common scenarios where this node is beneficial include:
- Market research teams wanting to quantify companies matching specific profiles.
- Sales or marketing teams targeting companies with particular characteristics.
- Data analysts performing segmentation and counting of companies for reporting.
For example, you could count all companies in the "Technology" industry with more than 100 employees located in a specific country, or count companies with a certain revenue range and active technologies.
Properties
| Name | Meaning |
|---|---|
| Query | A collection of rules defining conditions for filtering companies. Each rule includes: - Attribute: Company data fields like business type, industries, name, total employees, year founded, domain, finances, locations, socials, technologies, etc. - Blocked operator: Boolean flag (purpose not described). - Operator: Logical operator to combine rules ("And", "Or"). - Sign: Comparison operator ("Equals", "Exact equals", "Greater", "Lower", "Not equals"). - Values: One or multiple values to compare against the attribute. |
| Search | A free-text search string to filter companies by keywords. |
| Search fields | Specific company fields to apply the free-text search on. Multiple fields can be specified. |
| Action ID | Numeric identifier for an action related to the query (context-specific, no further description provided). |
Output
The node outputs JSON data containing the count of companies matching the specified query and search criteria. The output structure is:
{
"json": {
// The response data from The Companies API count endpoint
"data": <number> // The count of companies matching the query
},
"pairedItem": {
"item": <index> // Index of the input item this output corresponds to
}
}
No binary data output is produced by this node.
Dependencies
- Requires an API token credential for authenticating with The Companies API.
- Uses the official SDK from
@thecompaniesapi/sdkto interact with the API. - The node expects the API token to be configured in n8n credentials under a generic API key/token credential.
Troubleshooting
- Unknown operation error: If the operation parameter is incorrect or unsupported, the node throws an error indicating the unknown operation. Ensure the operation is set to "countCompaniesPost" for this functionality.
- SDK method not found: If the SDK does not have the expected method, it indicates a mismatch between the node's operation and the SDK version. Update the SDK or verify the operation name.
- Invalid query format: The query property must follow the defined structure with valid attributes, operators, and values. Invalid or incomplete queries may cause API errors.
- Authentication errors: Missing or invalid API token will result in authentication failures. Verify that the API token credential is correctly set up.
- Empty or missing parameters: Some parameters default to predefined values if empty, but critical parameters should be provided to avoid unexpected results.
Links and References
- The Companies API Documentation — Official API docs for reference on query attributes and operations.
- n8n Credential Setup — Guide on configuring API credentials in n8n.
- @thecompaniesapi/sdk npm package — SDK used internally by the node.