update search method in api class