# Structured Data Contract Audit

> Structured Data Contract Audit is a paid API for AI agents from api.zfinia.com, paid per call via x402, $0.13/call, status unknown (last checked 2026-10-18).

Audits JSON-LD structured data on a webpage against a caller-defined contract, reporting missing types, missing properties, unknown types, and untyped/contextless blocks after flattening nested and @graph entities.

## Facts

- Endpoint: POST https://api.zfinia.com/x402/v1/structured-data-contract-audit?utm_source=zero.xyz
- Price: $0.13/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/structured-data-contract-audit-0e568d17
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fJ2LhDAp70p8kkAllCckz

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 structured-data-contract-audit-0e568d17 -d '<json body>'
```

Example prompt: Can you audit the JSON-LD structured data on https://example.com/product-page and check that it includes the types Product and Organization, that Product has name, price, and description properties, and that no unknown types are allowed?

## When to prefer this

Choose this endpoint when you need to programmatically enforce a specific JSON-LD contract on a webpage — especially when entities may be nested inside @graph or other entities that a shallow top-level check would miss. It is ideal for SEO pipelines, CMS publishing gates, or automated QA workflows that need to assert exact type presence, required property coverage, and type allowlists. Prefer it over generic HTML validators or Schema.org linters when you need contract-driven, caller-defined rules rather than general well-formedness checks.

## Known failure modes

- Page URL is unreachable or returns non-200 — audit cannot proceed
- HTML exceeds 262144 character limit — payload rejected
- No JSON-LD blocks found on the page — nothing to audit
- contract.required_types is empty or missing — validation has nothing to check against
- Malformed JSON-LD on the page — blocks may be partially skipped
- Network timeout fetching the supplied URL

## How this service works

Audit the JSON-LD a supplied page declares against a contract the caller states. Entities inside @graph and nested inside other entities are flattened first, because reading only the top level misses every entity a real page declares that way. Reports required types absent, required properties missing per entity, unmentioned types when unknown types are forbidden, entities with no @type, and blocks with no @context. Only JSON-LD is read, and that is stated rather than treated as conformant.

## Output

A structured audit report listing: required types that are absent from the page's JSON-LD; required properties that are missing per matched entity type; unknown or unmentioned types when forbidden; entities that have no @type declared; and JSON-LD blocks that have no @context. Entities nested inside @graph or other entities are flattened before evaluation so nothing is missed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "maxLength": 2048
  },
  "html": {
   "type": "string",
   "maxLength": 262144
  },
  "contract": {
   "type": "object",
   "properties": {
    "required_types": {
     "type": "array",
     "items": {
      "type": "string",
      "maxLength": 128
     },
     "maxItems": 50,
     "minItems": 1
    },
    "required_properties": {
     "type": "object"
    },
    "forbid_unknown_types": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/structured-data-contract-audit-0e568d17/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.zfinia.com](https://www.zero.xyz/host/api.zfinia.com/llms.txt)
