# Genre information in database

**URL:** <https://forums.plex.tv/t/genre-information-in-database/579259>\
**Category:** Metadata & Adding Files\
**Tags:** server-windows\
**Created:** [April 23, 2020, 4:52am UTC](https://forums.plex.tv/t/genre-information-in-database/579259 "2020-04-23T04:52:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Novalak](https://avatars.discourse-cdn.com/v4/letter/n/e9a140/32.png) [@Novalak](https://forums.plex.tv/u/Novalak)\
**Post date:** [April 23, 2020, 4:52am UTC](https://forums.plex.tv/t/genre-information-in-database/579259/1 "2020-04-23T04:52:34Z")

</div>

I am trying to get a list of movies that are under a certain genres (via the database) and apply them to collections (via the API)

Under the table metadata\_items i can see tags\_genre i can see a maxium of 2 genres but if i go through the frontend, i can see 3 or more

The question is, where is the genre information stored so i can do some more complex matching

---

<div class="post-metadata">

**Author:** ![NewPlaza](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/newplaza/32/128634_2.png) [@NewPlaza](https://forums.plex.tv/u/NewPlaza)\
**Post date:** [April 23, 2020, 7:23am UTC](https://forums.plex.tv/t/genre-information-in-database/579259/2 "2020-04-23T07:23:37Z")

</div>

Perhaps this will help

> [@\[REL\] ExportTools](https://forums.plex.tv/t/rel-exporttools/175915/346):
>
> @damtor, @dane22 Here are the commands you need to export genre. SELECT id,title\_sort,title,tags\_genre FROM metadata\_items WHERE library\_section\_id=1 -- Result: 2 rows returned 1|Alpha|Alpha|Adventure|Drama 13|Annihilation|Annihilation|Adventure|Drama SELECT tag FROM tags WHERE id IN (SELECT tag\_id FROM taggings WHERE metadata\_item\_id=1) AND tag\_type=1; -- Result: 6 rows returned Adventure CoolnessMan Drama Family PlexDanceMe TagJustForAlpha!! SELECT tag FROM tags WHERE id IN…

---

<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:** [July 22, 2020, 7:23am UTC](https://forums.plex.tv/t/genre-information-in-database/579259/3 "2020-07-22T07:23:49Z")

</div>

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