added a basic search api function