Extract Headings API
headings lists every h1-h6 on the page in document order, with its
level and title.
API Examples
Headings
{
...
"headings": [
{ "position": 1, "level": 2, "title": "Contents" },
{ "position": 2, "level": 1, "title": "Coffee" },
{ "position": 3, "level": 2, "title": "Etymology" },
{ "position": 4, "level": 2, "title": "History" },
{ "position": 5, "level": 3, "title": "Legendary accounts and myths" },
{ "position": 6, "level": 3, "title": "Historical transmission" },
{ "position": 7, "level": 3, "title": "As a colonial import" },
{ "position": 8, "level": 3, "title": "Mass production" },
{ "position": 9, "level": 2, "title": "Biology" },
{ "position": 10, "level": 2, "title": "Cultivation and production" }
]
}