# Http/Xml api

**URL:** <https://forums.plex.tv/t/http-xml-api/5384>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [September 17, 2010, 3:38pm UTC](https://forums.plex.tv/t/http-xml-api/5384 "2010-09-17T15:38:14Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![nadocrew](https://avatars.discourse-cdn.com/v4/letter/n/aca169/32.png) [@nadocrew](https://forums.plex.tv/u/nadocrew)\
**Post date:** [September 17, 2010, 3:38pm UTC](https://forums.plex.tv/t/http-xml-api/5384/1 "2010-09-17T15:38:14Z")

</div>

how do I access it
Can someone explain to me how to access the http/xml api so that i can view my library in xml form. If there is documentation somewhere it would be great.

---

<div class="post-metadata">

**Author:** ![drensin](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@drensin](https://forums.plex.tv/u/drensin)\
**Post date:** [September 17, 2010, 7:49pm UTC](https://forums.plex.tv/t/http-xml-api/5384/2 "2010-09-17T19:49:43Z")

</div>

> [@](#):
>
> Can someone explain to me how to access the http/xml api so that i can view my library in xml form. If there is documentation somewhere it would be great.

  
  
  
Easy as pie! I have Chrome as a browser, so I'll guide you from that. Type in the following: view-source:yourserver:32400 (obviously replacing yourserver with the real name of your PLex/Nine box. You should see:  
  
  
  
  
  
  
  
  
  
  
  
The really important part of this is the "key" attribute. Suppose we want to see a list of our video plugins, we just append the key "video" to the end of our current url:  
  
thus... view-source:http://yourserver:32400/video should get us something like:  
  
  
  
  
  
  
  
  
  
  
  
  
and so on and so on... I imagine the uri you'll most want to start with is /library/sections. That's where all your tv shows, movies, etc are rooted...  
  
hope this helps/  
  
-dave

---

<div class="post-metadata">

**Author:** ![atrus](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/atrus/32/31_2.png) [@atrus](https://forums.plex.tv/u/atrus)\
**Post date:** [September 17, 2010, 10:18pm UTC](https://forums.plex.tv/t/http-xml-api/5384/3 "2010-09-17T22:18:39Z")

</div>

> [@](#):
>
> Easy as pie! I have Chrome as a browser, so I'll guide you from that. Type in the following: view-source:yourserver:3240

  
I assume that was a typo. 32400 is should be =)

---

<div class="post-metadata">

**Author:** ![nadocrew](https://avatars.discourse-cdn.com/v4/letter/n/aca169/32.png) [@nadocrew](https://forums.plex.tv/u/nadocrew)\
**Post date:** [September 18, 2010, 2:54am UTC](https://forums.plex.tv/t/http-xml-api/5384/4 "2010-09-18T02:54:57Z")

</div>

that is perfect!  
  
  
  
Thanks

---

<div class="post-metadata">

**Author:** ![nadocrew](https://avatars.discourse-cdn.com/v4/letter/n/aca169/32.png) [@nadocrew](https://forums.plex.tv/u/nadocrew)\
**Post date:** [September 18, 2010, 3:33am UTC](https://forums.plex.tv/t/http-xml-api/5384/5 "2010-09-18T03:33:21Z")

</div>

If there is any way you could add the TMDB or IMDB id to the api, I would really appreciate it. It would help me to match movies to my current database.

---

<div class="post-metadata">

**Author:** ![por](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@por](https://forums.plex.tv/u/por)\
**Post date:** [September 19, 2010, 7:58pm UTC](https://forums.plex.tv/t/http-xml-api/5384/6 "2010-09-19T19:58:00Z")

</div>

Using this api, is there a way to start a movie/song in Plex?

---

<div class="post-metadata">

**Author:** ![drensin](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@drensin](https://forums.plex.tv/u/drensin)\
**Post date:** [September 20, 2010, 12:36am UTC](https://forums.plex.tv/t/http-xml-api/5384/7 "2010-09-20T00:36:58Z")

</div>

> [@](#):
>
> I assume that was a typo. 32400 is should be =)

  
  
correct you are! I'll fix that!  
  
-dave :-)

---

<div class="post-metadata">

**Author:** ![drensin](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@drensin](https://forums.plex.tv/u/drensin)\
**Post date:** [September 20, 2010, 12:39am UTC](https://forums.plex.tv/t/http-xml-api/5384/8 "2010-09-20T00:39:34Z")

</div>

> [@](#):
>
> Using this api, is there a way to start a movie/song in Plex?

  
  
For that, your best bet is to google the old XMBC remote http commands. They still work in Plex and it's how most of us do exactly what you're asking.  
  
-dave :-)

---

<div class="post-metadata">

**Author:** ![aogle](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@aogle](https://forums.plex.tv/u/aogle)\
**Post date:** [September 27, 2010, 5:37am UTC](https://forums.plex.tv/t/http-xml-api/5384/9 "2010-09-27T05:37:13Z")

</div>

> [@](#):
>
> For that, your best bet is to google the old XMBC remote http commands. They still work in Plex and it's how most of us do exactly what you're asking.  
>   
> -dave :-)

  
  
  
Could you post an example of how to do that please?

---

<div class="post-metadata">

**Author:** ![sansnipple](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@sansnipple](https://forums.plex.tv/u/sansnipple)\
**Post date:** [September 28, 2010, 7:10am UTC](https://forums.plex.tv/t/http-xml-api/5384/10 "2010-09-28T07:10:44Z")

</div>

you should probably try to use the new remote api, see here: [http://forums.plexapp.com/index.php?/topic/15850-plex-9-remote-api/page\_\_view\_\_findpost\_\_p\_\_101671](http://forums.plexapp.com/index.php?/topic/15850-plex-9-remote-api/page __view__ findpost __p__ 101671)

---

<div class="post-metadata">

**Author:** ![lastiko](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@lastiko](https://forums.plex.tv/u/lastiko)\
**Post date:** [September 28, 2010, 8:10pm UTC](https://forums.plex.tv/t/http-xml-api/5384/11 "2010-09-28T20:10:51Z")

</div>

Hello   
  
  
  
i have a little problem, when i try to connect to plex with Terminal and send a GET /library/sections/  
  
  
  
i received an error ,   
  
  
  
  
  
HTTP/1.0 400 Bad Request  
  
Content-Length: 89  
  
Content-Type: text/html  
  
X-Plex-Protocol: 1.0

Bad Request
# 400 Bad Request
Connection closed by foreign host.  
  
  
Any idea ?

---

<div class="post-metadata">

**Author:** ![erlendv](https://avatars.discourse-cdn.com/v4/letter/e/7ea924/32.png) [@erlendv](https://forums.plex.tv/u/erlendv)\
**Post date:** [September 29, 2010, 7:22pm UTC](https://forums.plex.tv/t/http-xml-api/5384/12 "2010-09-29T19:22:34Z")

</div>

Hi  
  
  
  
This is looking interesting. I have a couple of questions about the api:  
  
In a music section, there is a “Search for artists” and “Search for tracks” directories, what should the search parameter be (for example [http://localhost:32400/library/sections/3/search?type=8&](http://localhost:32400/library/sections/3/search?type=8&) **searchparameter** =Depeche%20Mode ) ?  
  
  
  
In an album directory, the tracks are listed with a Part element. This element has 2 attributes, key and file. file contains the location of the file on disk, but what about the key attribute? When I try to open it (for example [http://localhost:32400/library/parts/2564/10%20-%20Black%20Lung.mp3](http://localhost:32400/library/parts/2564/10%20-%20Black%20Lung.mp3) ) I get a 404 not found. My first thought was that this maybe would open a stream to the file from the media server. Is it possible to open a stream to files?  
  
  
  
Best regards,  
  
Erlend

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 8:46pm UTC](https://forums.plex.tv/t/http-xml-api/5384/13 "2019-12-20T20:46:22Z")

</div>

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