Updated apiSearch method.