# content in CQL (Confluence): syntax and examples

URL: https://goingstellar.ro/reference/cql/content-field/

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

- `value`: A 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 2026-11-29.

```
content in (32964613, 655541)
```

Returns several known pages in one query, such as the handbook and the space home. Run on Confluence Cloud on 2026-11-29.

```
content = att655572
```

Finds a single attachment from its API id. Run on Confluence Cloud on 2026-11-29.

```
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 2026-11-29.

```
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 2026-11-29.

## 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.

## Related

- [id](https://goingstellar.ro/reference/cql/id-field/)
- [text](https://goingstellar.ro/reference/cql/text-field/)
- [type](https://goingstellar.ro/reference/cql/type-field/)
- [IN](https://goingstellar.ro/reference/cql/in-operator/)
- [NOT IN](https://goingstellar.ro/reference/cql/not-in-operator/)
- [ancestor](https://goingstellar.ro/reference/cql/ancestor-field/)

## Sources

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

