# AgentShelf XPath Button Text Extractor

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

Extracts the text content of a button element located via XPath from a public webpage URL or provided HTML string.

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/xpath-button?utm_source=zero.xyz
- Price: $0.009/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentshelf-xpath-button-text-extractor-4f203d4f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MpEyx-0EVMgH-PzVqf5HB

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-button-text-extractor-4f203d4f -d '<json body>'
```

Example prompt: Can you grab the text of the main call-to-action button on https://example.com/signup — the one at XPath //button[@id='cta']?

## When to prefer this

Use this endpoint when you need to extract the text label of a specific button element from a public webpage or HTML string using a precise XPath selector. Prefer the unpaid sandbox equivalent (/v1/sandbox/xpath-button) for testing. Choose this over general HTML scrapers when you already know the XPath and only need the button text, not broader DOM content.

## Known failure modes

- XPath expression matches no element — empty or null result returned
- URL is blocked, non-public, or SSRF-restricted — fetch error
- HTML input exceeds 200,000 character limit — validation error
- URL is malformed or under 8 characters — validation error
- XPath matches a non-button element — may return unexpected text or error
- Page requires JavaScript rendering — static fetch may miss dynamically inserted buttons

## How this service works

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

## Output

Returns the extracted text content of the button element matched by the provided XPath expression, either fetched from the given public URL or parsed from the supplied HTML string. If no match is found or the request fails, an error is returned.

## 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-button-text-extractor-4f203d4f/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)
