Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

List all pages in a space showing titles of page and IDs

Does any please help me to get the list of all pages showing page titles and page IDs within a Confluence space using bash / python script ?

I want to generate a list of all pages showing the page title and page ID.

Thanks in advance


2 answers

2 votes
Zak Laughton Atlassian Team Jul 31, 2018

Hi Vikas!

There are a few ways to accomplish this:


The api will likely be the best way to retrieve data from Confluence in a bash or Confluence script. You can see Confluence REST API Examples for examples of terminal and python commands for using the API.

The following URL will return a JSON list of all pages in the instance (replace <base-URL> with the base URL for your instance):


You can then use python to parse through the JSON to find the ID and title of each page (useful article on JSON parsing with Python: Working with JSON data in Python).


While the REST API would be most convenient to use with a Python/bash script, you can also get all the page titles and ID's from the database with the following query:

SELECT title, contentid
FROM content
WHERE contenttype = 'PAGE'
AND prevver IS NULL
AND content_status = 'current';

I hope this helps!

@Zak Laughton When I use the following, I get only 200 results. Is that set by the Confluence Server admin?


It is works to me for this url.


But there were still some problems.

1. the result still exist limit. the limit is 1000

2. I add a new param: the limit param is no effective. (In fact. the limit is return to 200...)

@Vikas Shrivastava @antony terrence 

I had to get the first set of results and do a loop based on the presence of the next link in the response.  When I set the limit to 99999, and I get maximum of 500. If we have to perform a simple action of getting all page details, we have to make multiple calls. I am sure there are areas where Atlassian could reduce the number of calls required to be made. This scenario is one of them.  The depth parameter does not work. 

Yes. Finally, I made multiple calls to get all pages. But I found another problem. There were exist limit in the "children" field when I add the param:

(The limit is 25). So that I can't generate the tree structure. This is confusing


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Miss the Confluence demos at Team 21? Watch them here!

Phew, Atlassian Team 2021 blew by. With dozens of demos and a handful of keynotes, you may have missed some of the awesome Confluence Cloud sessions. Don't' worry, you can watch them all here or on Y...

139 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you