Guides
Index Confluence Pages
Make your Confluence wiki searchable by AI using semantic search.
Index Confluence Pages
By the end of this guide, your Confluence pages will be indexed and searchable — meaning your team's wiki is no longer a graveyard of unfindable knowledge.
Prerequisites
- Indexed installed
- A Confluence Cloud or Server/Data Center instance
- An API token (Cloud) or personal access token (Server/DC)
Create a Confluence API Token
- Go to https://id.atlassian.com/manage-profile/security/api-tokens
- Click Create API token
- Give it a label (e.g., "Indexed CLI")
- Copy the token
Add it to your environment:
CONFLUENCE_API_TOKEN=your_token_here
CONFLUENCE_EMAIL=your-email@company.comKeep tokens out of version control
Store your .env file in the project root and add it to .gitignore.
- Go to your Confluence profile → Personal Access Tokens
- Click Create token
- Copy the token
CONFLUENCE_API_TOKEN=your_personal_access_tokenCreate a Collection
Use a CQL (Confluence Query Language) query to select which pages to index:
indexed index create confluence \
-c team-wiki \
-u https://company.atlassian.net/wiki \
-q "space = ENG AND type = page"Indexing collection 'team-wiki'...
Fetched 87 pages from Confluence
Parsed 87 documents
Created 241 chunks
Generated embeddings
✓ Collection 'team-wiki' created (241 chunks, 9.8 MB)Verify
indexed index inspect team-wikiCollection: team-wiki
Type: confluence
Source: https://company.atlassian.net/wiki
Query: space = ENG AND type = page
Documents: 87
Chunks: 241
Size: 9.8 MB
Created: 2025-03-15 14:30:22Search
indexed index search "database migration process" -c team-wikiResults for 'database migration process' (top 5):
1. [team-wiki] Database Schema Changes Guide
Score: 0.88
...Before running any migration, ensure you have a backup of
the production database. Use the migration tool in the
infra/ directory to generate the migration script...
2. [team-wiki] Incident Response Runbook
Score: 0.71
...If a migration fails in production, follow the rollback
procedure documented in the DBA handbook...Common CQL Patterns
| Goal | CQL |
|---|---|
| All pages in a space | space = ENG AND type = page |
| Recently updated | space = ENG AND lastModified >= "2024-01-01" |
| Specific label | space = ENG AND label = "architecture" |
| By title keyword | space = ENG AND title ~ "runbook" |
| Multiple spaces | space in (ENG, OPS, PLATFORM) AND type = page |
| Exclude archived | space = ENG AND type = page AND label != "archived" |
Comments
By default, Indexed indexes all comments on Confluence pages (--read-all-comments). To index only top-level comments:
indexed index create confluence \
-c team-wiki \
-u https://company.atlassian.net/wiki \
-q "space = ENG AND type = page" \
--first-level-commentsKeep It Fresh
Confluence pages get updated over time. Refresh your collection:
indexed index update team-wikiSee Keep Collections Up to Date for automation patterns.
Troubleshooting
Authentication errors
- Confluence Cloud: Ensure both
CONFLUENCE_EMAILandCONFLUENCE_API_TOKENare set. The email must match the Atlassian account that created the token. - Confluence Server/DC: Ensure
CONFLUENCE_API_TOKENis set with a valid personal access token.
Empty results
- Verify your CQL returns results by testing it in Confluence's advanced search.
- Check that the URL ends with
/wikifor Cloud instances. - Ensure the API token has read access to the target space.
Rate limiting
For large Confluence spaces (500+ pages), Indexed handles rate limiting automatically with retries. Consider narrowing your CQL if indexing takes too long.