> For the complete documentation index, see [llms.txt](https://knowledgebase.ajaxsearchpro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.ajaxsearchpro.com/hooks/filters/query-and-output/asp_before_ajax_output.md).

# asp\_before\_ajax\_output

Applies a filter on the HTML results output. This is not the whole ajax response, only the section with the results.

```php
$html_results = apply_filters('asp_before_ajax_output', $html_results, $id, $results, $args);
```

### Parameters

* **$html\_results** (string) - HTML version of results
* **$id** (int) - Search instance ID
* **$results** (array) - Result objects array
* **$args** (array) - Search arguments

### Usage

```php
add_filter( 'asp_before_ajax_output', 'asp_before_ajax_output_prepend', 10, 4 );
function asp_before_ajax_output_prepend( $html_results, $id, $results , $args) {
	return "<p>Hi!</p>" . $html_results;
}
```
