# BRAINIAC Structured Page Extract

> BRAINIAC Structured Page Extract is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.05/call, status unknown (last checked 2026-11-17).

Fetches a web page and extracts user-defined structured fields from its HTML using CSS selectors, attributes, or JSON-LD/meta properties

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/web-intelligence/structured-page-extract?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-structured-page-extract-dbd408f5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FBw4IDQ7w1T7L1oDmGXK8

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 brainiac-structured-page-extract-dbd408f5 -d '<json body>'
```

Example prompt: Fetch https://example.com/product/42 and extract the product title as a string field called 'title', the price as a number field called 'price' using the CSS selector '.product-price', and the main image URL as a url field called 'imageUrl' using selector 'img.hero'.

## When to prefer this

Choose this endpoint when you need to extract specific, named data fields from a known URL in a single call without setting up an account or managing API keys. It is ideal for one-off or low-volume structured data extraction tasks where you can identify the target elements by CSS selector, attribute, or JSON-LD/meta property. Prefer this over headless browser services when the target page renders its key content server-side. The pay-per-call x402 model makes it especially suitable for agent workflows that need to scrape unpredictably or infrequently without subscription overhead.

## Known failure modes

- URL is unreachable or returns a non-200 status — httpStatus field will reflect the actual status code
- CSS selector matches no elements — field value will be null or missing with a warning
- Multiple elements match a selector — first match is used and a warning is emitted
- JSON-LD on the page cannot be parsed — a top-level warning is added
- Page requires JavaScript rendering — static HTTP fetch may return incomplete HTML
- URL redirects to a different final page — finalUrl will differ from requestedUrl
- Schema array is empty or exceeds 12 items — request rejected with validation error
- Field name doesn't match the required pattern — request rejected

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

Returns a JSON object containing an array of extracted fields (each with name, type, and value), the final resolved URL after any redirects, HTTP status code, content type, retrieval timestamp, and any warnings encountered during extraction (e.g. multiple element matches, JSON-LD parse errors). Also includes a sources array noting where the data came from.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "pattern": "^https?:\\/\\/\\S+$",
   "maxLength": 2000,
   "minLength": 8
  },
  "schema": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "name",
     "type"
    ],
    "properties": {
     "name": {
      "type": "string",
      "pattern": "^[A-Za-z][A-Za-z0-9_]{0,40}$"
     },
     "type": {
      "enum": [
       "string",
       "number",
       "boolean",
       "url"
      ],
      "type": "string"
     },
     "selector": {
      "type": "string",
      "maxLength": 160,
      "minLength": 1
     },
     "attribute": {
      "type": "string",
      "pattern": "^[A-Za-z_:][A-Za-z0-9_:-]{0,40}$"
     }
    },
    "additionalProperties": false
   },
   "maxItems": 12,
   "minItems": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "fields": [
   {
    "name": "heading",
    "type": "string",
    "value": "Example Domain",
    "warnings": [
     "2 elements matched; the first was used."
    ]
   }
  ],
  "sources": [
   {
    "url": "https://example.com/",
    "source": "Public HTTP response",
    "retrievedAt": "2026-11-02T18:00:00.000Z"
   }
  ],
  "finalUrl": "https://example.com/",
  "warnings": [
   "A JSON-LD script could not be parsed."
  ],
  "httpStatus": 200,
  "contentType": "text/html",
  "limitations": [
   "Without a selector, a field is filled only from a JSON-LD property, a meta name or property, or the document title when the field name is title."
  ],
  "retrievedAt": "2026-11-02T18:00:00.000Z",
  "requestedUrl": "https://example.com/"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-structured-page-extract-dbd408f5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
