# Multiple custom-types data using a single query

**URL:** <https://community.prismic.io/t/multiple-custom-types-data-using-a-single-query/1217>\
**Category:** Developing with Prismic\
**Tags:** javascript\
**Created:** [July 14, 2020, 3:13pm UTC](https://community.prismic.io/t/multiple-custom-types-data-using-a-single-query/1217 "2020-07-14T15:13:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![renee.coman](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@renee.coman](https://community.prismic.io/u/renee.coman)\
**Post date:** [July 14, 2020, 3:13pm UTC](https://community.prismic.io/t/multiple-custom-types-data-using-a-single-query/1217/1 "2020-07-14T15:13:35Z")

</div>

Hi Team,

I had 4 custom types namely questions, topics, programs, lessons. I had 4-5(a,b,c,d,e) tags related to content corresponding to those types. Now I need to query content having tags a,b,c,d,e. It should hold 5 items for each custom type. Do we have a query to get results in this model?

Trying something like a query which filters data for  
Prismic.Predicates.at('document.tags', ['a', 'b', 'c', 'd','e']) as well as  
Prismic.Predicates.any('document.type', ['questions', 'topics', 'lessons' , 'programs'])

At the end I need 5questions + 5topics + 5lessons + 5programs for tag 'a' and so on

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [July 15, 2020, 7:28pm UTC](https://community.prismic.io/t/multiple-custom-types-data-using-a-single-query/1217/2 "2020-07-15T19:28:29Z")

</div>

Hey Renee, welcome to the community forum!

I’ll guess that you’re using the [Prismic’s default tagging system](https://user-guides.prismic.io/en/articles/2690038-prismic-s-default-tagging-system). If you are the suggested predicates that you showed would be the correct approach, that one allows you to get all the existing tags.

You could also try and implement a [Custom Tagging System](https://user-guides.prismic.io/en/articles/2033431-create-a-custom-tagging-system) if you need to have more control over how these Custom types relate to each other. Then you’ll be able to [query all the documents linked to any given custom tag](https://prismic.io/docs/rest-api/query-the-api/query-by-content-relationship).

---

<div class="post-metadata">

**Author:** ![Fares](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@Fares](https://community.prismic.io/u/Fares)\
**Post date:** [September 22, 2020, 2:32pm UTC](https://community.prismic.io/t/multiple-custom-types-data-using-a-single-query/1217/3 "2020-09-22T14:32:42Z")

</div>

This issue has been closed due to inactivity.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 5:31pm UTC](https://community.prismic.io/t/multiple-custom-types-data-using-a-single-query/1217/4 "2021-12-09T17:31:52Z")

</div>


