API update for the search method.