# Syntexa AgentShelf CSS Selector Extractor

> Syntexa AgentShelf CSS Selector 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-10-02).

Extracts text and attributes from a public webpage or raw HTML using user-specified CSS selectors, with SSRF protection and a node cap.

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/css-select?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/syntexa-agentshelf-css-selector-extractor-719cfdd3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cNqgQZ2h2LEwWZaoBrePl

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 syntexa-agentshelf-css-selector-extractor-719cfdd3 -d '<json body>'
```

Example prompt: From the page at https://example.com/products, use CSS selectors to extract the text of every element matching '.product-title' and the 'href' attribute of every element matching 'a.buy-link', up to 10 results each.

## When to prefer this

Use this endpoint when you need to target specific elements on a webpage or within HTML using precise CSS selectors, especially when you need attribute values (e.g. href, src, data-*) alongside text. Prefer the free sandbox POST /v1/sandbox/css-select for testing before committing the $0.004 USDC paid call. Choose over heading-specific or phone-specific sibling endpoints when your extraction target is arbitrary and selector-defined.

## Known failure modes

- URL is not publicly accessible or returns a non-200 status
- SSRF protection blocks private/internal IP ranges or localhost URLs
- HTML input exceeds 200,000 character limit
- CSS selector syntax is invalid
- No elements match the provided selectors (empty result set)
- Limit or selector array count out of allowed range
- Payment not fulfilled, request rejected

## How this service works

Call when an agent needs text and attributes extracted with CSS selectors from a public page or HTML (SSRF-safe, node cap). Exact $0.004 USDC. Prefer unpaid POST /v1/sandbox/css-select first.

## Output

Returns an array of results per selector, each containing matched element text content and/or the requested attribute values, respecting the specified node cap (limit).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "maxLength": 2048,
   "minLength": 8,
   "description": "Public page to fetch. Provide url or html. Private hosts are rejected."
  },
  "html": {
   "type": "string",
   "examples": [
    "<a class=\"x\" href=\"https://example.com/a\">Hello</a>"
   ],
   "maxLength": 200000,
   "minLength": 1,
   "description": "HTML to query locally. Provide html or url. When both are set, html is used."
  },
  "limit": {
   "type": "integer",
   "maximum": 50,
   "minimum": 1,
   "examples": [
    5
   ],
   "description": "Maximum nodes returned per selector, from 1 to 50. Default 20."
  },
  "selectors": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "selector"
    ],
    "properties": {
     "selector": {
      "type": "string",
      "maxLength": 200,
      "minLength": 1,
      "description": "CSS selector, for example a.price or h1. At most 8 selectors per call."
     },
     "attribute": {
      "type": "string",
      "maxLength": 80,
      "minLength": 1,
      "description": "Attribute to read, such as href. Omit it to return the element's text."
     }
    },
    "additionalProperties": false
   },
   "examples": [
    [
     {
      "selector": "a.x",
      "attribute": "href"
     }
    ]
   ],
   "maxItems": 8,
   "minItems": 1,
   "description": "One to eight CSS selectors. Each may name an attribute to extract."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/syntexa-agentshelf-css-selector-extractor-719cfdd3/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)
