> 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_print_search_query.md).

# asp\_print\_search\_query

![](/files/-Ml8vaLiUsHLD53HPLr2)

### Parameters

* **$query**(string) - The search query string
* **$id** (int) - Search instance ID

### Usage

```php
add_filter("asp_print_search_query", "asp_change_print_search_query", 10, 2);

function asp_change_print_search_query($query, $search_id) {
  // Do whatever with the query
  return $query;
}
```
