# AgentShelf CSS Main Text Extractor

> AgentShelf CSS Main Text Extractor is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-29).

Extracts the main body text from a public web page or HTML string using CSS-based heuristics, with SSRF protection.

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/css-main?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentshelf-css-main-text-extractor-aacb235a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KI4pqzB7UX8IC-U0-MEjU

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-css-main-text-extractor-aacb235a -d '<json body>'
```

Example prompt: Can you grab the main article text from https://example.com/article/123 — just the body content, no nav or sidebars?

## When to prefer this

Use this endpoint when you need the main readable text from a public web page or raw HTML, and want SSRF-safe fetching without running your own browser or HTML parser. Prefer the free sandbox POST /v1/sandbox/css-main first to test; fall back to this paid endpoint ($0.004 USDC) for production use. Best when you need fast, heuristic-based main content extraction without an LLM.

## Known failure modes

- URL is unreachable or returns a non-200 response
- SSRF check blocks private/internal IP addresses or disallowed hosts
- HTML input is malformed or does not contain identifiable main content
- Content exceeds the 200,000 character HTML limit
- No main content region detectable via CSS heuristics, returning empty or minimal text

## How this service works

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

## Output

The extracted main body text from the provided URL or HTML, stripped of navigation, headers, footers, and other boilerplate, returned as a plain text string.

## 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 charset=\"utf-8\"><meta name=\"description\" content=\"Desc\">\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-css-main-text-extractor-aacb235a/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)
