# BRAINIAC Heading Structure Audit API

> BRAINIAC Heading Structure Audit API is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.03/call, status unknown (last checked 2026-11-17).

Audits a webpage or HTML snippet for heading hierarchy issues that affect accessibility, returning WCAG-related findings on heading levels and empty headings.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/accessibility/heading-structure-audit?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-heading-structure-audit-api-2ec3841d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qDgYBpPKx-0-pW8TpcwR2

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 brainiac-heading-structure-audit-api-2ec3841d -d '<json body>'
```

Example prompt: Can you audit the heading structure on https://www.example.com for accessibility issues — specifically check for skipped heading levels or empty headings?

## When to prefer this

Choose this endpoint when you need a fast, pay-per-call, accountless check specifically focused on HTML heading hierarchy and WCAG-related heading accessibility — not a full WCAG conformance suite or browser-rendered audit. Ideal for CI pipelines, pre-publish checks, or agent workflows where you want structured JSON output about heading issues without setting up an account or running a headless browser.

## Known failure modes

- Invalid or unreachable URL returns an error or empty result
- HTML input exceeding 200,000 characters is rejected
- Malformed HTML may cause incomplete heading detection
- JavaScript-rendered headings not visible in static analysis will be missed
- Network timeouts when fetching a URL may cause failure

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

A JSON object containing: a list of issues (each with a code, kind, affected element, explanation, and remediation advice), the full list of headings found (text, level, element), WCAG compliance boolean, audit status, source type, timestamp, and a list of limitations explaining what the static check cannot cover (e.g., JavaScript-driven content, contrast for multi-element styles).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "pattern": "^https?:\\/\\/\\S+$",
   "maxLength": 2000,
   "minLength": 8
  },
  "html": {
   "type": "string",
   "maxLength": 200000,
   "minLength": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "",
  "issues": [
   {
    "code": "heading_level_skipped",
    "kind": "confirmed",
    "element": "h3",
    "explanation": "This h3 follows h1, so a heading level was skipped.",
    "remediation": "Use the next heading level, or change the heading that came before it."
   },
   {
    "code": "heading_empty",
    "kind": "confirmed",
    "element": "h2",
    "explanation": "This heading has no text.",
    "remediation": "Add the heading text, or remove the heading element."
   },
   {
    "code": "visual_headings_not_checked",
    "kind": "manual",
    "element": "document",
    "explanation": "Text that only looks like a heading was not checked.",
    "remediation": "Use a heading element when text is a heading."
   }
  ],
  "source": "html",
  "status": "checked",
  "headings": [
   {
    "text": "Welcome",
    "level": 1,
    "element": "h1"
   },
   {
    "text": "Details",
    "level": 3,
    "element": "h3"
   },
   {
    "text": "",
    "level": 2,
    "element": "h2"
   }
  ],
  "warnings": [],
  "checkedAt": "2026-11-02T19:00:00.000Z",
  "limitations": [
   "This is a static HTML check. It is not a WCAG conformance claim.",
   "JavaScript is not run, so states that appear only after interaction are not seen.",
   "Contrast is calculated only when both colours are written on the same element.",
   "Checks marked manual need a browser or a person. They are not failures."
  ],
  "wcagCompliance": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-heading-structure-audit-api-2ec3841d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
