Going Stellar

Home/CQL reference

CQL field

content in CQL (Confluence): syntax and examples

The content field searches by content id and is documented as an alias of id. Use whichever name reads better in your saved filter. The accepted values, operators and errors are identical.

Syntax

content = 32964613
content in (32964613, 655541)

Arguments

ArgumentWhat it does
valueA content id: a plain number for pages and comments, or att followed by the number for an attachment.

Works with

  • Operators: =, !=, IN, NOT IN
  • Functions: none
  • Not with: ~, !~, >, >=, <, <=
  • Alias of: id

Examples

content = 32964613

Finds the page with a known id, for example the company handbook.

Run on Confluence Cloud on .

content in (32964613, 655541)

Returns several known pages in one query, such as the handbook and the space home.

Run on Confluence Cloud on .

content = att655572

Finds a single attachment from its API id.

Run on Confluence Cloud on .

content = 32964613 AND space = SD

Checks that a page id really belongs to the space you expect before a script acts on it.

Run on Confluence Cloud on .

content not in (32964613, 655541) AND space = SD AND type = page

Lists all pages in a space except a few that a report already covers.

Run on Confluence Cloud on .

Pitfalls

  • Alias means the same results, not a different field. content = 32964613 and id = 32964613 find the same page, and content in (32964613, 655541) matches id in (32964613, 655541) (checked on Confluence Cloud, November 2026).
  • The name content is easy to confuse with type or with text search. It does not search page bodies. For words inside a page use text ~ "word".
  • The same errors apply as for id: content = abc fails with: Can't parse as a ContentId, and content = 655572 (an attachment id without the att prefix) runs but matches nothing.

Sources

  1. CQL fields (Atlassian Developer, Confluence Cloud)

Markdown version · All CQL pages