# NightCobbler Schema Extract

> NightCobbler Schema Extract is a paid API for AI agents from api.nightcobbler.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-12).

Fetches a URL or accepts raw HTML and extracts structured data conforming exactly to a caller-supplied JSON Schema, sourcing from JSON-LD, OpenGraph, Twitter cards, and meta tags.

## Facts

- Endpoint: POST https://api.nightcobbler.com/v1/schema-extract?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nightcobbler-schema-extract-5cbe9bb8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DtsoxgtV7Qq6lFD3088nG

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 nightcobbler-schema-extract-5cbe9bb8 -d '<json body>'
```

Example prompt: Fetch https://www.example.com/products/blue-widget and extract the product name, price (as a number), currency, SKU, brand, and rating into my schema — only return those exact fields, validated.

## When to prefer this

Choose this endpoint when you need structured data extracted from a specific page and want it validated against your own schema with zero tolerance for type mismatches. It is ideal when the target page already publishes machine-readable metadata (JSON-LD, OpenGraph, schema.org), such as e-commerce product pages, news articles, or blog posts. Prefer it over general-purpose scrapers when schema conformance and type validation matter, or when you want to pay only for successful extractions.

## Known failure modes

- Schema uses unsupported constructs ($ref, oneOf, anyOf, allOf) — rejected with validation error
- Schema exceeds 32 fields — rejected
- Neither url nor html supplied — missing required input error
- URL is unreachable or returns non-200 — fetch error
- Extracted data does not match the provided schema — treated as an error (free of charge)
- Page has no machine-readable metadata — all fields returned as missing
- Invalid absolute URL format — rejected

## How this service works

Structured extraction to YOUR schema: POST a URL and a JSON Schema, get back JSON with exactly the fields you named. Reads the data pages already publish for machines (JSON-LD/schema.org, OpenGraph, Twitter cards, meta) and conforms it to your types — product price, currency, SKU, brand, rating, author, dates. Validated before it returns: a result that does not match your schema is an error, and errors are free.

## Output

A JSON object containing your schema filled with values sourced from the page's machine-readable metadata (JSON-LD, OpenGraph, Twitter cards, meta tags), plus a 'found' list of successfully populated fields, a 'missing' list of fields not found on the page, a 'sources' array indicating which metadata formats were used, and a 'fetched_at' timestamp. The response is guaranteed to match your schema or an error is returned (errors are free).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "schema"
 ],
 "properties": {
  "url": {
   "type": "string",
   "description": "Absolute http(s) URL to fetch. Supply this or 'html'."
  },
  "html": {
   "type": "string",
   "description": "Raw HTML you already have. Supply this or 'url'."
  },
  "schema": {
   "type": "object",
   "description": "JSON Schema: {type:'object', properties:{<field>:{type:'string'|'number'|'integer'|'boolean'|'array'}}, required:[...]}. Flat, scalars and scalar arrays, max 32 fields. $ref/oneOf/anyOf/allOf are rejected."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string"
  },
  "data": {
   "type": "object",
   "description": "Your schema, filled from the page."
  },
  "found": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "missing": {
   "type": "array",
   "items": {
    "type": "string"
   }
  },
  "sources": {
   "type": "array",
   "items": {
    "enum": [
     "json-ld",
     "opengraph",
     "meta",
     "title"
    ],
    "type": "string"
   }
  },
  "fetched_at": {
   "type": "string",
   "format": "date-time"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nightcobbler-schema-extract-5cbe9bb8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.nightcobbler.com](https://www.zero.xyz/host/api.nightcobbler.com/llms.txt)
