---
description: Reference for the 11 comparison operators available in Flagship targeting rule conditions, including equality, comparison, string, and array operators.
title: Operators
image: https://developers.cloudflare.com/og-docs.png
---

[Skip to content](#main-content)

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/flagship/llms.txt  
> Use this file to discover all available pages before exploring further.

# Operators

Last updated Sep 1, 2026|Copy as Markdown| [View as Markdown](https://0285ca83.previews.developers.cloudflare.com/flagship/targeting/operators/index.md)| [Agent setup](https://0285ca83.previews.developers.cloudflare.com/agent-setup/)

Flagship supports 11 comparison operators for targeting rule conditions. Each operator compares an attribute from the [evaluation context](https://0285ca83.previews.developers.cloudflare.com/flagship/concepts/#evaluation-context) against a specified value.

## Operator reference

| Operator | Description | Example | Value type |
| --- | --- | --- | --- |
| `equals` | Returns true if the attribute value matches the specified value. | `country equals "US"` | String |
| `not_equals` | Returns true if the attribute value does not match the specified value. | `plan not_equals "free"` | String |
| `greater_than` | Returns true if the attribute value is greater than the specified value. | `age greater_than 18` | Number, ISO 8601 datetime |
| `less_than` | Returns true if the attribute value is less than the specified value. | `loginCount less_than 5` | Number, ISO 8601 datetime |
| `greater_than_or_equals` | Returns true if the attribute value is greater than or equal to the specified value. | `score greater_than_or_equals 90` | Number, ISO 8601 datetime |
| `less_than_or_equals` | Returns true if the attribute value is less than or equal to the specified value. | `createdAt less_than_or_equals "2025-01-01T00:00:00Z"` | Number, ISO 8601 datetime |
| `contains` | Returns true if the attribute value contains the specified substring. | `email contains "@cloudflare.com"` | String |
| `starts_with` | Returns true if the attribute value starts with the specified prefix. | `path starts_with "/api/v2"` | String |
| `ends_with` | Returns true if the attribute value ends with the specified suffix. | `domain ends_with ".dev"` | String |
| `in` | Returns true if the attribute value is in the specified array. | `country in ["US", "CA", "UK"]` | Array |
| `not_in` | Returns true if the attribute value is not in the specified array. | `userId not_in ["blocked-1", "blocked-2"]` | Array |

## Operator categories

### Equality operators

`equals`, `not_equals`

Use these operators for exact string matching. The comparison is case-sensitive.

### Comparison operators

`greater_than`, `less_than`, `greater_than_or_equals`, `less_than_or_equals`

These operators work with numeric values and ISO 8601 datetime strings. When comparing datetimes, provide the value in ISO 8601 format (for example, `"2025-01-01T00:00:00Z"`).

### String operators

`contains`, `starts_with`, `ends_with`

These operators perform substring matching against the attribute value. All string comparisons are case-sensitive.

### Array operators

`in`, `not_in`

The value must be an array. Flagship checks whether the attribute value is a member of the specified array.

Was this helpful?

YesNo

## On this page

[![](https://0285ca83.previews.developers.cloudflare.com/_astro/logo.te5VL_aD.svg)Docs](https://0285ca83.previews.developers.cloudflare.com/)

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/flagship/targeting/operators/#page","headline":"Operators · Cloudflare Flagship docs","description":"Reference for the 11 comparison operators available in Flagship targeting rule conditions, including equality, comparison, string, and array operators.","url":"https://developers.cloudflare.com/flagship/targeting/operators/","inLanguage":"en","image":"https://developers.cloudflare.com/og-docs.png","dateModified":"2026-09-01","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
