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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | Yes | — | Business description or keywords |
strategy | string | No | "hybrid" | Search strategy: "hybrid", "semantic", or "lexical" |
limit | integer | No | 10 | Maximum results (1-50) |
min_confidence | float | No | 0.3 | Minimum confidence threshold (0-1) |
include_cross_refs | boolean | No | true | Include cross-reference info |
Search Strategies
| Strategy | Best For | How It Works |
|---|---|---|
hybrid | Most queries | Combines semantic and lexical, best overall accuracy |
semantic | Vague descriptions | Uses embeddings to find conceptually similar codes |
lexical | Known terminology | Exact 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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
term | string | Yes | — | Index term to search |
exact | boolean | No | false | Require exact match |
limit | integer | No | 20 | Maximum 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_codesreturns 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