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 allows you to search for companies using a powerful segmentation engine via The Companies API. It supports complex queries with multiple conditions, filtering, sorting, and pagination. This is useful when you want to find companies matching specific criteria such as industry, location, size, technologies used, or other attributes.
Practical examples include:
- Finding all companies in the software industry with more than 100 employees.
- Searching for companies headquartered in a specific country excluding certain domains.
- Retrieving companies sorted by their analytics score or revenue.
- Filtering companies based on social media presence or technologies they use.
The node sends a POST request to the API's company search endpoint with the specified query parameters and returns the matching companies.
Properties
| Name | Meaning |
|---|---|
| Query | A collection of rules defining conditions for filtering companies. Each rule includes an attribute (e.g., "About > business type", "Finances > revenue"), an operator ("And"/"Or"), a sign (e.g., "Equals", "Greater"), and values. |
| Search | A free-text search string to match against company data. |
| Search fields | Specific fields to apply the free-text search on. |
| Domains to exclude | List of company domains to exclude from the search results. |
| Linkedin to exclude | List of LinkedIn IDs to exclude from the search results. |
| Simplified | Boolean flag to return simplified company data instead of full details. |
| Page | Page number for paginated results (default is 1). |
| Size | Number of results per page (default is 25). |
| Sort key | Attribute to sort the results by (e.g., "meta.score", "about.name", "finances.revenue"). |
| Sort order | Order of sorting: ascending ("asc") or descending ("desc"). |
| Sort fields | Additional fields to sort by. |
| Action ID | Numeric identifier for tracking or associating the search action. |
Output
The node outputs an array of JSON objects representing companies that match the search criteria. Each item corresponds to one company and contains detailed information as returned by The Companies API.
If the simplified option is enabled, the output will contain a reduced set of company data for easier consumption.
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
@thecompaniesapi/sdk. - 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 "Unknown operation". Ensure the operation name is exactly "searchCompaniesPost".
- SDK method not found: If the SDK does not have the expected method, it throws an error. This may indicate version mismatch or misconfiguration.
- Invalid query structure: The query property must follow the expected format with valid attributes, operators, and values. Invalid or empty queries may cause the API to reject the request.
- Authentication errors: Missing or invalid API token will result in authentication failures. Verify the API token credential is correctly set up.
- Empty results: If no companies match the criteria, the output will be an empty array. Adjust filters or increase page size if needed.