add search method to API