# Web Page Headings Extractor

> Web Page Headings Extractor is a paid API for AI agents from api.x-402.online, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-30).

Extracts all headings from a web page, returning each heading's text, level (H1-H6), and anchor in document order

## Facts

- Endpoint: GET https://api.x-402.online/v1/web/headings?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/web-page-headings-extractor-1456df1f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wXkuhTfpSg8PiP9qJlWeM

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 web-page-headings-extractor-1456df1f
```

Example prompt: Can you pull out all the headings and their anchor links from https://docs.example.com/getting-started so I can see the full document outline?

## When to prefer this

Use this endpoint when you need a lightweight, structured outline of a page's heading hierarchy without fetching full page content. Prefer it over full-page scraping when you only need section titles and anchors — for table-of-contents generation, SEO audits, document navigation, or quickly understanding a page's structure.

## Known failure modes

- URL is unreachable or returns a non-200 status — no headings returned
- Page is JavaScript-rendered and headings are not in static HTML — partial or empty result
- URL is malformed or missing — input validation error
- Page has no headings at all — empty list returned
- Rate limiting or payment failure — 402 or 429 response

## How this service works

The document outline of a page: every heading with its level and anchor, in order. Body: {url}.

## Output

An ordered list of all headings found on the page, each with its heading level (e.g. H1, H2, H3), the visible heading text, and the anchor fragment (if present), matching the document's top-to-bottom order.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/web-page-headings-extractor-1456df1f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x-402.online](https://www.zero.xyz/host/api.x-402.online/llms.txt)
