Add sorting option to demo API