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

# Company Search examples

> Worked examples for Company Search: or/nested logic, well-funded-by-country, and recently founded companies.

Worked examples for [Company Search](/company-docs/search/introduction). Each
example is a full working request you can copy, paste, and adapt.

For the core walkthrough (first search, combining filters with `and`), see
[Company Search](/company-docs/search/introduction). For the operator list,
field catalog, and validation rules, see
[Search reference](/company-docs/search/reference).

<Note>
  Replace `YOUR_API_KEY` in each example with your actual API key. All
  requests require the `x-api-version: 2025-11-01` header.
</Note>

***

## Use `or` and nested logic

Use `op: "or"` when a company should match **any** condition. You can also nest `and`/`or` groups for complex queries.

This search finds companies that are either in the software development
industry or have over \$5M in total investment, AND are headquartered in the
USA.

<CodeGroup>
  ```bash Request theme={"theme":"vitesse-black"}
  curl --request POST \
    --url https://api.crustdata.com/company/search \
    --header 'authorization: Bearer YOUR_API_KEY' \
    --header 'content-type: application/json' \
    --header 'x-api-version: 2025-11-01' \
    --data '{
      "filters": {
        "op": "and",
        "conditions": [
          {
            "op": "or",
            "conditions": [
              {
                "field": "taxonomy.professional_network_industry",
                "type": "=",
                "value": "Software Development"
              },
              {
                "field": "funding.total_investment_usd",
                "type": ">",
                "value": 5000000
              }
            ]
          },
          {
            "field": "locations.country",
            "type": "=",
            "value": "USA"
          }
        ]
      },
      "sorts": [{"field": "headcount.total", "order": "desc"}],
      "limit": 2,
      "fields": [
        "crustdata_company_id",
        "basic_info.name",
        "headcount.total",
        "taxonomy.professional_network_industry",
        "funding.total_investment_usd"
      ]
    }'
  ```
</CodeGroup>

The outer `and` requires both conditions: the inner `or` matches either
software development companies or well-funded companies, and the outer
condition restricts to US-headquartered companies.

***

## Find well-funded companies in a country

This is a common pattern for sales and investor research: find companies in a specific market with significant funding. This search finds US-based companies with over \$10M in total investment, sorted by funding (highest first).

<CodeGroup>
  ```bash Request theme={"theme":"vitesse-black"}
  curl --request POST \
    --url https://api.crustdata.com/company/search \
    --header 'authorization: Bearer YOUR_API_KEY' \
    --header 'content-type: application/json' \
    --header 'x-api-version: 2025-11-01' \
    --data '{
      "filters": {
        "op": "and",
        "conditions": [
          {
            "field": "locations.country",
            "type": "in",
            "value": ["USA"]
          },
          {
            "field": "funding.total_investment_usd",
            "type": ">",
            "value": 10000000
          }
        ]
      },
      "sorts": [{"field": "funding.total_investment_usd", "order": "desc"}],
      "limit": 2,
      "fields": [
        "crustdata_company_id",
        "basic_info.name",
        "basic_info.primary_domain",
        "locations.country",
        "funding.total_investment_usd",
        "headcount.total"
      ]
    }'
  ```

  ```json Response theme={"theme":"vitesse-black"}
  {
      "companies": [
          {
              "crustdata_company_id": 6035590,
              "basic_info": {
                  "name": "VMware",
                  "primary_domain": "broadcom.com"
              },
              "locations": {
                  "country": "USA"
              },
              "funding": {
                  "total_investment_usd": 100000000000.0
              },
              "headcount": {
                  "total": 11925
              }
          },
          {
              "crustdata_company_id": 631466,
              "basic_info": {
                  "name": "OpenAI",
                  "primary_domain": "openai.com"
              },
              "locations": {
                  "country": "USA"
              },
              "funding": {
                  "total_investment_usd": 79000120000.0
              },
              "headcount": {
                  "total": 7397
              }
          }
      ],
      "next_cursor": "H4sIAC1xqGkC_w3MOw7CMAwA0KtEmTv4E...",
      "total_count": null
  }
  ```
</CodeGroup>

<Note>Response trimmed for clarity.</Note>

***

## Find recently founded companies

Use comparison operators like `>` and `<` on numeric or date fields. This search finds companies founded after 2020, sorted by headcount.

<CodeGroup>
  ```bash Request theme={"theme":"vitesse-black"}
  curl --request POST \
    --url https://api.crustdata.com/company/search \
    --header 'authorization: Bearer YOUR_API_KEY' \
    --header 'content-type: application/json' \
    --header 'x-api-version: 2025-11-01' \
    --data '{
      "filters": {
        "field": "basic_info.year_founded",
        "type": ">",
        "value": 2020
      },
      "sorts": [{"field": "headcount.total", "order": "desc"}],
      "limit": 2,
      "fields": [
        "crustdata_company_id",
        "basic_info.name",
        "basic_info.year_founded",
        "headcount.total",
        "locations.country"
      ]
    }'
  ```

  ```json Response theme={"theme":"vitesse-black"}
  {
      "companies": [
          {
              "crustdata_company_id": 4069929,
              "basic_info": {
                  "name": "Kendi İşim",
                  "year_founded": 2023
              },
              "headcount": {
                  "total": 181137
              },
              "locations": {
                  "country": "TUR"
              }
          },
          {
              "crustdata_company_id": 1038926,
              "basic_info": {
                  "name": "Stellantis",
                  "year_founded": 2021
              },
              "headcount": {
                  "total": 114361
              },
              "locations": {
                  "country": "NLD"
              }
          }
      ],
      "next_cursor": "H4sIAC9xqGkC_w3MMQ7CMAwF0KtEmTvEdkh...",
      "total_count": null
  }
  ```
