improved api methods with search, pagination and sorting