Made in Builder.io

Join us for an AI launch event by

Builder.io and Figma
Talk to Us
Product
Developers
Talk to Us

Blog

Home

Resources

Blog

Forum

Github

Login

Signup

×

Visual CMS

Drag-and-drop visual editor and headless CMS for any tech stack

Theme Studio for Shopify

Build and optimize your Shopify-hosted storefront, no coding required

Resources

Blog

Get StartedLogin

This document is a quick reference for query operators you can use to query anything that's on your content objects.

To experiment with querying your content from within Builder, you can use the Builder API Explorer.

This document covers the following operators:

Comparison Operators

$eq

$gt

$gte

$in

$lt

$lte

$ne

$nin

Logical Operators

$and

$not

$or

$nor

Element Operators

$exists

$type

Array Operators

$elemMatch

Evaluation Operators

$regex

$options

When querying Builder data, you can use MongoDB style operators, such as:

OperatorDescription

Use to match values equal to a specified value.

Use to match values greater than a specified value.

Use to match values greater than or equal to a specified value.

Use to match any of the values you specify in an array.

Use to match values less than a specified value.

Use to match values that are less than or equal to a specified value.

Use to match all values not equal to a specified value.

Use to match none of the values specified in an array. This example excludes the numbers 50 and 51.

Use to join query clauses with a logical and and return all documents that match the conditions of both clauses.

Use to invert the effect of a query expression and return documents that do not match the query expression.

Use to join query clauses with a logical or and return all documents that match the conditions of either clause.

Use to join query clauses with a logical nor and return all documents that do not match both clauses.

Use to match documents that have the specified field.

Use to select documents if a field is of the specified type.

Use to select documents if element in the array field matches all the specified $elemMatch conditions.

Use to select documents where values match a specified regular expression.

Use to specify options to use with $regex.

For more detail about available options, refer to the MongoDB $regex documentation.

Descriptions for the above operators adapted from MongoDB per the Creative Commons License as referenced on the MongoDB Documentation GitHub repo. For more in-depth information on the query operators above, see MongoDB's documentation on Query and Projection Operators.

For more information on querying, see the Content API documentation.


Looking to hire a third party to help with your project?

Submit a project request and our partnerships team will reach out to connect you with an Expert from our partner ecosystem.

Connect with us

Was this article helpful?

Product

Visual CMS

Theme Studio for Shopify

Sign up

Login

Featured Integrations

React

Angular

Next.js

Gatsby

Get In Touch

Chat With Us

Twitter

Linkedin

Careers

© 2020 Builder.io, Inc.

Security

Privacy Policy

Terms of Service

Get the latest from Builder.io

Developer Newsletter

Latest tips, tricks, and news for frontend developers from our blog

Product Newsletter

Latest features and updates on the Builder.io platform

By submitting, you agree to our Privacy Policy

Product

Features

Pricing

What's New

Developers

Builder for Developers

Developer Docs

Open Source Projects

Performance Insights

Headless CMS: Visual Guide

Resources

Documentation

Blog

Community Forum

Templates

Partners

Submit an Idea

Use Cases

Landing Pages

Headless CMS

Headless Storefront

Customer Showcase

Customer Success Stories

Builder.io logo

Visually build and optimize digital experiences on any tech stack. No coding required, and developer approved.

Get Started

Log In

Product

Features

Pricing

Integrations

React.js

Next.js

Gatsby

Angular

Vue

Nuxt

Hydrogen

Salesforce

All Integrations

Use Cases

© 2023 Builder.io, Inc.

Security

Privacy Policy

SaaS Terms