Searching on multiple-reference fields

The documentation for searching on references notes the following restriction:

You can only search on references on fields which link to a single entry. Fields which hold references to many entries or fields with references to assets are not supported.

To work around this we can fetch all entries, then filter by references within our application, but this is inefficient and precludes pagination.

Given this limitation, this knowledgebase article is misleading. It would be reasonable assumption that a Movie content type would allow multiple Actor references. However, the example provided would only work with a single-reference actors field.

Are there plans to remove this limitation in a future version?


Hi @matt.burtch,

That’s right. Need to think of a better example…
Could you please share your case? Is searching by multiple-reference fields the only approach?

Hey @andrey,

Our current model includes Categories and Posts: posts can belong to multiple categories, and categories have additional content (e.g. description, images, etc). Fetching posts by category references becomes problematic due to the restriction.

Another example would be adding authors to posts, then finding posts by an author reference.

There are other approaches, but none as straightforward from a content-authoring standpoint. We could use an intermediate Text/List checkbox field whose hard-coded values match category slugs, but adding/renaming categories would result in discrepancies.

Hey @matt.burtch ,

Thanks for the explanation!
You listed one of the approaches which should address this problem:

Another example would be adding authors to posts, then finding posts by an author reference.

Finding by author is something we suggested in similar cases. The scenario itself looks more natural, from how it’s setup point of view: each entry is linked with its author > searching by author shows you all entries belong to certain author.

What do you think?

Hey @andrey, @matt.burtch,

Just tried what Andrey proposed and it works perfectly. But lets say I want to get the actors infos in the same request for the files so I don’t have to make a second request. Is it currently possible ?
The point would be to have an object like so:

{ // the actor object
  name: 'dany trejo',
  birth: '01/ 01/ 1900'
  movies: [ { // the related movies objects
      name: 'machete'
    }, {
      name: 'machete in space'
    }, ...


I’m very confused by your response on Oct 20. @matt.burtch gave 2 examples… in one example, there was an author/post relationship, and in the other example, there was a category/post relationship. A post is likely to only have one author, but it could have multiple categories. I have the exact same situation where I want to search by category, where category is a multiple-reference field. Can you confirm that this is impossible, or is there some way around this limitation?

@matt.burtch @andrey

I agree, super misleading. Basically, in the example Matt points out, if the “actors” field on a “Movie” is a multi-reference, instead of a single reference, the api would error out with the following message:

You are trying to search on a reference to an unsupported type. You can only search on references to single entries

However, one thing I would point out… if you actually know the ID of the Actor, you can still search for on multi-reference fields by id.

Meaning, if all you’re trying to do is find all Movies that Danny Trejo was in, and you know what his ID is, you could adapt the query to the following, which should work:

Another idea to consider is to add an intermediate content type between Movie and Actor; call it MovieActor. This content type consists of a single reference to a Movie and a single reference to an Actor. With this type of hierarchy it is possible to search for all MovieActor entries which reference Danny Trejo and the resulting API response will include all the movies. Think of it as a join table for content types. In this situation, the Actor content type as well as the Movie content type both would not have references to the other.

This is certainly not a recommended approach for most situations and would be quite cumbersome in the editorial experience, but we have had some customers use this successfully.

Hi, did anyone find a solution to this issue? It seems strange that we cant search with multi references.


As @jason1 suggested, you can search for multi-reference fields by id.
Here is a code example to search all blog articles with the “billing” tag:

    async asyncData ({ env, params, error }) {
      let tag = await client.getEntries({
        'content_type': 'tags',
        'fields.slug': 'billing'

      if (! return error({ statusCode: 404, message: 'Tag not found' })

      let posts = await client.getEntries({
        'content_type': 'blogPost',
        '': tag.items[0]

      return {
        posts: posts.items,
        tag: tag.items[0]

Took me a while to find this post. The linked “Filter API Results” documentation did not help me understand this limitation.

Unfortunately, this is a bit of a deal-breaker for me. I don’t want to have to make multiple queries just to get a filtered result - that’s unnecessary overhead.

Only option I see is to start a lengthy process of switching to a different data source backend that supports this functionality. It’s absolutely integral to our app. Thanks for the info, community peeps! Saved me a lot of time and headaches.


Yes this seems like a very necessary feature. Filtering is a hacky solution because you can go through a huge list just to get the little info you need.


The mentioned document on filtering results with IMDB is really misleading. It takes multiple trials and errors to realize you’ll not be able to do this and finally find this thread.

I’m pretty disappointed it is not possible. It should be either added or mentioned more clearly in filtering documentation, that it is not possible.

It may affect project architecture to noticeable extend and developers shouldn’t find out about this from trial and error.


Any news regarding this feature? Are there any plans to implement it? I agree with OP and the others, being able to search on multi-reference fields would make things much easier!

This could really be trivial trying to filter entry/s through multiple reference fields. Got the same problem here where I have a Blog entry that has a tags field linked to multiple Tag entry.

It seems that the CT have no intention of allowing this type of query yet and it leaves us here hanging… trying to figure out a workaround for this problem.

Conclusion: there are workarounds for this but not ideal.

I think that @lionel & @charlie’s idea are the least adequate solutions to this problem.

  • lionel’s: get the of target reference entry(tag of the entry e.g. life) and execute another query to the target collection(e.g. Blogs) accompanied by a filter of the retrieved


    1. most certainly, you’ll need to execute one more query prior to the main query
  • charlie’s: create a separate intermediary Collection(e.g. BlogRecords) that has single reference on both tag and blog entry. This is to achieved the single query approach to retrieved all blogs belonged to a certain tag.

    1. Creating a separate collection to solve this would also mean that you have to update that collection every so often.
    2. It’d be a tedious work to update that specific collection each time an update is made on either Blog or Tag entries

We don’t know… there might be some discussed topics about this on contentful documentation about how we should model our collection so that we don’t encounter this problem

poor us😭

Hi. I’ve fallen into this trap as well. I have Services with multiple Locations and multiple LocationTypes. It would have been so easy if the query allowed a search on multiple reference fields.

I know nothing about GraphQL. Can I ask, is this possible with the GraphQL instead?

1 Like

I have hit the same roadblock using GraphQL.

1 Like

Is there any plan on the Contentful side to implement this? This seems like a very common requirement and I’m wondering if this is on the roadmap. Given that this is one of the most viewed threads in the community, I imagine this should be a priority, but it doesn’t appear there’s been an update from Contentful and whether this is even being considered.



Is there any update on searching many to many. I have also hit this roadblock. I want to search many categories for many products etc and have all the sorting and pagination taken care of. Very surprised this is not possible.

Is this is the roadmap?



we also have a roadblock here.
We have blog-posts and they can have multiple topic-tags(references to topic-tag content type) and we need to filter by 1 or more topic-tags.

Is there any update on this feature? It’s so essential.