# Content API $or query Not Working

**URL:** <https://forum.builder.io/t/content-api-or-query-not-working/4833>\
**Category:** Technical Questions\
**Created:** [January 22, 2024, 10:17am UTC](https://forum.builder.io/t/content-api-or-query-not-working/4833 "2024-01-22T10:17:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenneth-fullstack](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/kenneth-fullstack/32/3329_2.png) [@kenneth-fullstack](https://forum.builder.io/u/kenneth-fullstack)\
**Post date:** [January 22, 2024, 10:17am UTC](https://forum.builder.io/t/content-api-or-query-not-working/4833/1 "2024-01-22T10:17:55Z")

</div>

I try using $or query is not working. Please help me. Thanks

export const getAllBuilderDataModel = async ({ model, query }: getAllBuilderDataModelProps) =\> {  
const response = await builder.getAll(model, {  
fields: ‘data’,  
options: { noTargeting: true },  
query  
})

return response  
}

const query = {  
‘data.resourceInfo.$or’: [  
{ mainTag: { $eq: mainTag, $options: ‘i’ } },  
{ tag: { $in: selectedTypes } },  
{ eyebrow: { $regex: searchValue, $options: ‘i’ } },  
{ description: { $regex: searchValue, $options: ‘i’ } }  
]  
}  
const resources = await getAllBuilderDataModel({ model, query })

---

<div class="post-metadata">

**Author:** ![manish-sharma](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@manish-sharma](https://forum.builder.io/u/manish-sharma)\
**Post date:** [January 22, 2024, 4:47pm UTC](https://forum.builder.io/t/content-api-or-query-not-working/4833/2 "2024-01-22T16:47:21Z")

</div>

Hello @kenneth-fullstack,

For help on using $or operator, please refer to the below forum post

> [@REST API query $or doesnt seem to properly work](https://forum.builder.io/t/rest-api-query-or-doesnt-seem-to-properly-work/4835/4):
>
> Hello @djkenneth, Here is an example that is working for us const articles = await builder.getAll('blog-article', { // Include references, like the `author` ref options: { includeRefs: true }, limit: articlesPerPage, query: { 'data': { "$or": [{ "title": { "$eq": "Qwik Blog" } }, { "title": { "$eq": "Partytown blog" } }] } } })
