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

# Search suggestions and facets

> Build autocomplete and filter controls without downloading full resources or using static statewide counts.

## Autocomplete

Use `GET /v1/search/suggestions` for compact typeahead results. It searches products, reviewed brands, reviewed product families, and categories without returning full product or family payloads.

```bash theme={"dark"}
curl "$NEKTIR_API_BASE/v1/search/suggestions?q=high%20wes&types=product,brand&limit=5"
```

`limit` applies to each requested group and is capped at 20. Omit `types` to return all four groups. Every suggestion contains a relative `href` for the full resource or filtered collection. Product suggestions also preserve the six-character DABS SKU under `source_ids`.

Autocomplete is a navigation aid, not an inventory result. Follow the product link or search the product collection when you need price, status, availability, or freshness.

## Query-dependent facets

Add `include=facets` to product browsing when an interface needs counts for the result set it is displaying:

```bash theme={"dark"}
curl "$NEKTIR_API_BASE/v1/products?q=high%20west&statuses=1&include=facets&limit=20"
```

`meta.facets` includes the matching product count, represented brands, category lineage, DABS statuses, and observed price bounds. Counts are calculated after every requested filter—including the same facet's active filter. They therefore describe the exact current result set, not hypothetical counts produced by removing one filter at a time.

Facets are opt-in because they require extra aggregation work. Cache them with the response ETag. The counts are pinned to the same publication revision as the returned products, but they do not imply complete inventory when an inventory-scoped query reports partial coverage.

You can combine `facets` with `coverage_details` as a comma-separated `include` list when an inventory-scoped diagnostic view genuinely needs both:

```bash theme={"dark"}
curl "$NEKTIR_API_BASE/v1/products?inventory_store_codes=0001&availability=reported_positive&include=facets,coverage_details"
```
