Typically it is added to the URL as a query string. So you should be able to use a macro or C# to get the value.
{% QueryString.GetValue("searchtext") |(identity)GlobalAdministrator%}
If you're using an actual filter it might be a bit more difficult as you would need access to those filters.