improve search API