Get Page Headings

What are the apis to get page headings in forge app and then apply logic to that headings

Fetch the content of the page in ADF format using /wiki/api/v2/pages/{id}?body-format=atlas_doc_format and then find all heading nodes.