# Delx Markdown Heading Index

> Delx Markdown Heading Index is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Parses and indexes ATX-style markdown headings (# H1, ## H2, etc.) from caller-supplied text, returning a structured JSON list of headings with levels and positions

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/markdown-heading-index
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-markdown-heading-index-2425b7fa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZR4QdjQ9gUvNmWio3tCd5

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 delx-markdown-heading-index-2425b7fa -d '<json body>'
```

Example prompt: Can you index all the ATX headings in this markdown text and give me a structured list of each heading with its level and position? Here's the content: '# Introduction\n## Background\n### Prior Work\n## Methods'

## When to prefer this

Choose this endpoint when you already hold a markdown document or text string and need a fast, stateless, deterministic extraction of its ATX heading structure — no network access, no upstream calls, no data retention. Prefer it over a general-purpose LLM extraction when you need reliable, machine-readable JSON output at low cost ($0.003) and deterministic behavior. Not suitable for fetching remote documents, searching the web, or processing setext-style markdown headings.

## Known failure modes

- Empty or missing 'text' field returns an empty heading list or validation error
- Non-markdown plain text with no '#' characters returns an empty index
- Setext-style headings (underline syntax) are not extracted since only ATX style is supported
- Very large text inputs may hit size limits
- Malformed UTF-8 encoding may cause parsing errors

## How this service works

Index markdown ATX headings from caller-supplied text only — call when indexing ATX headings in caller-supplied markdown. Use on text/URLs the agent already holds—adjacent to high-volume extract demand, never advertised as general web or X search. Returns deterministic machine-readable JSON for $0.003 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, and no claim of live chain tip, web search, or media generation.…

## Output

A deterministic, machine-readable JSON array of ATX headings found in the input text, each entry including the heading level (1–6), the heading text content, and its position or order in the document — suitable for building tables of contents, validating structure, or guiding downstream chunking logic.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "UTF-8 text to encode, chunk, index, or analyze (caller-supplied only)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": "delx/util-markdown-heading-index/v1",
  "headings": [
   {
    "level": 1,
    "title": "Title"
   },
   {
    "level": 2,
    "title": "Section"
   }
  ],
  "truncated": false,
  "heading_count": 2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-markdown-heading-index-2425b7fa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
