SearchAPI Autocomplete - Pass in contextual filter to alter query
I ran into the same issue.
You could save your data in a session in hook_init or hook_boot.

/**
 * Implements hook_init().
 */
function hook_init() {
  $arg = arg();
  if (isset($arg[2]) &amp;&amp; $arg[0] == 'taxonomy' &amp;&amp; $arg[1] == 'term' &amp;&amp; is_numeric($arg[2]) ) {
    $_SESSION['last_term'] = $arg[2];
  }
}