# Structura — Messy Input to Schema-Conformant JSON

> Structura — Messy Input to Schema-Conformant JSON is a paid API for AI agents from structura.x.c00l.site, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Converts URLs, HTML, plain text, or PDF-like blobs into JSON that validates against a user-supplied JSON Schema, with repair attempts tracked.

## Facts

- Endpoint: POST https://structura.x.c00l.site/infer
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/structura-messy-input-to-schema-conformant-json-e8089730
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HqypORTBrgdGmCb18dnNy

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 structura-messy-input-to-schema-conformant-json-e8089730 -d '<json body>'
```

Example prompt: Fetch the product page at https://example.com/widget-pro and extract the name and price into JSON that validates against this schema: {"type":"object","required":["name","price"],"properties":{"name":{"type":"string"},"price":{"type":"number"}}}.

## When to prefer this

Choose Structura when you need provably schema-valid JSON output from unstructured or semi-structured sources (URLs, HTML, text, PDFs) and correctness matters — especially when downstream systems require strict schema conformance. It is preferable to generic web scrapers or LLM extraction pipelines when you need the 'valid' guarantee and repair-attempt transparency, and when you are willing to pay per call for reliability.

## Known failure modes

- URL is inaccessible or returns non-200 status — extraction fails with an error
- Input content is too ambiguous or sparse to map to the supplied schema — may return valid:false
- Schema is too strict and output cannot be repaired to conform — repairAttempts exhausted
- PDF blob is image-based (scanned) and text extraction is not possible
- Schema references unsupported JSON Schema features or draft versions
- Payment not received via x402 protocol — request rejected before processing

## How this service works

Turn a URL, HTML, text or a PDF-ish blob into JSON that provably validates against your JSON Schema. Paid per call over x402.

## Output

Returns a JSON object containing: 'data' (the extracted, schema-conformant JSON payload), 'valid' (boolean indicating whether the output passes JSON Schema validation), 'schema' (the JSON Schema used or inferred), 'documentKind' (a human-readable label for the detected document type), and 'repairAttempts' (number of times the system retried to coerce the output into a valid form).

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "name": "Widget Pro",
   "price": 19.99
  },
  "valid": true,
  "schema": {
   "type": "object",
   "title": "Product Listing",
   "$schema": "https://json-schema.org/draft/2020-12/schema",
   "required": [
    "name",
    "price"
   ],
   "properties": {
    "name": {
     "type": [
      "string",
      "null"
     ],
     "description": "Product name."
    },
    "price": {
     "type": [
      "number",
      "null"
     ],
     "description": "Numeric price."
    }
   }
  },
  "documentKind": "e-commerce product page",
  "repairAttempts": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/structura-messy-input-to-schema-conformant-json-e8089730/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from structura.x.c00l.site](https://www.zero.xyz/host/structura.x.c00l.site/llms.txt)
