Implemented search API endpoint