For Drupal 7 I found a workaround to a similar situation here, when combining Core search block forms and search api contextual filters. This "workaround" won't work when using Search API, if you don't want the Contextual Filter in your view.
My current setup:
I am using Search API, with a database server, and displaying the results with a Views page. I am using Search: Fulltext search (exposed) and Exposed form in block:Yes for the search block form.
What I am trying to achive:
I would like to put what was searched for in the Header of the view, and also at the top of No Results Behavior like this:
"You searched for bananas"
The problem:
When using Search: Fulltext search (exposed), the replacement patterns for the input value are not available in the Global Text Area. They are only available by adding a Fulltext Search Contextual Filter. There is an issue for this with a patch for Drupal 8 here.
My question:
Is there a views_pre_render
or some other hook that can be used for the Header or No Results region to output the value that was input into the Search: Fulltext search (exposed) form?
There is a dev module to create a token, but it only works for the Results Summary.