Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

How do I get the body of a page via API?


I am using this link


to get the content of my page.

But how do I get "Content: Person C_Version 01C" (shown below)?


1 answer

1 accepted

5 votes
Answer accepted
Lei Wang Atlassian Team Feb 28, 2018


You could read the content of a page with the body expanded.


Please refer to the Confluence REST API examples for more details:

And you'll get Value with unbreakable line which is actually the content of page.

Is it possible to get better formatting?

Same question. If the page has an index and links to the sections on the same page. How to directly access the data content on links through the REST API's?


To be precise, Say I have a page id 12345, on confluence, if I am accessing :

http://helloworld/wiki/pages/12345/XYZ#XYZ-abcdabcd  this on the url, how do we access the underlined part through REST API?

Like # people like this

this is what im trying to figure out as well

The Atlassian API doesn't have a way to return just the part of the page following an anchor. The best you can do is get the page by the space and title, then parse for the html anchor.

Assuming your URL has a space, like:


I think you would do it with

page=confluence.get_page_by_title('SPC', 'XYZ', expand='')

Suggest an answer

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

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

402 views 23 8
Join discussion

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