# Plex Server - API DVR

**URL:** <https://forums.plex.tv/t/plex-server-api-dvr/356284>\
**Category:** Dev/API Corner\
**Tags:** livetv-dvr\
**Created:** [January 1, 2019, 9:34pm UTC](https://forums.plex.tv/t/plex-server-api-dvr/356284 "2019-01-01T21:34:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![karlos1337](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@karlos1337](https://forums.plex.tv/u/karlos1337)\
**Post date:** [January 1, 2019, 9:34pm UTC](https://forums.plex.tv/t/plex-server-api-dvr/356284/1 "2019-01-01T21:34:59Z")

</div>

Hi all,

I want to integrate the plex DVR into my home automatisation application. This means that I want to make subscriptions and so on over my application instead plex web.  
I wonder if there is some documentation about the URLs/API itself. For example I would be interested in retrieving the EPG for a specific channel for the upcoming days. Not all EPGs of all channels like it is in the grid (PLEX WEB).

Does anyone have an idea for that?

Thanks.

---

<div class="post-metadata">

**Author:** ![nokdim](https://avatars.discourse-cdn.com/v4/letter/n/7ab992/32.png) [@nokdim](https://forums.plex.tv/u/nokdim)\
**Post date:** [January 1, 2019, 9:50pm UTC](https://forums.plex.tv/t/plex-server-api-dvr/356284/2 "2019-01-01T21:50:57Z")

</div>

You can use a service like mc2xml to get your epg data for whatever channels you want without talking to Plex at all. That is one piece but you will need additional work to interact with the DVR system itself which again might be easier to accomplish outside of Plex.

---

<div class="post-metadata">

**Author:** ![mcqweb](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@mcqweb](https://forums.plex.tv/u/mcqweb)\
**Post date:** [January 4, 2019, 1:14pm UTC](https://forums.plex.tv/t/plex-server-api-dvr/356284/3 "2019-01-04T13:14:55Z")

</div>

I don;t think you can get full EPG for 1 channel but you can do it by type, for example

[http://x.x.x.x:32400/tv.plex.providers.epg.onconnect:16/sections/](http://x.x.x.x:32400/tv.plex.providers.epg.onconnect:16/sections/) **2** /all?type= **2** &channel= **3** &X-Plex-Container-Start=0&X-Plex-Container-Size=1150&X-Plex-Product=Plex%20Web&X-Plex-Version=3.77.4&X-Plex-Platform=Chrome&X-Plex-Platform-Version=71.0&X-Plex-Sync-Version=2&X-Plex-Device=Windows&X-Plex-Device-Name=Chrome&X-Plex-Device-Screen-Resolution=1920x969%2C1920x1080&X-Plex-Token=&X-Plex-Language=en-GB&X-Plex-Text-Format=plain

Will give you all Shows on channel id 3, change the second **2** in bold to a 4 and it will give you all episodes  
Change both bold **2** s to 1 and it will get movies on the same channel

For an idea how to send a subscription request have a look at some of my scripts, in particular  
[AutoSchedule.py](https://github.com/mcqweb/plexScripts/blob/master/autoSchedule.py)  
[episodeKeyword.py](https://github.com/mcqweb/plexScripts/blob/master/episodeKeyword.py)  
[DVRShows.py](https://github.com/mcqweb/plexScripts/blob/master/DVRShows.py)

These were written for me so there’s a bit of hard coding going on but it shouldn’t take much to adapt to your needs.

---

<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:** [April 4, 2019, 1:19pm UTC](https://forums.plex.tv/t/plex-server-api-dvr/356284/4 "2019-04-04T13:19:15Z")

</div>

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