---
title: "Complementary query hooks"
slug: "complementary-query-hooks"
abstract: "List of complementary query hooks in Sitecore Search JS SDK for React.."
---
# Complementary query hooks

Secondary query hooks work independently or in the presence of query hooks that populate widgets. You can use them to retrieve supplementary data for a variety of use cases.

## useSearchResultsBreadcrumb

You can use this hook on product listing pages to complement the `useSearchResults` hook, it returns the taxonomy for the host page. Sorted in the order they appear in the URL, each item represents a URL segment.

The hook returns the following:

```js

    {
        "category_id": "<id for item 0>",
        "name": "<Name for item 0>",
        "url_path": "<path for item 0>"
    },
    ...
    {
        "category_id": "<id for item N>",
        "name": "<Name for item N>",
        "url_path": "<path for item N>"
    }
]
```

In the UI reference site, in the **Templates** section, in **SearchResults**, the **SearchResultsRowGrid** demo uses this query hook.

## useSearchResultsIsSelectedFacet

You can use this hook to complement the `useSearchResults` hook. It returns `true` if a facet has been selected in the search result widget.

```js
boolean // true if a facet has been selected in the search results widget on the page
```

## useSearchResultsSelectedFacets

You can use this hook to complement the `useSearchResults` hook to retrieve additional information about the facets selected in the search results widget.

The hook returns the following where each item is a selected facet:

```js

   {
       id: string,
       name: string,
       numberOfProducts: number,
       values: [
           {
               id: string,
               text: string
           }
       ]
   }
]
```

> [!note]
> A page can contain only one search results widget. At runtime, this query hook recognizes the `useSearchResults` hook on the page.

> [!note]
> **Notice**
> These React resources can help you with your implementation:
>
> -   To view working examples of widgets, visit the [starter kit website](https://developers.sitecorecloud.io/search-sdk/react/website) built using Search JS SDK and UI components packages.
>
> -   You can download or fork its [GitHub repository](https://github.com/Sitecore/Sitecore-Search-JS-SDK-Starter-Kit/blob/main/README.md).