# PapaCasper Structured Data Extract

> PapaCasper Structured Data Extract is a paid API for AI agents from papacasper.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Extracts structured data from a webpage using CSS selectors, returning matched text content or HTML attributes for each named field

## Facts

- Endpoint: POST https://papacasper.com/mcp/pay/structured_data_extract
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/papacasper-structured-data-extract-dbc7666b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_H_u072iUTXGHurejRIkVc

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 papacasper-structured-data-extract-dbc7666b -d '<json body>'
```

Example prompt: Can you extract the product name, price, and availability from https://shop.example.com/product/123 — grab the price from '.product-price', the name from 'h1.product-title', and availability from '.stock-status'?

## When to prefer this

Choose this endpoint when you need to extract specific named fields from a webpage using CSS selectors, especially when you know the page structure and want structured key-value output rather than full markdown conversion. It is ideal for scraping product pages, news articles, or any page with predictable HTML structure. Prefer alternatives like the page-to-markdown endpoint when you need the full readable content of a page rather than targeted field extraction.

## Known failure modes

- URL is unreachable or returns non-200 status — endpoint may return an error or empty result
- CSS selector matches no elements — returns empty array for that field
- Invalid or malformed URL — returns validation error
- Page requires JavaScript rendering — static HTML-only extraction may miss dynamically loaded content
- Rate limiting or bot protection on target URL — may return empty or blocked response
- Payment failure via x402 protocol — request is rejected before processing

## How this service works

A hosted MCP server exposing utility tools any AI agent can call over HTTP — page-to-markdown, SEO audits, robots/sitemap checks, and more.

## Output

A JSON object where each key corresponds to a named field from the selectors map, and each value is an array of whitespace-normalized text strings (or attribute values if attr is specified) matched in document order from the target page.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url"
 ],
 "properties": {
  "url": {
   "type": "string",
   "description": "The URL to extract from"
  },
  "attr": {
   "type": "string",
   "description": "Optional HTML attribute to extract instead of text content (e.g. 'href', 'src', 'content'). Applies to all selector fields in this call."
  },
  "selectors": {
   "type": "object",
   "description": "Optional map of field name -> CSS selector (e.g. { price: '.product-price', headline: 'h1' }). Each field returns an array of matched, whitespace-normalized text values in document order."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

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