# IN operator in CQL (Confluence): syntax, examples

URL: https://goingstellar.ro/reference/cql/in-operator/

IN matches content when a field holds any one of several values. You write the values in parentheses, separated by commas. It replaces a chain of = clauses joined with OR, so a query for three page titles or two file types stays short.

## Syntax

```
field IN (value1, value2, ...)
field in (value1, value2)
```

## Arguments

- `field` (optional: yes): A CQL field that supports IN, such as type, space, title, ancestor, id, label or fileExtension.
- `values` (optional: yes): One or more values in parentheses, separated by commas. Text values with spaces need double quotes.

## Works with

- Operators: IN works on ancestor, content, contributor, creator, favourite, fileExtension, id, label, macro, mention, owner, pageStatus, space, subtype, title, type and watcher.
- Functions: currentUser() inside the list, for fields that take users.
- Not with: created, lastmodified and text (these take comparison or ~ operators), and parent (it fails, see the pitfalls).

## Examples

```
type in (page, attachment) and space = SD
```

Lists pages and uploaded files from one space in a single query, for example before a space cleanup. Run on Confluence Cloud on 2026-11-29.

```
title in ("Code of Conduct", "Remote Work Guidelines", "Information Security Policy")
```

Pulls the exact set of policy pages a new hire has to read. Run on Confluence Cloud on 2026-11-29.

```
fileExtension in ("svg", "jpg")
```

Finds image attachments of two formats without writing two clauses. Run on Confluence Cloud on 2026-11-29.

```
ancestor in (32964613, 655541) and type = page
```

Collects every page under either of two parent pages, such as a handbook and a space home. Run on Confluence Cloud on 2026-11-29.

```
type in (page, comment) and space = SD ORDER BY lastmodified DESC
```

Shows the latest activity in a space, pages and comments together, newest first. Run on Confluence Cloud on 2026-11-29.

## Pitfalls

- The documentation says IN works on `parent`. `parent in (32964613)` fails with HTTP 500 and the message "IllegalArgumentException executing cql". Use `parent = 32964613`, or `ancestor in (...)` if any depth is fine (checked on Confluence Cloud, November 2026).
- The documentation says IN does not work on `title`. It does: a list of exact page titles runs and returns every page that matches (checked on Confluence Cloud, November 2026). Titles must match in full, so a partial name finds nothing.
- Unsupported fields name the allowed operators. `created in (2026-11-01)` fails with "Operator 'in' is not supported for field 'created'. Supported operators are : , >=, =, !=", and `text in (...)` says the field only accepts ~ and !~.
- An unknown value stops the whole query. `type in (page, foo)` fails with "Unsupported value for type, got : foo", and an empty list `()` gives "Could not parse cql".

## Questions and answers

### Is IN the same as several = clauses joined with OR?

Yes, that is how the documentation describes it. The list form is shorter and easier to edit.

## Related

- [NOT IN](https://goingstellar.ro/reference/cql/not-in-operator/)
- [=](https://goingstellar.ro/reference/cql/equals-operator/)
- [OR](https://goingstellar.ro/reference/cql/or-keyword/)
- [type](https://goingstellar.ro/reference/cql/type-field/)
- [ancestor](https://goingstellar.ro/reference/cql/ancestor-field/)
- [parent](https://goingstellar.ro/reference/cql/parent-field/)

## Sources

- [CQL operators (Atlassian Developer, Confluence Cloud)](https://developer.atlassian.com/cloud/confluence/cql-operators/)
- [CQL fields (Atlassian Developer, Confluence Cloud)](https://developer.atlassian.com/cloud/confluence/cql-fields/)

