Search Tabs

List the active search tabs, then search within one with the Autocomplete API.

Last updated

On this page

Search Tabs API

The Autocomplete API includes search tabs for quick filtering based on product and post categories. Manage and view these tabs in the Athena Dashboard, under Autocomplete -> Search Tabs.

Use the Search Tabs API to access all active tabs.

MethodPath
POST/api/v1/search-tabs
POST/api/v2/search-tabs

Request body

JSON
{
   "token": "{{ website_token }}" //required
}

Successful response

JSON
{
    "data": [
        {
            "title": "All",
            "value": 0,
            "checked": true
        },
        {
            "title": "Men",
            "value": 11,
            "checked": false
        }
    ]
}

Autocomplete API with Search Tabs

To search using a specific search tab, include the autocomplete_tab parameter in the body of an Autocomplete API call. Get the tab value from the Search Tabs API response.

Each response includes a product count for each tab. If you don’t specify autocomplete_tab, the default tab is “preselected”.

MethodPath
POST/api/v1/autocomplete
POST/api/v2/autocomplete

Request body

JSON
{
   "q": "Yoga", //required
   "token": "{{ website_token }}", //required
   "autocomplete_tab": 3
}

Successful response

JSON
{
   "data": {
      "results": {...
       },
      "true_autocomplete_keyword": "mach",
      "tabs": {
            "count": {
                "11": 1,
                "20": 1,
                "3": 23,
                "9": 1,
                "37": 1
            },
            "preselected": 3
      },
      "banners": {...
     }
  }
}