complete API for searchNotes