api with sort and limit