How to Get a Listing or Count of Child Pages Under a Parent Page

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.


For purposes of auditing or organization, Confluence administrators may find it useful to see which pages are nested under a given parent page, and how many. This is helpful when examining a large space, to see which branch in the page tree contains the most pages.


  1. Via the UI, by editing the page and grabbing the "pageId" value from the address bar
  2. Via the database, by running:

    SELECT contentid FROM CONTENT WHERE prevver IS NULL AND title = 'Your Page Title';
  3. Run a query below, depending on what you want to do:

    1. Getting a listing of all pages (pageId and title) under the parent

      SELECT c.contentid, c.title FROM CONFANCESTORS a JOIN CONTENT c ON a.descendentid = c.contentid WHERE a.ancestorid = '<parent_page_id>';
    2. Getting a total count of pages under the parent

      SELECT COUNT(*) FROM CONFANCESTORS WHERE ancestorid = '<parent_page_id>';

Related pages


Last modified on Nov 16, 2016

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.