Change search api to have flexible arguments.