# Ajax Search in Frontend

On Frontend, whenever any user searches for a particular product, the extension will find relevant products as per set backend configuration and displays in the search form.

<figure><img src="/files/LE01GQlsQxr2Kv5eaMJz" alt=""><figcaption></figcaption></figure>

If such a product is not available, the extension will displays error message as shown below.

<figure><img src="/files/plaFCbdQuDAB5TILA2TH" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.magecomp.com/magento-2-ajax-search-extension/ajax-search-in-frontend.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
