Indexed
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

  1. Go to https://id.atlassian.com/manage-profile/security/api-tokens
  2. Click Create API token
  3. Give it a label (e.g., "Indexed CLI")
  4. Copy the token

Add it to your environment:

.env
CONFLUENCE_API_TOKEN=your_token_here
CONFLUENCE_EMAIL=your-email@company.com

Keep tokens out of version control

Store your .env file in the project root and add it to .gitignore.

  1. Go to your Confluence profile → Personal Access Tokens
  2. Click Create token
  3. Copy the token
.env
CONFLUENCE_API_TOKEN=your_personal_access_token

Create a Collection

Use a CQL (Confluence Query Language) query to select which pages to index:

Terminal
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

Terminal
indexed index inspect team-wiki
Collection: 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:22
Terminal
indexed index search "database migration process" -c team-wiki
Results 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

GoalCQL
All pages in a spacespace = ENG AND type = page
Recently updatedspace = ENG AND lastModified >= "2024-01-01"
Specific labelspace = ENG AND label = "architecture"
By title keywordspace = ENG AND title ~ "runbook"
Multiple spacesspace in (ENG, OPS, PLATFORM) AND type = page
Exclude archivedspace = 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:

Terminal
indexed index create confluence \
  -c team-wiki \
  -u https://company.atlassian.net/wiki \
  -q "space = ENG AND type = page" \
  --first-level-comments

Keep It Fresh

Confluence pages get updated over time. Refresh your collection:

Terminal
indexed index update team-wiki

See Keep Collections Up to Date for automation patterns.

Troubleshooting

Authentication errors

  • Confluence Cloud: Ensure both CONFLUENCE_EMAIL and CONFLUENCE_API_TOKEN are set. The email must match the Atlassian account that created the token.
  • Confluence Server/DC: Ensure CONFLUENCE_API_TOKEN is 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 /wiki for 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.

What's Next