---
title: "The SXA Search service"
slug: "the-sxa-search-service"
abstract: "Learn more about the SXA search API parameters and their usage."
---
# The SXA Search service

SXA Search Service is an endpoint used by search components. Most search components available from the SXA toolbox consume data from the endpoint. This topic describes the SXA search API parameters and their purpose.

<details>
<summary><h2>Service URLs</h2></summary>

For each defined site, the SXA Search service registers the routes with the following endpoint URLs. These endpoints correspond to the public methods of the `Sitecore.XA.Feature.Search.Controllers.SearchController` class.

- `site/sxa/search/results` - gets the [search results](https://doc.sitecore.com/xp/en/developers/sxa/105/sitecore-experience-accelerator/the-sxa-search-service.html#UUID-74fd5d59-0a4a-1350-1483-7d8ac0714e95_section-idm4568079983163231568183595518 "Results").
- `site/sxa/search/facets` - provides the [faceted data](https://doc.sitecore.com/xp/en/developers/sxa/105/sitecore-experience-accelerator/the-sxa-search-service.html#UUID-74fd5d59-0a4a-1350-1483-7d8ac0714e95_section-idm4480052142043231568183724555 "Facets").
- `site/sxa/search/suggestions` - provides the [suggestion data](https://doc.sitecore.com/xp/en/developers/sxa/105/sitecore-experience-accelerator/the-sxa-search-service.html#UUID-74fd5d59-0a4a-1350-1483-7d8ac0714e95_section-idm4608855064208033905815628732 "Suggestions").

</details>

<details>
<summary><h2>Results</h2></summary>

The results endpoint runs a search and returns results. You can use the following parameters:

| Query parameter | Description | Example value |
| --- | --- | --- |
| q | query - returns the results with the specified word. | Renderings |
| v | variant - ID of the variant definition item used to render the result. | {A907975A-8C25-4433-A8ED-02B5FC1EBA29} |
| s | scope - ID of the scope definition item that provides predefined filtering. | {A907975A-8C25-4433-A8ED-02B5FC1EBA29} |
| l | language - language versions to include in the search result. | en\|pl<br><br>en,pl |
| o | ordering - sorts the results based on specified facets. | Title,Descending |
| e | offset - excludes a specified amount of elements from the returned result. | 30 |
| p | page size - the number of search results returned per page. The default value is 20. | 20 |
| g | geolocation - latitude and longitude of the geolocation used for spatial search. | 55.676098\|12.568337 |
| sc_site | sitecore site - the name of the context site. | showcase |
| itemid | item ID - the current context item ID. | {A907975A-8C25-4433-A8ED-02B5FC1EBA29} |
| sig | signature - the search results signature. | my_signature_search |

For example:

`https://sxa94_003432/playground/sxa/search/results/?s={BAFF04C0-7332-4B72-A108-EE9814C62F16}&itemid={81003E8D-4232-433D-849E-6CA9574B5BD1}&v={2CA6BDE6-69BC-4D2A-AC6B-6DD88E300CF9}&p=20&o=Title,Ascending`

</details>

<details>
<summary><h2>Facets</h2></summary>

The facets service searches for facets based on their name. You can use the following parameters:

| Query parameter | Description | Example value |
| --- | --- | --- |
| q | query - user string input to search for. | Renderings |
| s | scope - ID of the scope definition item that provides predefined filtering. | {A907975A-8C25-4433-A8ED-02B5FC1EBA29} |
| f | facets - facet item names to return. | Update date, Tags |
| l | language - language versions to include in the search result. | en\|pl |
| g | geolocation - latitude and longitude of the geolocation used for spatial search | 55.676098\|12.568337 |
| sig | signature - the search results signature | my_signature_search |

For example:

`https://sxa94_003432/playground/sxa/search/facets/?f=movie%20type,movie%20rated,movie%20genre&s={BAFF04C0-7332-4B72-A108-EE9814C62F16}&itemid={81003E8D-4232-433D-849E-6CA9574B5BD1}`

</details>

## Suggestions

The suggestions endpoint returns search suggestions. To set this option, in the Experience Editor, in the [Search Box](https://doc.sitecore.com/xp/en/users/sxa/105/sitecore-experience-accelerator/walkthrough--adding-search-functionality-to-your-page.html) rendering, open the **Control Properties** and, in the **Suggestions mode** field, select the **Show predictions** option.

> [!note]
> This feature is only available for the [Solr search provider](https://doc.sitecore.com/xp/en/developers/105/platform-administration-and-architecture/en/configure-the-solr-search-provider.html) when using the `sxaSuggester`. For more information, see [Using Solr auto-suggest](https://doc.sitecore.com/xp/en/developers/105/platform-administration-and-architecture/en/using-solr-auto-suggest.html).

| Query parameter | Description | Example value |
| --- | --- | --- |
| q | query - returns results with the specified word. | Renderings. |
| v | variant - ID of the variant definition item used to render the result. | {A907975A-8C25-4433-A8ED-02B5FC1EBA29} |
| p | page size - returns a specified amount of pages. The default value is 5. | 5 |
| itemid | item ID - the current context item ID. | {A907975A-8C25-4433-A8ED-02B5FC1EBA29} |

<details>
<summary><h2>Caching</h2></summary>

By default, caching for search and facet requests is disabled. You can update the configuration in the `Sitecore.XA.Feature.Search.config` file:

![SXA-search-service-enable.png](https://doc.sitecore.com/api/markdown-image/xp/en/developers/sxa/105/sitecore-experience-accelerator/images/SXA-search-service-enable.png)

</details>