> ## 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:response

[localhost link]: http://localhost:3000/docs/5/app-studio/reference/tags/lightning.directive.searchResponse

[mintlify link]: https://doc.lucidworks.com/docs/5/app-studio/reference/tags/lightning.directive.searchResponse

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

> [card] Key questions to get you started
>
> Powered by Lucidworks Agent Studio

## Description

The response directive sends a query to the twigkit API and stores the
response on a scoped variable and in the
[Response Service](https://doc.lucidworks.com/docs/5/fusion/dev-portal/appkit/reference/services/lightning.ResponseService.md)

Inside of the tag you can access the average response time
(`$parent.averageResponseTime`) and the previous response time
(`$parent.previousResponseTime`).

## Usage

as element:

```xml wrap  theme={"dark"}
<search:response
       var="{string}"
       platform="{object}"
       query="{object}"
       [error-page="{string}"]
       [on="{string}"]>
</search:response>
```

### Directive info

* This directive creates new scope.

#### Parameters

| Param | Type | Details |
| - | - | - |
| var | **string** | The name of the variable to store the response in |
| platform | **object** | The platform to query against |
| query | **object** | A query object |
| error-page  *(optional)* | **string** | Error page to redirect to when Platform throws an exception. |
| on  *(optional)* | **string** | Event that is broadcasted for when the response should reload. Default: reloadSearch. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.