Reputation: 1894
I am using google youtube data api v3 to get videos in a playlist. Everything is fine but I want the final result to be sorted by date. How can I accomplish this?
Following is my query
https://www.googleapis.com/youtube/v3/playlistItems?key={my_api_key}&playlistId=PLxtF39cCOsxehnvwzlYT0R5h8dh4y3Lp2&part=snippet,contentDetails&maxResults=50&fields=items(snippet/title,snippet/publishedAt,snippet/resourceId/videoId)
Upvotes: 4
Views: 1845
Reputation: 292
You can set sort order in the playlist settings API will return results in that order.
Upvotes: 0
Reputation: 21
Since this option to "pre-sort" the results from API is not yet available, you would have to manually do it.
In theory this should work. I will be testing this out later on.
Upvotes: 2
Reputation: 12877
This feature request is reported internally. You can create a ticket to track.
Upvotes: 0