API: Searching for a specific record?

Personally, I use XML with XPath :wink:
But yes, json has less overhead over the wire, but, and unsure here, but suspect XML is native to PMS, and json more or less translated from that, before been transferred to the req.

Reason for thinking so, is that all I’ve seen from Plex them self, was using XML

Initially Plex was definitely using XML natively, but if you look at the web app, all communication with Plex is now done over JSON. Yeah the majority of my coding is done with PHP and json_decode($response,true); to turn the data into an array which let’s me use all the native array functions, is just easier than mucking about with trying to parse XML in to an array.

True, but I’m a masochist :smiley:

1 Like

I’m using golang so for me xml or json doesnt matter, I just prefer json. I’ll take note of the paging, it likely isnt an issue to add.

When you got the key of the show, use:

http://PMS_IP:32400/library/metadata/KEY/tree?type=4&X-Plex-Token=YOUR_TOKEN

But strongly advice, that you use paging for that, since if like Simpsons, the amout of episodes are huge

Edit: added type param to only return episodes

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