# Plex API - get show metadata with folder location and possibly extras

**URL:** https://forums.plex.tv/t/plex-api-get-show-metadata-with-folder-location-and-possibly-extras/938006
**Category:** Dev/API Corner
**Tags:** pms-api
**Created:** [April 15, 2026, 4:46am UTC](https://forums.plex.tv/t/plex-api-get-show-metadata-with-folder-location-and-possibly-extras/938006 "2026-04-15T04:46:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![umamaheshwarreddy](https://avatars.discourse-cdn.com/v4/letter/u/779978/32.png) [@umamaheshwarreddy](https://forums.plex.tv/u/umamaheshwarreddy)
#### Post date: [April 15, 2026, 4:46am UTC](https://forums.plex.tv/t/plex-api-get-show-metadata-with-folder-location-and-possibly-extras/938006/1 "2026-04-15T04:46:07Z")

</div>

I am trying to get the library items metadata from plex API (referencing [https://developer.plex.tv/pms/](https://developer.plex.tv/pms/)).

Here’s what I have done so far:

- Got the Auth Token Request figured out - successfully able to use OAuth to get the Token
- Got the library sections from api using `{self.server_url}/library/sections`
- Now I am trying to get the media metadata with folder path, GUIDs, Extras (if possible). I tried using `{self.server_url}/library/sections/{section_key}/all?includeGuids=1&includeDetails=1` and also `{self.server_url}/library/sections/{section_key}/all?includeGuids=1&includeDetails=1`
- Also tried adding extra query parameters like `includeExtras=1`, `includeFields=OnDeck,Extras`, `includeOptionalFields=OnDeck,Extras`. No luck.

Now here’s my problem:

- When I use the `/library/sections/{sectionKey}/all` it works for movies to get GUIDs, media file path, but not extras in the same request. Also, didn’t find an API call to get extras info for all items in a single call (or paginated). Requesting extras for 1 movie at a time didn’t seem like a good solution. And for shows section this doesn’t include any media file/folder paths - which is a requirement for my use case.
- When I use the `/library/sections/{sectionKey}/allLeaves` it works for both movies and shows, but not extras, or GUIDs for shows as this is episode data for shows section. So, to get the GUIDs I need to make another call to the `/library/sections/{sectionKey}/all` endpoint - which doesn’t seem like a good solution either.

The API documentation does have a section for “Response Customization”, wasn’t able to figure how to customize the responses with the GUIDs. file/folder path, and Extras.

Has anyone figured it out? Can someone please help?

---

<div class="post-metadata">

### Author: ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)
#### Post date: [April 15, 2026, 9:59am UTC](https://forums.plex.tv/t/plex-api-get-show-metadata-with-folder-location-and-possibly-extras/938006/2 "2026-04-15T09:59:11Z")

</div>

When you go to endpoint `all` you should use Pagination  
Ref: [https://developer.plex.tv/pms/#section/API-Info/Pagination](https://developer.plex.tv/pms/#section/API-Info/Pagination)

When said, what’s returned will show you a key/value entry like: `key="/library/metadata/9036"`

So you need an additional call to the value to get more info, as well as use extra query parameters

---

<div class="post-metadata">

### Author: ![umamaheshwarreddy](https://avatars.discourse-cdn.com/v4/letter/u/779978/32.png) [@umamaheshwarreddy](https://forums.plex.tv/u/umamaheshwarreddy)
#### Post date: [April 22, 2026, 10:08pm UTC](https://forums.plex.tv/t/plex-api-get-show-metadata-with-folder-location-and-possibly-extras/938006/3 "2026-04-22T22:08:40Z")

</div>

Apologies for the delayed response, but yes, I know about pagination and I am already using it - otherwise I would get a huge json file which increases memory usage in my app.

I can fetch the metadata of the library item but what I am trying to find out is if I can somehow tweak the `all` or `allLeaves` query with `include*`, `includeFields`, `includeOptionalFields` etc to get that in a single call (which I can run in a loop with pagination) instead of doing individual calls one for each item.

I created a new library sections, one with about 20 movies and other with like 3 shows the other day, gave the Plex API doc to claude along with a JWT token (temporary as I later removed it from authorized sources) and asking it to explore different API calls and experiment with the available options. And it could not find a query to get extras in `all` or `allLeaves` and calling individually on the media item seems like the only option at this point.

---

<div class="post-metadata">

### Author: ![dane22](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dane22/32/4389_2.png) [@dane22](https://forums.plex.tv/u/dane22)
#### Post date: [April 22, 2026, 10:10pm UTC](https://forums.plex.tv/t/plex-api-get-show-metadata-with-folder-location-and-possibly-extras/938006/4 "2026-04-22T22:10:34Z")

</div>

Sadly, there’s no such thing as a single call, AFAIK

---

<div class="post-metadata">

### Author: ![umamaheshwarreddy](https://avatars.discourse-cdn.com/v4/letter/u/779978/32.png) [@umamaheshwarreddy](https://forums.plex.tv/u/umamaheshwarreddy)
#### Post date: [April 23, 2026, 1:27am UTC](https://forums.plex.tv/t/plex-api-get-show-metadata-with-folder-location-and-possibly-extras/938006/5 "2026-04-23T01:27:15Z")

</div>

Yeah, that’s what I realized but by using claude to explore the API, it gave me a query with `excludeOptions` so that my app doesn’t have to fetch all the data from Plex it isn’t gonna use.

I now fetch the movie and shows at first and only get extras when needed.

Appreciate the help though. Thank you!
