Try 30 days of free premium.

List of popular shows

deleted wrote 9 years ago: 1

Unfortunately we do not. The only way you can find our most popular shows is to use those filters for most popular in the show section.

iamraymondt wrote 9 years ago: 1

Are there any plans of adding a sorting functionality to the API?


david wrote 9 years ago: 1

I'm not sure. In general it's not our intention to make advanced sorting/filtering functions available in the API.

If you want this, you could always download the complete list of shows (see http://www.tvmaze.com/api Show Index) and sort them by the "weight" property yourself.


gazza911 wrote 9 years ago: 1

I'm not going to say that it's as efficient as possible, but I've created some functions to do the sorting for you - for the 10 results that you receive; the results themselves aren't different - I will most likely not continue to work on it.

Note: This would allow you to sort by anything - i.e if you want you can sort by Network name (show.network.name), or premier date (show.premiered), etc.

Removed code from here due to formatting / line spaces, etc

Here you go: https://anotepad.com/notes/de6eh6

You would use it like this:

sorted = sortArray(data, "show.weight", "desc");

As an example: searching for "Outside", the popular 2016 show "Outsiders" is listed as 4th, whereas its weight makes it 1st

seanabrahams wrote 9 years ago: 1

Really love your service. I recognize this likely won't happen but it would be great to have this API endpoint. You're already doing it for the http://www.tvmaze.com/shows page; perhaps you can reuse the code for the API.

Something like: http://api.tvmaze.com/shows/popular?page=1

Or: http://api.tvmaze.com/shows?sortby=popularity&sortby_direction=desc&page=1

I appreciate that I can download your entire paginated index, however it's unfortunate to do something so resource intensive for such a simple query. Thanks again for TVmaze and having an API in the first place!


david wrote 9 years ago: 2

Thanks for the warm feedback :)

Our vision currently still doesn't include adding calls like these. Obviously it wouldn't be very hard to add, but serving a single static list is immensely cheaper on our resources than offering sorting or filters. Since we get many tens of millions of API calls a day we have to be conservative here. Perhaps these could be part of a paid/donation part of the API in the future or something!

Try 30 days of free premium.