# agentshelf.syntexa.ch XPath Lang Attribute Text Extractor

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

Extracts text content of all HTML elements that have a lang attribute (via XPath //*[@lang]) from a public URL or raw HTML.

## Facts

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

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-lang-attribute-text-extractor-c3aaf395 -d '<json body>'
```

Example prompt: Can you extract all the text from elements that have a lang attribute on this page: https://example.com/multilingual — I want to see every language-tagged section?

## When to prefer this

Prefer this endpoint when you specifically need to extract text from elements bearing a lang attribute, such as auditing multilingual or internationalized content on a page. Use over generic scraping tools when the XPath //*[@lang] selector is exactly what you need. Consider the free sandbox POST /v1/sandbox/xpath-lang first before spending $0.006 USDC.

## Known failure modes

- URL is not publicly accessible or returns a non-200 status (blocked or private resource)
- SSRF-blocked URL (private IP ranges, localhost, internal hostnames rejected for security)
- No elements with a lang attribute found on the page (empty result set)
- HTML payload exceeds 200,000 character limit
- URL string shorter than 8 characters or longer than 2,048 characters
- Malformed or unparseable HTML causing XPath evaluation failure
- Network timeout when fetching the target URL

## How this service works

Call when an agent needs text of elements that have a lang attribute via //*[@lang] from a public page or HTML (SSRF-safe). Exact $0.006 USDC. Prefer unpaid POST /v1/sandbox/xpath-lang first.

## Output

Returns the text content of every HTML element matched by the XPath expression //*[@lang] — i.e., any element carrying a lang attribute — from the provided URL or HTML input. Output is a list or structured collection of text strings corresponding to those matched elements.

## 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-lang-attribute-text-extractor-c3aaf395/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)
