> 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/search-results/asp_only_keyword_results.md).

# asp\_only\_keyword\_results

<figure><img src="/files/E6bijLi3qcJqSE6rq3VW" alt=""><figcaption><p>Keyword Suggestions for no results</p></figcaption></figure>

Gives access the keyword suggestions array before sending it to the templating system. Different from [asp\_results](/hooks/filters/search-results/asp_results.md), as this is only applied in ajax context, when **no results** were found, and the keyword suggestions are enabled.

```php
apply_filters('asp_only_keyword_results', $data);
```

### Parameters

* **$data**(array) - Array containing the keyword data

### Usage

```php
add_filter( 'asp_only_keyword_results', 'asp_custom_keyword_results', 10, 4 );
function asp_custom_keyword_results( $data ) {
    $data['keywords'] = array('keyword 1', 'keyword 2', 'keyword 3');
    return $data;
}
```
