Skip to Content

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:

FormatFlag valueDescription
ADF (default)atlas_doc_formatAtlassian Document Format — structured JSON
StoragestorageConfluence 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.json

Flags

FlagShortDefaultDescription
--output-o(stdout)Output file path
--format-fatlas_doc_formatOutput format: atlas_doc_format (ADF JSON) or storage (HTML/XML)
--get-draft-dfalseRetrieve the draft (unpublished) version
--status-scurrentPage status filter: current, archived, trashed, deleted, draft
--version-v-1 (latest)Retrieve a specific version number
--include-labels-lfalseInclude page labels
--include-version-VfalseInclude version info
--include-versions-LfalseInclude 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.json

Additional flag

FlagShortDefaultDescription
--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+Title
  • https://domain.atlassian.net/wiki/spaces/KEY/pages/123456
  • https://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.json

Flags

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

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

Last updated on