{"uid":"cap_DtsoxgtV7Qq6lFD3088nG","slug":"nightcobbler-schema-extract-5cbe9bb8","name":"NightCobbler Schema Extract","description":"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.","url":"https://api.nightcobbler.com/v1/schema-extract?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":{"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"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_cv-PXUknZcM-h2lNKiT3I","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"E-commerce price and SKU extraction","prompt":"Grab https://shop.example.com/shoes/runner-x and pull out the product name, price as a number, currency code, SKU, and brand name — return them validated against my schema with those exact field names."},{"title":"Article authorship and date harvesting","prompt":"I have this article URL https://blog.example.com/post/2024-trends — extract the author name, publication date, article title, and description into a JSON object with fields author, publishedDate, title, and description."},{"title":"Structured data extraction from raw HTML","prompt":"I already have the HTML for a product page — can you extract the productName, price, rating, and reviewCount from it and give me back a validated JSON object with just those four fields?"}],"resultDescription":"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).","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T06:34:41.850Z","isFirstParty":false,"canonicalSlug":"nightcobbler-schema-extract-5cbe9bb8"}