How to use search in Plex Web-URL?

Can please somebody explain how to use search or filter with a Web-URL? When I use this I always get 404 errors.

If I use the following Web-URL I get a list of possible actions - one of them is “search”. But I don’t know how to use the search and what the type stands for (7 is my movie library):

http://192.168.178.100:32400/library/sections/7

returns 

[...]
<Directory prompt="Search Filme" search="1" key="search?type=1" title="Search..."/>
[...]

Thanks in advance.

Can you share a little bit more about your goal - why do you want to search like that?

There’s a little bit of documentation about the Plex URL interface here:

https://support.plex.tv/articles/201638786-plex-media-server-url-commands/

More here - but quite old:

Plex Web API Overview · Arcanemagus/plex-api Wiki · GitHub

Or the Python PlexAPI project is easy to use and pretty rich. Also a good way to learn more about the API itself.

PlexAPI · PyPI

I do have something around 20 Python scripts that do, mostly daily, things with the Plex content. I export the XML files, fanarts, thumbs, rename files according to the new Plex Movie Scanner and so on. All scripts use the Plex Web-URLs. It’s fast, easy and with the help of a XML parser written within a handful of Python code.

As I don’t want to search within the Plex GUI and wait for the thumbs, I want to search with the help of the Web_URL. But none of the examples work. All example from the first two links, regarding search or filter, end in HTTP error 404. I get the error with the local Plex Web and with the plex.app.

So I really want to know how to use search and filter within Web-URL.

Ah, one of the reason I want to do stuff myself is the lack of human readable timestamps in Plex output. One thing I want to know is the timestamp of the file holding the content in human readable form. In every Plex output this timestamp is a Unix-Timestamp. My scripts return everything in human readable form.

Ok, found what I need.

The official Plex documentation on search and filter with the help of Web-URLs is wrong. The source code of the unofficial Plex API bindings did shed some light on this. Two examples just in case somebody is in a similar situation:

Search for title in all libraries:
YourPlexServerIP/library/all?title=SearchText&X-Plex-Token=YourPlexToken

Search for title in a specified library:
YourPlexServerIP/library/sections/LibraryKey/all?title=SearchText&X-Plex-Token=YourPlexToken

You get the idea.

1 Like

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