# HTML Heading Outline Extractor and Validator

> HTML Heading Outline Extractor and Validator is a paid API for AI agents from markup-tools.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-02).

Extracts the h1–h6 heading hierarchy from supplied HTML and reports structural issues like missing/duplicate h1, skipped levels, and empty headings.

## Facts

- Endpoint: GET https://markup-tools.x402tookit.com/html-headings?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/html-heading-outline-extractor-and-validator-eec847c2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_w0947ecRG3_hrYNQ_Lab8

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability html-heading-outline-extractor-and-validator-eec847c2
```

Example prompt: Check the heading structure of this HTML and tell me if there are any issues like a missing h1, skipped levels, or empty headings: <paste HTML here>.

## When to prefer this

Use this endpoint when you need to programmatically audit or extract the heading outline of an HTML document — particularly for SEO validation, accessibility checks, or CMS quality assurance pipelines. It is more suitable than generic HTML parsers because it provides structured issue detection (missing h1, skipped levels, empty headings) out of the box rather than requiring custom logic.

## Known failure modes

- HTML exceeding 20,000 characters returns a 400 error
- Malformed or non-HTML input may produce empty or minimal heading arrays
- Payment failure returns 402 before processing begins
- HTML with no headings returns an empty headings array with issues flagged

## How this service works

Extract the h1-h6 heading outline from supplied HTML and flag missing or multiple h1, skipped levels and empty headings.

## Output

Returns a structured object containing: an array of heading elements (each with level, text, outline position, and hidden status), per-level counts, a list of detected issues (e.g. 'missing h1', 'skipped from h2 to h4', 'empty heading'), a verdict string, a summary, and a truncated flag if the input was cut off.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "html"
     ],
     "properties": {
      "html": {
       "type": "string",
       "description": "HTML to scan, up to 20000 characters (longer is refused with 400)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "count": {
       "type": [
        "null",
        "number"
       ]
      },
      "issues": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "levels": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "h1": {
         "type": [
          "null",
          "number"
         ]
        },
        "h2": {
         "type": [
          "null",
          "number"
         ]
        },
        "h4": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "headings": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "id": {},
         "text": {
          "type": [
           "null",
           "string"
          ]
         },
         "level": {
          "type": [
           "null",
           "number"
          ]
         },
         "hidden": {
          "type": [
           "boolean",
     
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/html-heading-outline-extractor-and-validator-eec847c2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from markup-tools.x402tookit.com](https://www.zero.xyz/host/markup-tools.x402tookit.com/llms.txt)
