Skip to Content
API ReferenceSearch Tools

Search Tools

Tools for finding NAICS codes based on queries.

search_naics_codes

The primary search tool. Uses hybrid semantic + lexical search for best results.

Parameters

ParameterTypeRequiredDefaultDescription
querystringYes—Business description or keywords
strategystringNo"hybrid"Search strategy: "hybrid", "semantic", or "lexical"
limitintegerNo10Maximum results (1-50)
min_confidencefloatNo0.3Minimum confidence threshold (0-1)
include_cross_refsbooleanNotrueInclude cross-reference info

Search Strategies

StrategyBest ForHow It Works
hybridMost queriesCombines semantic and lexical, best overall accuracy
semanticVague descriptionsUses embeddings to find conceptually similar codes
lexicalKnown terminologyExact and fuzzy text matching

Response

{ "results": [ { "code": "311111", "title": "Dog and Cat Food Manufacturing", "description": "This industry comprises establishments primarily engaged in manufacturing dog and cat food from grain, meat, and other ingredients.", "level": "national_industry", "confidence": 0.92, "match_type": "semantic", "cross_references": [ { "type": "exclusion", "text": "Retailing pet food--are classified in Industry 453910" } ] } ], "query": "organic dog treats manufacturer", "strategy": "hybrid", "total_results": 5 }

Examples

Basic search:

{ "query": "pizza restaurant" }

With options:

{ "query": "software development consulting", "strategy": "hybrid", "limit": 5, "min_confidence": 0.5, "include_cross_refs": true }

search_index_terms

Search the 20,398 official NAICS index terms. More precise than general search when you know specific industry terminology.

Parameters

ParameterTypeRequiredDefaultDescription
termstringYes—Index term to search
exactbooleanNofalseRequire exact match
limitintegerNo20Maximum results

Response

{ "results": [ { "term": "Pizza parlors", "code": "722513", "title": "Limited-Service Restaurants", "match_type": "exact" }, { "term": "Pizza delivery shops", "code": "722513", "title": "Limited-Service Restaurants", "match_type": "partial" } ], "query": "pizza", "total_results": 2 }

Examples

Fuzzy search:

{ "term": "bakery" }

Exact match:

{ "term": "Retail bakeries", "exact": true }

When to Use

Use search_index_terms when:

  • You know the exact industry term
  • search_naics_codes returns too many results
  • You want to verify official terminology

Use search_naics_codes when:

  • You have a business description (not a term)
  • You need semantic matching
  • The description is vague or complex