</CodeGroup>

<Note>Response trimmed for clarity.</Note>

***

## Find companies by team size in a function

Filter on `roles.distribution.<function>` to find companies by the number of employees in a specific function — for example, companies with a large engineering team. Combine it with an industry or location filter to narrow the result.

<CodeGroup>
  ```bash Request — software companies with 1,000+ engineers theme={"theme":"vitesse-black"}
  curl --request POST \
    --url https://api.crustdata.com/company/search \
    --header 'authorization: Bearer YOUR_API_KEY' \
    --header 'content-type: application/json' \
    --header 'x-api-version: 2025-11-01' \
    --data '{
      "filters": {
        "op": "and",
        "conditions": [
          { "field": "taxonomy.professional_network_industry", "type": "=", "value": "Software Development" },
          { "field": "roles.distribution.engineering", "type": ">", "value": 1000 }
        ]
      },
      "fields": ["basic_info.name", "basic_info.primary_domain", "headcount.total"],
      "sorts": [{ "field": "headcount.total", "order": "desc" }],
      "limit": 3
    }'
  ```

  ```json Response theme={"theme":"vitesse-black"}
  {
      "companies": [
          { "basic_info": { "name": "Amazon", "primary_domain": "aboutamazon.com" }, "headcount": { "total": 771499 } },
          { "basic_info": { "name": "Google", "primary_domain": "goo.gle" }, "headcount": { "total": 342901 } },
          { "basic_info": { "name": "Microsoft", "primary_domain": "microsoft.com" }, "headcount": { "total": 231238 } }
      ],
      "next_cursor": "H4sIA...",
      "total_count": 276
  }
  ```
</CodeGroup>

<Note>Response trimmed for clarity.</Note>

<Warning>
  `roles.distribution.<function>` is **filter-only** — you can filter on it, but it is not returned in the search response (requesting it in `fields` returns `400`). Select `headcount.total` or other returnable fields instead. The valid function names are listed in the [searchable fields reference](/company-docs/search/reference#searchable-fields).
</Warning>

***

## Find high-growth mid-size companies

Filter on the dotted period path `headcount.growth_percent.6m` to find companies whose 6-month headcount growth exceeds a threshold. The same shape applies to `.1m`, `.3m`, `.12m` and to `headcount.growth_absolute.*` for absolute employee deltas.

<CodeGroup>
  ```bash Request — mid-size companies with >15% 6-month growth theme={"theme":"vitesse-black"}
  curl --request POST \
    --url https://api.crustdata.com/company/search \
    --header 'authorization: Bearer YOUR_API_KEY' \
    --header 'content-type: application/json' \
    --header 'x-api-version: 2025-11-01' \
    --data '{
      "filters": {
        "op": "and",
        "conditions": [
          { "field": "headcount.growth_percent.6m", "type": ">", "value": 15 },
          { "field": "headcount.total", "type": ">", "value": 200 },
          { "field": "headcount.total", "type": "<", "value": 2000 }
        ]
      },
      "fields": ["basic_info.name", "basic_info.primary_domain", "headcount.total", "headcount.growth_percent"],
      "sorts": [{ "field": "headcount.total", "order": "desc" }],
      "limit": 2
    }'
  ```

  ```json Response theme={"theme":"vitesse-black"}
  {
      "companies": [
          {
              "basic_info": { "name": "IRT", "primary_domain": "irt.uy" },
              "headcount": {
                  "total": 1991,
                  "growth_percent": { "1m": 3.0, "3m": 3.0, "6m": 17.26, "12m": 32.73 }
              }
          },
          {
              "basic_info": { "name": "MS Office", "primary_domain": "msofice.org" },
              "headcount": {
                  "total": 1990,
                  "growth_percent": { "1m": 29.22, "3m": 29.22, "6m": 32.76, "12m": 47.3 }
              }
          }
      ],
      "next_cursor": "H4sIAE5P...",
      "total_count": 4685
  }
  ```
</CodeGroup>

<Warning>
  The dotted period paths (`headcount.growth_percent.6m`, etc.) are
  **filterable but not sortable** — passing one as a `sorts.field` returns
  `400 "Unsupported columns"`. Sort on `headcount.total` (or another
  sortable field) and use the growth filter to narrow the population.
</Warning>

<Note>
  `/company/search` returns the growth map under period keys `1m`, `3m`,
  `6m`, `12m`. The same underlying data is also returned by
  [`/company/enrich`](/company-docs/enrichment/introduction), but with
  different keys (`mom`, `qoq`, `six_months`, `yoy`, `two_years`).
</Note>

***

## Next steps

* [Pagination and sorting](/company-docs/search/reference#paginate-through-results) — walk through all matching companies.
* [Search reference](/company-docs/search/reference) — operators, searchable fields, response fields, validation, and errors.
* [Company Autocomplete](/company-docs/autocomplete/introduction) — discover exact values for industries, categories, and countries.
