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

# Search Responses

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[old doc.lw link]: https//doc.lucidworks.com/app-studio/4.2/3127

[localhost link]: http://localhost:3000/docs/5/app-studio/reference/accessing-data/search-response

[mintlify link]: https://doc.lucidworks.com/docs/5/app-studio/reference/accessing-data/search-response

The Response tag (`<search:response>`) sends a Query to a given Platform and stores the Response in a JSP variable.

<LwTemplate />

## Usage

This example shows how to submit a query using a given Platform and retrieve the response:

```xml wrap  theme={"dark"}
<search:response var="myResponse" platform="platform" query="query"></search:response>
```

The resulting response object can be accessed using an angular expression in the HTML page on which it is located. For example, `{{myResponse}}`.

## Configuration parameters

* `var (java.lang.String)`
  Variable name to reference the Response from the Platform.\
  Default: `response`

* `platform (twigkit.platform.Platform)`
  The Platform instance to use.

* `query (twigkit.model.Query)`
  An instance of an Appkit Query to send to the Platform.

* `errorPage (java.lang.String )`
  Error page to redirect to when Platform throws an exception.\
  Default: `/WEB-INF/tags/widgets/error/error.jsp`

* `on (java.lang.String)`
  Event that is broadcasted for when the response should reload. Default: reloadSearch. (optional)

## Tag body

The body of the Response tag can be used to trigger a widget:spinner as the app waits for the response to return from the platform.

```xml wrap  theme={"dark"}
<search:response var="response" platform="platform" query="query" error-page="/error">
    <widget:spinner></widget:spinner>
</search:response>
```
