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

# Category and Brand Pages in Autocomplete

> Configure category and brand pages to appear as autocomplete phrase suggestions.

When a visitor interacts with the search assistant (autocomplete), they may expect to see suggestions for category pages or brand pages.

<Tip>
  By default, Elevate does not return category or brand pages as part of autocomplete suggestions.
</Tip>

This guide describes a workaround that allows category or brand page suggestions to appear in the [autocomplete](/elevate/docs/api/storefront/v3/queries/autocomplete) response.

## Step-by-step implementation

### Step 1. Index category and brand page references

To make category or brand suggestions available in autocomplete, the pages must first be indexed as content. The following example demonstrates how to add category and brand pages to the content feed:

```json icon="code" theme={null}
{"replace":{"key":"c1","content":{"markets":["uk"],"type":"category","defaults":{"title":"Dresses","url":"/dresses"}}}}
{"replace":{"key":"b2","content":{"markets":["uk"],"type":"brand","defaults":{"title":"Acme Co.","url":"/acme-co"}}}}
```

### Step 2. Query autocomplete with content suggestions

Once categories and brands are indexed, content must be requested using a "POST" request when calling the `autocomplete` endpoint or method.

See these examples:

<Tabs>
  <Tab title="REST API">
    ```json title="Contents of request-body.json" icon="code" expandable theme={null}
    {
      "contentLists": [
        {
          "id": "category-suggestions",
          "contentFilter": {
            "type": ["category"]
          }
        },
        {
          "id": "brand-suggestions",
          "contentFilter": {
            "type": ["brand"]
          }
        }
      ]
    }
    ```

    ```bash icon="terminal" theme={null}
    curl -X POST \
      "https://{cluster-id}.elevate-api.cloud/api/storefront/v3/queries/autocomplete?market=US&locale=en-US&sessionKey=4b116e34-0a7a-ce5d-5591-75c62f231967&customerKey=4b116e34-0a7a-ce5d-5591-75c62f231967&touchpoint=DESKTOP&q=acme" \
      -H 'Content-Type: application/json' \
      -d @request-body.json
    ```
  </Tab>

  <Tab title="JS Library">
    ```javascript icon="js" expandable theme={null}
    const api = esales({
      clusterId: "cluster-id",
      market: "uk",
      locale: "en-GB",
      touchpoint: "desktop",
      session: () => ({
        customerKey: "0b05119e-eeb8-418a-bbfb-defa0dde417",
        sessionKey: "0b05119e-eeb8-418a-bbfb-defa0dde417"
      })
    });

    const results = await api.query.autocomplete(
      { q: "acme" },
      {
        contentLists: [
          {
            id: "category-suggestions",
            contentFilter: {
              type: ["category"]
            }
          },
          {
            id: "brand-suggestions",
            contentFilter: {
              type: ["brand"]
            }
          }
        ]
      }
    );
    ```
  </Tab>
</Tabs>

The `type` value must match the value used in the content feed.

## Behavior and limitations

* Empty pages, meaning pages without product listings, may still appear as autocomplete suggestions.
* Elevate treats these entries as generic content and does not automatically associate them with actual category or brand structures.

## Best practices

* Use descriptive values such as "category" or "brand" for the `type` field.
* Add keywords to maximize discoverability.
* Test autocomplete queries regularly to verify:
  * Correct category and brand suggestions appear.
  * Visitors are redirected to the intended destination pages.

## Summary

By indexing category and brand pages as content and requesting them through `contentLists`, category and brand suggestions can be surfaced in autocomplete responses even though they are not supported by default.
