basic search api implementation