# agentshelf.syntexa.ch XPath AMP HTML Link Extractor

> agentshelf.syntexa.ch XPath AMP HTML Link Extractor is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-02).

Extracts the href value of the AMP HTML link element (link[rel='amphtml']) from a public web page URL or raw HTML string

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/xpath-amphtml?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentshelf-syntexa-ch-xpath-amp-html-link-extractor-b7ec87b7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gAFUfb9oBi_TdsrgKuUcm

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-syntexa-ch-xpath-amp-html-link-extractor-b7ec87b7 -d '<json body>'
```

Example prompt: Can you find the AMP version URL for this page? Here's the URL: https://www.example.com/article/breaking-news — grab the href from the link rel='amphtml' tag.

## When to prefer this

Use this endpoint when you need to programmatically discover the AMP (Accelerated Mobile Pages) version URL of a web page, either by providing a public URL to fetch or raw HTML you already have. It is SSRF-safe (blocks private and metadata addresses), making it suitable for agent pipelines that accept user-supplied URLs. Prefer this over building a custom XPath parser when you need a reliable, pay-per-call extraction of a well-known link relation.

## Known failure modes

- No amphtml link found — page has no AMP version, returns null or empty result
- URL fetch blocked or times out — SSRF-safe filter rejects private/metadata IP ranges
- HTML input too large — exceeds 200,000 character limit
- Malformed URL — shorter than 8 characters or invalid format
- Network error fetching the provided URL — returns error status

## How this service works

Call when an agent needs href of link rel=amphtml via //link[@rel='amphtml']/@href from a public page or HTML (SSRF-safe). Exact $0.003 USDC. Prefer unpaid POST /v1/sandbox/xpath-amphtml first.

## Output

Returns the string value of the href attribute from the first matching link[rel='amphtml'] element found in the fetched page or provided HTML, typically an absolute URL pointing to the AMP version of the page.

## 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-syntexa-ch-xpath-amp-html-link-extractor-b7ec87b7/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)
