If you retrieve the doc content as JSON (instead of markdown) you will find that paragraphs have attributes, including the ‘level’ and a guid.
The level will tell you if it’s a header. and anchors are formed by adding the guid property to the base url.
2 Likes