Get Pages
The page get commands retrieve a Confluence page in its native format — no Markdown conversion is applied. This is useful for inspecting the raw page structure, building custom processing pipelines, or archiving the original content.
Two formats are available:
| Format | Flag value | Description |
|---|---|---|
| ADF (default) | atlas_doc_format | Atlassian Document Format — structured JSON |
| Storage | storage | Confluence Storage Format — XML/HTML |
Get by ID
acp2md page get by-id PAGE_ID [flags]Examples
# Print ADF JSON to stdout
acp2md page get by-id 163928
# Save ADF JSON to a file
acp2md page get by-id 163928 --output page.json
# Get the Storage (HTML/XML) format
acp2md page get by-id 163928 --format storage --output page.html
# Get the draft version in ADF format
acp2md page get by-id 163928 --get-draft --output draft.json
# Pipe page ID from stdin
echo "163928" | acp2md page get by-id --output page.jsonFlags
| Flag | Short | Default | Description |
|---|---|---|---|
--output | -o | (stdout) | Output file path |
--format | -f | atlas_doc_format | Output format: atlas_doc_format (ADF JSON) or storage (HTML/XML) |
--get-draft | -d | false | Retrieve the draft (unpublished) version |
--status | -s | current | Page status filter: current, archived, trashed, deleted, draft |
--version | -v | -1 (latest) | Retrieve a specific version number |
--include-labels | -l | false | Include page labels |
--include-version | -V | false | Include version info |
--include-versions | -L | false | Include full version history |
Get by title
acp2md page get by-title "PAGE TITLE" [flags]Examples
# Get ADF JSON by title
acp2md page get by-title "My Page Title"
# Save to file
acp2md page get by-title "Project Notes" --output page.json
# Get Storage format
acp2md page get by-title "Technical Spec" --format storage --output page.html
# Get the draft, sorted by most recently modified
acp2md page get by-title "Meeting Notes" --get-draft --sort -modified-date
# Pipe title from stdin
echo "Release Notes" | acp2md page get by-title --output notes.jsonAdditional flag
| Flag | Short | Default | Description |
|---|---|---|---|
--sort | -S | (none) | Sort results: id, -id, created-date, -created-date, modified-date, -modified-date, title, -title |
All other flags from by-id are also available.
Get by URL
acp2md page get by-url URL [flags]Aliases: url, u
Extracts the page ID from a Confluence URL and retrieves the page in its native format. This is convenient when you have a browser URL and want to skip looking up the page ID manually.
Supported URL formats:
https://domain.atlassian.net/wiki/spaces/KEY/pages/123456/Page+Titlehttps://domain.atlassian.net/wiki/spaces/KEY/pages/123456https://domain.atlassian.net/wiki/pages/viewpage.action?pageId=123456
Examples
# Get ADF JSON from a Confluence URL
acp2md page get by-url "https://mycompany.atlassian.net/wiki/spaces/ENG/pages/163928/API+Reference"
# Save to a file
acp2md page get by-url "https://mycompany.atlassian.net/wiki/spaces/ENG/pages/163928" --output page.json
# Get Storage format
acp2md page get by-url "https://mycompany.atlassian.net/wiki/spaces/ENG/pages/163928" --format storage --output page.html
# Works with viewpage URLs too
acp2md page get by-url "https://mycompany.atlassian.net/wiki/pages/viewpage.action?pageId=163928" --output page.json
# Pipe URL from stdin
echo "https://mycompany.atlassian.net/wiki/spaces/ENG/pages/163928" | acp2md page get by-url > page.jsonFlags
All flags from by-id apply.
Processing ADF output with jq
The ADF format is standard JSON and can be processed with jq:
# Extract the page title
acp2md page get by-id 163928 | jq '.title'
# List all node types in the document body
acp2md page get by-id 163928 | jq '[.. | objects | .type] | unique'
# Pretty-print and save
acp2md page get by-id 163928 | jq '.' > page-pretty.jsonUse acp2md page count nodes by-id and acp2md page count marks by-id for structured analysis of node and mark type distribution without needing to parse the JSON yourself.