Added search method to API controller