Skip to content
POST
/api/v1/audit/headings

Audit headings API

Skipped levels + duplicate H1 detection.

POST /api/v1/audit/headings reports skipped heading levels and duplicate H1s — the two structural mistakes that hurt accessibility and SEO most.

Overview

Find skipped heading levels (e.g. h2 → h4) and multiple H1s. Each issue points to a specific line with a severity tag so editors can surface them inline.

Request

Authenticate with Authorization: Bearer YOUR_API_KEY and send a JSON body containing the parameters below. Pick your language:

curl -X POST 'https://trymarkdownviewer.com/api/v1/audit/headings' \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markdown":"# A\n\n### Skipped"}'

Body parameters

FieldTypeRequiredDescription
markdownstring
required
Markdown source.

Response

Success responses are wrapped in a data field. Errors use { error: { code, message } } with an appropriate HTTP status — see the error reference.

{
  "data": {
    "issues": [
      {
        "line": 3,
        "severity": "warning",
        "message": "Heading jumps from h1 to h3 (skipped level)."
      }
    ],
    "count": 1
  }
}

Use cases

Authoring guardrails

Surface heading issues in the editor before publish.

Try in browser

Free tools that run the same logic locally — no API key, no upload.

Try it

Send a real request against your account in the API playground. Errors there link straight back to the error reference.