Implement and test search API