API query not working

This is my api call:
https://cdn.builder.io/api/v3/content/users?apiKey=b8fd029ade9445d392e2b0476a500a3f
&enrich=true
&limit=1
&fields=id,name,data.offering%5B0%5D.object.value.name
&includeRefs=true

and this is the response

{
  "results": [
    {
      "id": "670815d358294f128932ce4143c2368a",
      "name": "Henry",
      "data": {
        "offering": [
          {
            "object": {
              "value": {
                "name": "Sukuna"
              }
            }
          }
        ]
      }
    }
  ]
}

I am trying to display results that have names, but when I try to add
&query.data.offering.object.value.name.$exists=true

I just get an empty response… Why? name clearly exists
Is this a bug?

Hi @goldencarrot,

Welcome to the builder.io forum post.

Currently, the Builder.io Content API does not support querying deeply nested reference fields directly via the query parameter. The offering → object is a reference field type. Therefore, you can follow this structured approach to retrieve the necessary data:

Step 1: Fetch Data with References
Make an API call to retrieve your data, including the references.

Step 2: Fetch Reference Details
For each reference in the offering array, perform additional API calls to fetch the details of those references.

Step 3: Filter Client-Side
After gathering all the data, filter it based on the name field in the reference data.

For more detailed guidance, you can also visit our documentation here:

If you have any further questions, feel free to ask!