Notion Pages
Search and view content from Notion workspaces using notion-cli.
Prerequisites
Install notion-cli:
bash
go install github.com/lox/notion-cli@latest
Authenticate (first time only - opens browser for OAuth):
bash
notion-cli auth login
Commands
Search
bash
notion-cli search "query" # Search workspace notion-cli search "query" --limit 10 # Limit results notion-cli search "query" --json # JSON output
View Pages
bash
notion-cli page view <url> # View page content (markdown) notion-cli page view <url> --json # JSON output
List Pages
bash
notion-cli page list # List pages notion-cli page list --limit 50 # Limit results notion-cli page list --json # JSON output
Databases
bash
notion-cli db list # List databases notion-cli db query <database-id> # Query database notion-cli db query <id> --json # JSON output
Comments
bash
notion-cli comment list <page-id> # List comments on a page
Workflow
- •Search for content: Use
notion-cli search "topic"to find relevant pages - •View page content: Use
notion-cli page view <url>with a URL from search results - •Parse JSON for details: Add
--jsonflag when you need structured data
Authentication Status
Check auth status:
bash
notion-cli auth status
Tokens auto-refresh. Manual refresh if needed:
bash
notion-cli auth refresh