> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CrustData V2: Companydb Search

> Search millions of companies in the Crustdata database with advanced filters. Includes SDK V2 examples, input constraints, response fields, and Deepline cost.

Search millions of companies in the Crustdata database with advanced filters.

> [!NOTE]
>
> Tool ID: `crustdata_v2_companydb_search`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'crustdata_v2_companydb_search',
  {
    "filters": {
      "filter_type": "example",
      "type": "=",
      "value": "example"
    }
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute crustdata_v2_companydb_search --input '{
  "filters": {
    "filter_type": "example",
    "type": "=",
    "value": "example"
  }
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "companies": [
      {
        "company_id": "company_123",
        "company_name": "Example Corp",
        "year_founded": 123
      }
    ]
  }
}
```

Use `deepline describe crustdata_v2_companydb_search --json` for the latest machine-readable contract.

## Input reference

In-database search API for company data, enabling you to search across millions of companies with advanced filtering capabilities and improved performance. **Note:** This API is currently in beta and available by invitation only. [Show Docs](https://docs.crustdata.com/docs/discover/company-apis/company-discovery-api-in-db-v2)

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.filters` | `object` | Yes | — | Filter conditions for searching companies. Can be a simple condition or complex nested conditions with AND/OR logic. |
| `payload.cursor` | `string` | No | — | Pagination cursor from previous response. Used for fetching the next page of results. |
| `payload.limit` | `integer` | No | `20` | The number of results to return in a single request. Default value is 20. Maximum is 1,000. Maximum: 1000. |
| `payload.sorts` | `array` | No | — | Array of sort criteria |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "In-database search API for company data, enabling you to search across millions of companies with advanced filtering capabilities and improved performance. **Note:** This API is currently in beta and available by invitation only. [Show Docs](https://docs.crustdata.com/docs/discover/company-apis/company-discovery-api-in-db-v2)",
    "properties": {
      "filters": {
        "description": "Filter conditions for searching companies. Can be a simple condition or complex nested conditions with AND/OR logic.",
        "anyOf": [
          {
            "type": "object",
            "description": "Basic filter condition for CompanyDB search",
            "properties": {
              "filter_type": {
                "type": "string",
                "description": "The field to filter on (e.g., \"company_name\", \"hq_country\", \"employee_metrics.latest_count\")"
              },
              "type": {
                "type": "string",
                "description": "The operator to use for comparison. Use (.) for fuzzy text matching, [.] for exact token matching.",
                "enum": [
                  "=",
                  "!=",
                  "in",
                  "not_in",
                  ">",
                  "<",
                  "=>",
                  "=<",
                  "(.)",
                  "[.]"
                ]
              },
              "value": {
                "description": "The value(s) to match against",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "number"
                        }
                      ]
                    }
                  }
                ]
              }
            },
            "required": [
              "filter_type",
              "type",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "description": "Complex filter group for CompanyDB search with AND/OR logic",
            "properties": {
              "op": {
                "type": "string",
                "description": "Logical operator to combine conditions",
                "enum": [
                  "and",
                  "or"
                ]
              },
              "conditions": {
                "type": "array",
                "description": "Array of conditions to combine",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "description": "Basic filter condition for CompanyDB search",
                      "properties": {
                        "filter_type": {
                          "type": "string",
                          "description": "The field to filter on (e.g., \"company_name\", \"hq_country\", \"employee_metrics.latest_count\")"
                        },
                        "type": {
                          "type": "string",
                          "description": "The operator to use for comparison. Use (.) for fuzzy text matching, [.] for exact token matching.",
                          "enum": [
                            "=",
                            "!=",
                            "in",
                            "not_in",
                            ">",
                            "<",
                            "=>",
                            "=<",
                            "(.)",
                            "[.]"
                          ]
                        },
                        "value": {
                          "description": "The value(s) to match against",
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      "required": [
                        "filter_type",
                        "type",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "description": "Recursive OpenAPI schema reference #/components/schemas/CompanyDBConditionGroup.",
                      "additionalProperties": true
                    }
                  ]
                }
              }
            },
            "required": [
              "op",
              "conditions"
            ],
            "additionalProperties": false
          }
        ]
      },
      "cursor": {
        "type": "string",
        "description": "Pagination cursor from previous response. Used for fetching the next page of results."
      },
      "limit": {
        "type": "integer",
        "description": "The number of results to return in a single request. Default value is 20. Maximum is 1,000.",
        "default": 20,
        "maximum": 1000
      },
      "sorts": {
        "type": "array",
        "description": "Array of sort criteria",
        "items": {
          "type": "object",
          "properties": {
            "column": {
              "type": "string",
              "description": "Field to sort by (e.g., \"employee_metrics.latest_count\", \"year_founded\")"
            },
            "order": {
              "type": "string",
              "description": "Sort order",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          "required": [
            "column",
            "order"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "filters"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.companies` | `array` | Yes | — | Array of companies matching the search criteria |
| `result.data.companies[].company_id` | `string` | No | — | Unique identifier for the company |
| `result.data.companies[].company_name` | `string` | No | — | Name of the company |
| `result.data.companies[].year_founded` | `integer` | No | — | Year the company was founded |
| `result.data.companies[].company_type` | `string` | No | — | Type of company (e.g., Private, Public, Non-Profit) |
| `result.data.companies[].acquisition_status` | `string` | No | — | Acquisition status of the company |
| `result.data.companies[].ipo_date` | `string` | No | — | IPO date if the company is public Format: `date`. |
| `result.data.companies[].hq_country` | `string` | No | — | Country where headquarters is located |
| `result.data.companies[].hq_street_address_and_city` | `string` | No | — | Street address and city of headquarters |
| `result.data.companies[].hq_location` | `string` | No | — | Full headquarters location |
| `result.data.companies[].largest_headcount_country` | `string` | No | — | Country with the most employees |
| `result.data.companies[].office_addresses` | `array` | No | — | List of all office locations |
| `result.data.companies[].employee_count_range` | `string` | No | — | Employee count range category |
| `result.data.companies[].employee_metrics` | `object` | No | — | Employee growth metrics |
| `result.data.companies[].employee_metrics.latest_count` | `integer` | No | — | Latest employee count |
| `result.data.companies[].employee_metrics.growth_1m` | `integer` | No | — | 1-month employee growth (absolute) |
| `result.data.companies[].employee_metrics.growth_3m` | `integer` | No | — | 3-month employee growth (absolute) |
| `result.data.companies[].employee_metrics.growth_6m` | `integer` | No | — | 6-month employee growth (absolute) |
| `result.data.companies[].employee_metrics.growth_12m` | `integer` | No | — | 12-month employee growth (absolute) |
| `result.data.companies[].employee_metrics.growth_1m_percent` | `number` | No | — | 1-month employee growth (percentage) |
| `result.data.companies[].employee_metrics.growth_3m_percent` | `number` | No | — | 3-month employee growth (percentage) |
| `result.data.companies[].employee_metrics.growth_6m_percent` | `number` | No | — | 6-month employee growth (percentage) |
| `result.data.companies[].employee_metrics.growth_12m_percent` | `number` | No | — | 12-month employee growth (percentage) |
| `result.data.companies[].follower_metrics` | `object` | No | — | LinkedIn follower growth metrics |
| `result.data.companies[].follower_metrics.latest_count` | `integer` | No | — | Latest follower count |
| `result.data.companies[].follower_metrics.growth_1m` | `integer` | No | — | 1-month follower growth (absolute) |
| `result.data.companies[].follower_metrics.growth_3m` | `integer` | No | — | 3-month follower growth (absolute) |
| `result.data.companies[].follower_metrics.growth_6m` | `integer` | No | — | 6-month follower growth (absolute) |
| `result.data.companies[].follower_metrics.growth_12m` | `integer` | No | — | 12-month follower growth (absolute) |
| `result.data.companies[].follower_metrics.growth_1m_percent` | `number` | No | — | 1-month follower growth (percentage) |
| `result.data.companies[].follower_metrics.growth_3m_percent` | `number` | No | — | 3-month follower growth (percentage) |
| `result.data.companies[].follower_metrics.growth_6m_percent` | `number` | No | — | 6-month follower growth (percentage) |
| `result.data.companies[].follower_metrics.growth_12m_percent` | `number` | No | — | 12-month follower growth (percentage) |
| `result.data.companies[].estimated_revenue_lower_bound_usd` | `number` | No | — | Estimated minimum annual revenue in USD |
| `result.data.companies[].estimated_revenue_higher_bound_usd` | `number` | No | — | Estimated maximum annual revenue in USD |
| `result.data.companies[].crunchbase_total_investment_usd` | `number` | No | — | Total funding raised in USD |
| `result.data.companies[].crunchbase_valuation_usd` | `number` | No | — | Latest valuation in USD |
| `result.data.companies[].crunchbase_valuation_lower_bound_usd` | `number` | No | — | Minimum valuation estimate in USD |
| `result.data.companies[].crunchbase_valuation_date` | `string` | No | — | Date of latest valuation Format: `date`. |
| `result.data.companies[].last_funding_round_investment_usd` | `number` | No | — | Amount raised in last funding round in USD |
| `result.data.companies[].last_funding_round_type` | `string` | No | — | Type of last funding round |
| `result.data.companies[].last_funding_date` | `string` | No | — | Date of last funding round Format: `date`. |
| `result.data.companies[].linkedin_industries` | `array` | No | — | LinkedIn industry classifications |
| `result.data.companies[].linkedin_categories` | `array` | No | — | LinkedIn category tags |
| `result.data.companies[].crunchbase_categories` | `array` | No | — | Crunchbase category tags |
| `result.data.companies[].markets` | `array` | No | — | Target markets |
| `result.data.companies[].company_website` | `string` | No | — | Full company website URL |
| `result.data.companies[].company_website_domain` | `string` | No | — | Company website domain |
| `result.data.companies[].linkedin_profile_name` | `string` | No | — | LinkedIn profile slug |

The table shows the first 50 fields. Expand the raw schema below for every field.

> [!NOTE]
>
> This output schema is too large for an inline display. Read the complete live contract with `deepline describe crustdata_v2_companydb_search --json`.

## Deepline cost

* Pricing model: `per_result` (per result).
* Estimated Deepline credits: `0.4` per pricing unit.

## Related documentation

* [CrustData V2 provider guide](https://deepline.com/docs/providers/crustdata-v2/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.