# AGISHub CSS Selector Scraper

> AGISHub CSS Selector Scraper is a paid API for AI agents from api.agishub.com, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-15).

Extract text and attributes of specific HTML elements from any JavaScript-rendered web page using CSS selectors, powered by a headless browser.

## Facts

- Endpoint: POST https://api.agishub.com/paid/scrape
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agishub-css-selector-scraper-59f054a6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_L6qVINpgBeZbhlONLZ7tK

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 agishub-css-selector-scraper-59f054a6 -d '<json body>'
```

Example prompt: Scrape the page at https://example-shop.com/products using these CSS selectors: 'h1', '.price', and 'a.product' — I need the text and attributes of every match on that JS-rendered page.

## When to prefer this

Use this endpoint when you need to extract specific, targeted elements from a JavaScript-rendered or single-page application (SPA) where a plain HTTP fetch would return an empty or incomplete DOM. It is ideal when you already know the CSS selectors of interest and want structured text+attribute output rather than full-page Markdown. Prefer it over the full-page Markdown fetch endpoint when you need precise element targeting, and over the headless browser automation endpoint when you only need to read data without interacting with the page.

## Known failure modes

- Invalid or malformed URL returns a 400 error
- Page behind authentication wall returns empty matches or access-denied error
- Selector finds no matching elements returns empty array for that selector
- JavaScript-heavy page with long loading time may timeout
- More than 20 selectors provided triggers a validation error
- Malformed CSS selector syntax causes a parsing error or empty result

## How this service works

Extract specific elements from a JavaScript-rendered page by CSS selector. Give a list of selectors (e.g. 'h1', '.price', 'a.product') and get back the text and attributes of every match. Backed by a headless browser, so it works on SPAs and JS-heavy pages.

## Output

A JSON object keyed by each CSS selector, where each key maps to an array of matched elements — each element containing its inner text and a map of HTML attributes (e.g. href, class, src). Returns up to 20 selectors per call, with all matches per selector.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "url",
      "selectors"
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "description": "Full http/https URL of the page to scrape."
      },
      "selectors": {
       "type": "array",
       "items": {
        "type": "string",
        "minLength": 1
       },
       "maxItems": 20,
       "minItems": 1,
       "description": "CSS selectors to extract, e.g. ['h1', 'a.product', '.price']. Returns the text and attributes of every match per selector."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "enum": [
      "http"
     ],
     "type": "string"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "enum": [
      "json"
     ],
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agishub-css-selector-scraper-59f054a6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agishub.com](https://www.zero.xyz/host/api.agishub.com/llms.txt)
