# AgentShelf XPath H1 Extractor

> AgentShelf XPath H1 Extractor is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.007/call, status unknown (last checked 2026-10-01).

Extracts the text content of H1 heading elements from a public webpage URL or raw HTML using the XPath expression //h1

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/xpath-h1?utm_source=zero.xyz
- Price: $0.007/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentshelf-xpath-h1-extractor-da232a12
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6-rdSZI3oJYmJ8ZmodGJj

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 agentshelf-xpath-h1-extractor-da232a12 -d '<json body>'
```

Example prompt: Can you pull the H1 heading text from https://example.com for me?

## When to prefer this

Choose this endpoint when you need specifically H1 heading text from a page and want a lightweight, purpose-built extractor rather than a full DOM scraper. It is ideal for SEO audits, page title monitoring, or content comparison workflows where only the primary heading matters. Use it over the CSS selector endpoint when XPath-based H1 extraction is sufficient and you want to minimize cost ($0.007 USDC). For broader element extraction needs, prefer the CSS selector sibling endpoint instead.

## Known failure modes

- URL is unreachable or returns a non-200 status — extraction fails with an error
- No H1 element present on the page — returns empty result
- SSRF-blocked URL (private IP ranges, metadata endpoints) — rejected for security
- HTML input exceeds 200,000 character limit — request rejected
- URL shorter than 8 characters or longer than 2048 characters — validation error
- Malformed HTML that cannot be parsed — may return empty or partial results

## How this service works

Call when an agent needs text of //h1 via //h1 from a public page or HTML (SSRF-safe). Exact $0.007 USDC. Prefer unpaid POST /v1/sandbox/xpath-h1 first.

## Output

Returns the text content of all H1 elements found on the page or in the provided HTML, extracted using the XPath selector //h1. If a URL is provided, the service fetches the page (SSRF-safe) and returns matched heading text. If raw HTML is provided directly, it parses and returns the H1 text without any network request.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "maxLength": 2048,
   "minLength": 8,
   "description": "Public page to fetch. The selector or profile is fixed by the SKU. Provide url or html."
  },
  "html": {
   "type": "string",
   "examples": [
    "<!doctype html><html lang=\"en\"><head><title>Hello</title>\n<meta name=\"description\" content=\"Desc\"><meta property=\"og:title\" content=\"OG\">\n<link rel=\"canonical\" href=\"https://example.com/\"><link rel=\"icon\" href=\"/favicon.ico\">\n</head><body><h1>Hello</h1><a href=\"https://example.com/a\">A</a></body></html>"
   ],
   "maxLength": 200000,
   "minLength": 1,
   "description": "HTML to extract from locally. Provide html or url. When both are set, html is used."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentshelf-xpath-h1-extractor-da232a12/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentshelf.syntexa.ch](https://www.zero.xyz/host/agentshelf.syntexa.ch/llms.txt)
