structured-data-extraction
structured-extract
schema-extract
json-mode
url-to-json
typed-extract
product-data-extraction
web-scraping-api
data-extraction-api
llm-ready-data
verifiable-extract

Structured Data Extraction API — URL to typed JSON (schema extract, keyless x402)

TYPED structured extract for autonomous agents — URL + schema → a clean, type-safe JSON record. Where /buy/fetch returns page TEXT (and ?extract= returns string-only fields), THIS returns the schema-conformant object an LLM/RAG/trading pipeline actually consumes: pass ?url=…&schema=title,price:number,rating:number,inStock:boolean and get back { title:"…", price:19.99, rating:4.5, inStock:true } — numbers as numbers, booleans as booleans, absent fields null (honest). schema accepts the URL-friendly compact form (field[:type], type in string|number|integer|boolean) OR a Firecrawl/OpenAI-style JSON-Schema object ({"properties":{"price":{"type":"number"}}}). That is Firecrawl's paid 'JSON mode' headline guarantee — type-safety, 'numbers as numbers not strings' — done DETERMINISTICALLY from the page's own JSON-LD/OpenGraph/meta/microdata: keyless, NO LLM call, NO API key, NO signup, $0.004/call, paid in-band over HTTP 402 (x402, USDC on Base mainnet). The typed record is folded into the SIGNED provenance attestation too (EIP-191, ecrecoverable OFFLINE), so a buyer can prove the EXTRACTED FIELDS — not just raw bytes — are exactly what MERCURY resolved. Honest charge-per-ATTEMPT: every call returns a structured result (success OR an ok:false reason). Same SSRF guard, 5s timeout, 10MB cap, no mint.

get/buy/extract

Request

Query parameters

urlstring required

the page to extract from (http/https)

schemastring required

fields to extract. COMPACT: comma list of field[:type] (type in string|number|integer|boolean, default string), e.g. title,price:number,rating:number,inStock:boolean. OR a JSON-Schema string ({"properties":{"price":{"type":"number"}}}). Resolved from JSON-LD/OpenGraph/meta/microdata.

format'text' | 'markdown'

optional: text (default) or markdown for the page-text field

Response

Delivered after the x402 payment settles on Base mainnet.

okboolean required

true on success; false on an honest failure (still delivered)

urlstring required

final URL after redirects

statusinteger

upstream HTTP status

extractobject

the TYPED record: each requested field resolved + coerced to its declared type (numbers as numbers, booleans as booleans), absent fields null. Deterministic, keyless, no LLM.

schemaobject

echo of the resolved field->type map that was applied

coercedstring[]

names of the fields that were actually type-cast (present only when non-empty)

titlestring

page <title>

textstring

cleaned page text (also returned; markdown if ?format=markdown)

bytesinteger

raw body size

contentTypestring
truncatedboolean
redirectsstring[]

redirect chain followed

fetchedAtstring

ISO timestamp of the fetch (also in the signed attestation)

meteredboolean
deliveredstring
kindstring
errorstring

present only when ok:false

Changes

No recorded changes to this operation across all 1 revision of this API.