Skip to main content
This page collects recipes for Company Autocomplete. Each example is a full working request you can copy, paste, and adapt. For the core walkthrough (first request, response shape, request fields), see Company Autocomplete. For supported fields, operators, and errors, see Autocomplete reference.
Replace YOUR_API_KEY in each example with your actual API key. All requests require the x-api-version: 2025-11-01 header.

Autocomplete company names

Use basic_info.name to surface company names matching a partial string.
curl --request POST \
	--url https://api.crustdata.com/company/search/autocomplete \
	--header 'authorization: Bearer YOUR_API_KEY' \
	--header 'content-type: application/json' \
	--header 'x-api-version: 2025-11-01' \
	--data '{
		"field": "basic_info.name",
		"query": "hub",
		"limit": 5
	}'

Get the most common values for a field

Use an empty string for query when you want the most frequent values instead of a text match. This is useful when you are exploring a field for the first time.
curl --request POST \
	--url https://api.crustdata.com/company/search/autocomplete \
	--header 'authorization: Bearer YOUR_API_KEY' \
	--header 'content-type: application/json' \
	--header 'x-api-version: 2025-11-01' \
	--data '{
		"field": "locations.country",
		"query": "",
		"limit": 10
	}'
Suggestions are ranked by frequency, so you can quickly see the most common values in the dataset.

Narrow suggestions with filters

Autocomplete can scope results to a subset of companies. The filters field accepts either:
  • a single condition with field, type, and value
  • a logical group with op and conditions
This example returns industry suggestions only for US-based companies.
curl --request POST \
	--url https://api.crustdata.com/company/search/autocomplete \
	--header 'authorization: Bearer YOUR_API_KEY' \
	--header 'content-type: application/json' \
	--header 'x-api-version: 2025-11-01' \
	--data '{
		"field": "basic_info.industries",
		"query": "",
		"limit": 5,
		"filters": {
			"field": "locations.country",
			"type": "=",
			"value": "USA"
		}
	}'
Use indexed values in filters. For example, locations.country uses ISO-3 codes such as USA, GBR, and CAN.
You can also use nested and/or groups. Filter values can be strings, numbers, or booleans, and array values can contain strings or numbers — pass numeric values as numbers rather than strings where the underlying field is numeric.
curl --request POST \
  --url https://api.crustdata.com/company/search/autocomplete \
  --header 'authorization: Bearer YOUR_API_KEY' \
  --header 'content-type: application/json' \
  --header 'x-api-version: 2025-11-01' \
  --data '{
    "field": "taxonomy.professional_network_industry",
    "query": "",
    "limit": 5,
    "filters": {
      "op": "and",
      "conditions": [
        { "field": "locations.country", "type": "=", "value": "USA" },
        { "field": "headcount.latest_count", "type": ">", "value": 100 }
      ]
    }
  }'
For the full list of supported operators, see Autocomplete reference.

Full workflow: Autocomplete → Search → Enrich

This is the canonical end-to-end Company API workflow. You do not know the exact industry value the Search API expects. Autocomplete discovers it, Search finds matching companies, and Enrich fills in the details.

Step 1: Discover valid industry values

curl --request POST \
  --url https://api.crustdata.com/company/search/autocomplete \
  --header 'authorization: Bearer YOUR_API_KEY' \
  --header 'content-type: application/json' \
  --header 'x-api-version: 2025-11-01' \
  --data '{"field": "basic_info.industries", "query": "software", "limit": 3}'
Extract: Take suggestions[0].value"Software Development". Use this exact string in your Search filter. If empty: If suggestions is [], your query did not match any indexed values. Try a broader term (for example, "tech" instead of "software engineering").

Step 2: Search for matching companies

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": "basic_info.industries", "type": "in", "value": ["Software Development"]},
        {"field": "locations.country", "type": "=", "value": "USA"}
      ]
    },
    "sorts": [{"column": "headcount.total", "order": "desc"}],
    "limit": 3,
    "fields": ["crustdata_company_id", "basic_info.name", "basic_info.primary_domain", "headcount.total"]
  }'
Extract: Take companies[].crustdata_company_id values → [12345, 67890, 628895]. Pass these to Enrich. If empty: If companies is [], no companies matched your filters. Broaden your conditions or re-run autocomplete to verify filter values. To get more results: Pass next_cursor as cursor in the next request. Stop paginating when next_cursor is null. See Pagination & sorting.

Step 3: Enrich the top matches

curl --request POST \
  --url https://api.crustdata.com/company/enrich \
  --header 'authorization: Bearer YOUR_API_KEY' \
  --header 'content-type: application/json' \
  --header 'x-api-version: 2025-11-01' \
  --data '{
    "crustdata_company_ids": [12345, 67890, 628895],
    "fields": ["basic_info", "headcount", "funding", "hiring"]
  }'
Extract: Each item in the top-level array corresponds to one input ID. Access the profile via response[i].matches[0].company_data. If a match is empty: If matches is [] for an identifier, that company was not found. The request still succeeds (200 OK) for the other identifiers. See Partial batch failure.

Next steps