Headers (lines starting with #, ## etc.) are indexed as well and queryable via the header tag.
${query[[from index.headers() where page == _CTX.currentPage.name limit 3]]}
name, text: heading text with hashtags, inline attributes and its anchor removed.level: heading depth, from 1 through 6.page: containing page name.pos, range: start position and [start, end] source range of the heading.ref, tag, tags, itags: shared object fields. tag is header.