# extract-headings-as-json

> extract-headings-as-json is a paid API for AI agents from page.intel.rallylive.ca, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-20).

Fetches a web page and extracts all heading elements (h1–h6) as a structured JSON array with a count.

## Facts

- Endpoint: GET https://page.intel.rallylive.ca/page/headings/json?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/extract-headings-as-json-5b3ca85f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_b6a_J-bPvK3xpKQJCPRBU

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 extract-headings-as-json-5b3ca85f
```

Example prompt: Can you fetch https://example.com/blog/post and pull out all the headings as a JSON array so I can see the page's structure?

## When to prefer this

Choose this endpoint when you need a lightweight, structured JSON extraction of only heading elements from a static or server-rendered web page, without spinning up a browser. Ideal for agents and pipelines that need to analyze page structure, generate tables of contents, or audit heading hierarchies at $0.01 per page. Prefer alternatives if the page is JavaScript-rendered, if you need all text content (use extract-text-as-text), or if you need bulk processing of many URLs at once (use the bulk or watch variants).

## Known failure modes

- URL is unreachable or returns a non-200 status — endpoint returns an error or empty result
- Page uses JavaScript-rendered content that requires a browser — headings may be missing since no browser is used
- URL parameter is missing or malformed — request fails with a validation error
- Page has no heading elements — returns an empty array with count of zero
- Network timeout on slow or large pages — may return a timeout error

## How this service works

Extract the page's headings as json: fetches the URL, pulls every headings element and returns them as a JSON array, with a count. Structured, one-element-type extraction for agents and pipelines; no browser needed. $0.01 per page.

## Output

A JSON array of heading objects found on the fetched page, each containing the heading text and its level (h1–h6), plus a total count of headings extracted.

## 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",
     "properties": {}
    }
   },
   "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/extract-headings-as-json-5b3ca85f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from page.intel.rallylive.ca](https://www.zero.xyz/host/page.intel.rallylive.ca/llms.txt)
