# Content API queries

**URL:** <https://forum.builder.io/t/content-api-queries/2933>\
**Category:** Technical Questions\
**Created:** [November 27, 2022, 7:07am UTC](https://forum.builder.io/t/content-api-queries/2933 "2022-11-27T07:07:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![karlo.medallo](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@karlo.medallo](https://forum.builder.io/u/karlo.medallo)\
**Post date:** [November 27, 2022, 7:07am UTC](https://forum.builder.io/t/content-api-queries/2933/1 "2022-11-27T07:07:08Z")

</div>

**Builder public api key**  
de02ccd6d7a445df9a0fb721c02fcb41

**What are you trying to accomplish**  
I’m trying to work on some queries to get CMS data

**Screenshots or video link**

**Code stack you are integrating Builder with**  
NextJS

So as a summary of the video, I am unsure why I am unable to query “url” with  
“query.data.url” or “query.data.url.$eq” but it works with just “url”

My understanding is that once I get the shape of my data without specifying any query, I would be able to apply a query on it as per the shape structure. That doesn’t work for me.

Lastly, how do I enter a $regex query in API explorer? How do I code that in builder.getContent call? Please use: `/\/dashboard.*/gi` as an example

Thanks!

---

<div class="post-metadata">

**Author:** ![anon43891756](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anon43891756](https://forum.builder.io/u/anon43891756)\
**Post date:** [November 28, 2022, 5:25pm UTC](https://forum.builder.io/t/content-api-queries/2933/2 "2022-11-28T17:25:08Z")

</div>

Hi @karlo.medallo, Welcome to [Builder.io](http://Builder.io) Forum!

You can find some more details about this here: [Querying Cheatsheet - Builder.io](https://www.builder.io/c/docs/querying#regex)

> [@API data query filtering](https://forum.builder.io/t/api-data-query-filtering/1959):
>
> Hey! I would like to write a query for for my endpoint with these conditions: My data is localized: [https://cdn.builder.io/api/v2/content/help-data?apiKey=32f148657e2646be8562eb4e6ebfa190](https://cdn.builder.io/api/v2/content/help-data?apiKey=32f148657e2646be8562eb4e6ebfa190) Here is an example result for it: [image] Example: query string= ‘question’, locale= 'en’ My conditions: I would like to search in my specific locale AND Search in the title OR the description property (case insensitive and search or description includes my query string) I tried something, but it is …

---

<div class="post-metadata">

**Author:** ![karlo.medallo](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@karlo.medallo](https://forum.builder.io/u/karlo.medallo)\
**Post date:** [November 28, 2022, 11:45pm UTC](https://forum.builder.io/t/content-api-queries/2933/3 "2022-11-28T23:45:41Z")

</div>

Thanks for your reply, but it still does not work. I think matching against “data.url” is not working. as you can see in my video, even a regular $eq does not work.

Is this a limitation? Can I only match against custom fields I created?

---

<div class="post-metadata">

**Author:** ![anon43891756](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anon43891756](https://forum.builder.io/u/anon43891756)\
**Post date:** [November 30, 2022, 6:54am UTC](https://forum.builder.io/t/content-api-queries/2933/4 "2022-11-30T06:54:10Z")

</div>

Hi @karlo.medallo

I think you just need to fix the query. Try this in the API explorer, it should work

 ![image](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/0/012f0ac220cf3eed54efaa934ff45c9de9c17518.png)

You may find more details about this here: [Builder.io Content API - Builder.io](https://www.builder.io/c/docs/query-api#:~:text=Your%20API%20key-,userAttributes,-No)

Let us know if you have further questions!

---

<div class="post-metadata">

**Author:** ![vrio\_dave](https://avatars.discourse-cdn.com/v4/letter/v/54ee81/32.png) [@vrio\_dave](https://forum.builder.io/u/vrio_dave)\
**Post date:** [March 20, 2023, 10:26am UTC](https://forum.builder.io/t/content-api-queries/2933/5 "2023-03-20T10:26:59Z")

</div>

Just for anyone who stumbles across this as I did, `.$eq` didn’t seem to work for me at all. To query data, I had to do the following:

```auto
query: {
  'data.customAttribute': 'query-value'
}

```

And that even worked with a JSON field nested property:

```auto
query: {
  'data.customJsonData.customNestedProp': 'query-value'
}

```

It’s unfortunate that (again) the incorrect documentation cost me even more time.
