Is there an API endpoint for retrieving a TvShow library with all the seasons, episodes and episode data in one request

Hi there,

I’m developing a Plex statistics tool and I’m struggling to fully retrieve all the media data contained within a tv-show Plex library.

As an example:

  1. I fire an request to retrieve all the media in an library, if its an movie library I get all the movies, with the movie data and if there are any parts, I get those as well.

http://255.255.255.255:5000/library/sections/10/all?X-Plex-Token=asdasdasd_sdfsdfsdffs

  1. But if its a tvShow library, then it is expected of me (I assume) to then fire a metadata request for every tvShow, then for every season to retrieve all episode data.

http://255.255.255.255:5000/library/metadata/99999/children?X-Plex-Token=asdasdasd_sdfsdfsdffs
Returns the seasons of a tvshow

And then for every season:

http://255.255.255.255:5000/library/metadata/77777/children?X-Plex-Token=asdasdasd_sdfsdfsdffs
Returns the episodes of that season

This is incredibly inefficient as my test servers get easily overloaded, and request start timing out if I even attempt to do parallel requests.

So my question, Is there an API endpoint (or query parameters) which will return the full dataset of a tvShow library with tvshows → seasons → episodes → episodeData → episodeParts (if any)?

Thanks in advance!

No, and also note, that pulling all items in one go is not recommended, since it put’s unneeded locks on the database until completed

I strongly recommend using paging

And you can take a peak here to see how I do it:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.