The Companies API icon

The Companies API

Access company data, enrichment, analytics and more using The Companies API

Overview

This node allows users to search for states (geographic subdivisions) using The Companies API. It is useful when you need to retrieve information about states based on a search query, with options to paginate and sort the results. Typical use cases include enriching location data in customer databases, filtering companies or contacts by state, or integrating geographic data into workflows.

For example, you might use this node to find all states matching a partial name or keyword, then use that data downstream to filter company records or generate reports segmented by state.

Properties

Name Meaning
Search A string query to search states by name or keyword.
Page The page number of results to retrieve (pagination). Defaults to 1.
Size Number of results per page. Defaults to 25.
Sort key The field to sort results by. Options: "Counts > companies" (sort by number of companies).
Sort order The order to sort results. Options: "Asc" (ascending), "Desc" (descending). Defaults to "Desc".

Output

The node outputs JSON data containing the search results from the API. The main output is an array of state objects with their details as returned by the API. Each item corresponds to one input item processed.

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 of The Companies API to perform requests.
  • No additional environment variables are needed beyond the API token.

Troubleshooting

  • Unknown operation error: If the operation parameter is incorrect or unsupported, the node will throw an error indicating "Unknown operation". Ensure the operation is set exactly to "searchStates".
  • SDK method not found: If the SDK does not have the expected method, it throws an error. This usually indicates a version mismatch or misconfiguration.
  • Empty or invalid parameters: Parameters like search, page, or size that are empty or zero may be replaced by default values internally. Make sure to provide valid inputs.
  • API authentication errors: If the API token is missing or invalid, the node will fail to authenticate. Verify the API token credential configuration.
  • Continue on Fail: If enabled, the node will return error messages in the output JSON instead of stopping execution on failure.

Links and References

Discussion