CQL operator
IN operator in CQL (Confluence): syntax, examples
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
| Argument | What it does | Optional |
|---|---|---|
field | A CQL field that supports IN, such as type, space, title, ancestor, id, label or fileExtension. | yes |
values | One or more values in parentheses, separated by commas. Text values with spaces need double quotes. | yes |
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 = SDLists pages and uploaded files from one space in a single query, for example before a space cleanup.
Run on Confluence Cloud on .
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 .
fileExtension in ("svg", "jpg")Finds image attachments of two formats without writing two clauses.
Run on Confluence Cloud on .
ancestor in (32964613, 655541) and type = pageCollects every page under either of two parent pages, such as a handbook and a space home.
Run on Confluence Cloud on .
type in (page, comment) and space = SD ORDER BY lastmodified DESCShows the latest activity in a space, pages and comments together, newest first.
Run on Confluence Cloud on .
Pitfalls
- The documentation says IN works on
parent.parent in (32964613)fails with HTTP 500 and the message "IllegalArgumentException executing cql". Useparent = 32964613, orancestor 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 : <, <=, >, >=, =, !=", andtext 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.