These endpoints don't offer a way to have subfolders listed first, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.
Do you have other any api which will satisfy my condition, which I can use?
No, the API doesn't offer anything else quite like that. You'll need to retrieve all of the results and apply whatever sorting you want client-side.