{"openapi":"3.1.0","info":{"title":"JsonRecon - Schema Extraction API","version":"1.2.0","description":"Concise Schema.org JSON-LD extraction and Product page-consistency verification. Paid per successful request via API key or x402 (USDC on Base).","contact":{"url":"https://jsonrecon.com"}},"servers":[{"url":"https://jsonrecon.com"}],"paths":{"/extract":{"get":{"operationId":"extractSchema","summary":"Full Schema.org extraction ($0.01 USDC on success)","description":"Converts a public page into concise, validated Schema.org JSON-LD using one of 200+ entity types. Requires x402 payment authorization or an API key. Payment settles only after a successful response. Call GET /check?url=TARGET first.","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"URL to extract structured data from"},{"name":"schema_type","in":"query","required":false,"schema":{"type":"string","default":"auto"},"description":"Schema.org type to extract, or \"auto\" for detection"},{"name":"suggest","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"When true, AI suggests the optimal schema type for the page"}],"responses":{"200":{"description":"Extraction successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullExtractionResult"}}}},"400":{"description":"Bad request - missing or invalid URL, DNS rebinding attempt, or domain blocked before payment"},"402":{"description":"Payment required - decode the base64 payment-required response header, sign a Permit2 payload, and resend with a payment-signature header. Payment is non-refundable once settled."},"422":{"description":"Unprocessable - target URL returned a dead link, server error, WAF, CAPTCHA, or error page."},"502":{"description":"Upstream extraction failed. API-key debits are refunded automatically; x402 settlements are non-refundable."}}},"post":{"operationId":"extractSchemaPost","summary":"Full Schema.org extraction via POST ($0.01 USDC on success)","description":"Same as GET /extract but accepts parameters in JSON body. Backward-compatible for API key users.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"URL to extract structured data from"},"schema_type":{"type":"string","default":"auto","description":"Schema.org type to extract, or \"auto\" for detection"},"suggest":{"type":"boolean","default":false,"description":"When true, AI suggests the optimal schema type"}}}}}},"responses":{"200":{"description":"Extraction successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FullExtractionResult"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment required"},"422":{"description":"Unprocessable - dead link or extraction failed"},"502":{"description":"Upstream extraction failed"}}}},"/extract/lite":{"get":{"operationId":"extractSchemaLite","summary":"Lightweight extraction - existing JSON-LD only ($0.005 USDC)","description":"Returns existing Schema.org JSON-LD markup from a page. Falls back to WebPage if no markup is found. Navigation-only results are marked as low information. Pass the target URL as a query parameter.","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"URL to extract existing JSON-LD from"},{"name":"schema_type","in":"query","required":false,"schema":{"type":"string","default":"auto"},"description":"Schema.org type hint (optional)"}],"responses":{"200":{"description":"Extraction successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiteExtractionResult"}}}},"400":{"description":"Bad request - missing or invalid URL"},"402":{"description":"Payment required"},"422":{"description":"Unprocessable - dead link or extraction failed"},"502":{"description":"Upstream extraction failed"}}},"post":{"operationId":"extractSchemaLitePost","summary":"Lightweight extraction via POST ($0.005 USDC)","description":"Same as GET /extract/lite but accepts parameters in JSON body.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"schema_type":{"type":"string","default":"auto"}}}}}},"responses":{"200":{"description":"Extraction successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiteExtractionResult"}}}},"400":{"description":"Bad request"},"402":{"description":"Payment required"},"422":{"description":"Unprocessable - dead link or extraction failed"},"502":{"description":"Upstream extraction failed"}}}},"/extract/verified":{"get":{"operationId":"verifyProduct","summary":"Verify Product facts against the requested page ($0.02 USDC on success)","description":"Returns a concise Schema.org Product plus field-level corroboration, contradictions, observation time, and a content hash. Verdicts are verified, conflicted, or insufficient_evidence. Verification means page consistency at observation time, not independent merchant truth. Non-product pages return 422 and do not settle.","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"Public Product page URL to verify"}],"responses":{"200":{"description":"Product assessment completed; payment settles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedProductResult"}}}},"400":{"description":"Missing, invalid, or unsafe URL; payment does not settle"},"402":{"description":"Payment authorization required"},"422":{"description":"Not a Product page or page unavailable; payment does not settle"},"502":{"description":"Verification failed; payment does not settle"}}},"post":{"operationId":"verifyProductPost","summary":"Verify Product facts via POST ($0.02 USDC on success)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"Product assessment completed; payment settles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedProductResult"}}}},"400":{"description":"Bad request; payment does not settle"},"402":{"description":"Payment authorization required"},"422":{"description":"Not a Product page; payment does not settle"},"502":{"description":"Verification failed; payment does not settle"}}}},"/check":{"get":{"operationId":"preflightCheck","summary":"Free pre-flight URL assessment","description":"Check a URL before paying for extraction. Returns difficulty rating, expected schema type, and known issues. Always call this first on unknown domains.","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"},"description":"URL to assess"}],"responses":{"200":{"description":"Preflight check result with difficulty, expected schema type, and any known issues"},"400":{"description":"Missing or invalid URL parameter"}}}},"/health":{"get":{"operationId":"healthCheck","summary":"Service health status (free)","responses":{"200":{"description":"Service is healthy"},"503":{"description":"Service degraded"}}}},"/.well-known/x402":{"get":{"operationId":"paymentDiscovery","summary":"x402 payment metadata and service discovery (free)","responses":{"200":{"description":"Payment metadata including pricing, supported networks, and schema types"}}}}},"components":{"schemas":{"FullExtractionResult":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"JSON Recon Full extraction result","description":"A successful Full extraction response containing one primary Schema.org JSON-LD entity and extraction metadata.","type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","description":"A Schema.org JSON-LD entity. Its fields vary with schema_type.","properties":{"@context":{},"@type":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"minItems":1}]}},"additionalProperties":true},"schema_type":{"type":"string","minLength":1,"description":"The primary Schema.org type represented by data."},"confidence":{"type":"string","enum":["high","medium","low"]},"cached":{"type":"boolean"},"extraction_ms":{"type":"number","minimum":0},"source":{"type":"string","description":"The public provenance category for the extracted entity."},"page_schemas":{"type":"array","items":{"type":"string"},"uniqueItems":true},"extracted_at":{"type":"string"},"_meta":{"type":"object","additionalProperties":true},"recommendation":{"type":"string"},"suggested_type":{"type":"string","minLength":1},"suggested_reason":{"type":"string"},"suggested_data":{"type":"object","description":"A Schema.org JSON-LD entity. Its fields vary with schema_type.","properties":{"@context":{},"@type":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"minItems":1}]}},"additionalProperties":true}},"required":["success","data","schema_type","confidence","cached","extraction_ms"],"additionalProperties":true},"LiteExtractionResult":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"JSON Recon Lite retrieval result","description":"A successful Lite response containing Schema.org JSON-LD published by the requested page and an explicit quality signal when the result is navigation-only.","type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","description":"A Schema.org JSON-LD entity. Its fields vary with schema_type.","properties":{"@context":{},"@type":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"minItems":1}]}},"additionalProperties":true},"schema_type":{"type":"string","minLength":1,"description":"The primary Schema.org type represented by data."},"confidence":{"type":"string","enum":["high","medium","low"]},"cached":{"type":"boolean"},"extraction_ms":{"type":"number","minimum":0},"source":{"type":"string","description":"The public provenance category for the extracted entity."},"page_schemas":{"type":"array","items":{"type":"string"},"uniqueItems":true},"extracted_at":{"type":"string"},"_meta":{"type":"object","additionalProperties":true},"recommendation":{"type":"string"},"information_quality":{"type":"object","properties":{"level":{"type":"string","enum":["low"]},"reason":{"type":"string","enum":["navigation_or_container_schema_only"]}},"required":["level","reason"],"additionalProperties":false}},"required":["success","data","schema_type","confidence","cached","extraction_ms"],"additionalProperties":true},"VerifiedProductResult":{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"JSON Recon Verified Product result","description":"A successful Product verification response with a page-consistency verdict, field evidence, contradictions, coverage, observation time, and content hash.","type":"object","properties":{"success":{"type":"boolean","const":true},"data":{"type":"object","description":"The sanitized Product entity whose fields were assessed.","properties":{"@context":{},"@type":{"type":"string","const":"Product"},"offers":{"oneOf":[{"type":"object","properties":{"price":{"oneOf":[{"type":"number"},{"type":"string"}],"description":"A Product price. Parseable offer prices are returned as JSON numbers; retained source text can be a string. Do not infer a string-only type from source markup."}},"additionalProperties":true},{"type":"array","items":{"type":"object","properties":{"price":{"oneOf":[{"type":"number"},{"type":"string"}],"description":"A Product price. Parseable offer prices are returned as JSON numbers; retained source text can be a string. Do not infer a string-only type from source markup."}},"additionalProperties":true}}],"description":"One offer or an array of offers. Price is optional; clients must accept numeric prices as well as retained text."}},"additionalProperties":true,"required":["@type"]},"schema_type":{"type":"string","const":"Product"},"verification_version":{"type":"string","pattern":"^product\\/v[0-9]+$"},"verdict":{"type":"string","enum":["verified","conflicted","insufficient_evidence"]},"verification":{"type":"object","properties":{"scope":{"type":"string","const":"page_consistency"},"observed_at":{"type":"string"},"content_sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"fields":{"type":"object","properties":{"price":{"type":"object","properties":{"value":{"oneOf":[{"type":"number"},{"type":"string"}],"description":"A Product price. Parseable offer prices are returned as JSON numbers; retained source text can be a string. Do not infer a string-only type from source markup."},"status":{"type":"string","enum":["corroborated","conflicted","single_source"]},"sources":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["json_ld","metadata","microdata","visible_text"]},"value":{"oneOf":[{"type":"number"},{"type":"string"}],"description":"Observed price in this source representation. JSON-LD, metadata, and microdata may retain strings; visible-text evidence may contain the normalized number."},"excerpt":{"type":"string","maxLength":160}},"required":["channel","value"],"additionalProperties":false}}},"required":["value","status","sources"],"additionalProperties":false}},"additionalProperties":{"type":"object","properties":{"value":{"description":"A bounded value observed in one representation of the page. Source values retain their representation: price evidence may mix strings and numbers."},"status":{"type":"string","enum":["corroborated","conflicted","single_source"]},"sources":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["json_ld","metadata","microdata","visible_text"]},"value":{"description":"A bounded value observed in one representation of the page. Source values retain their representation: price evidence may mix strings and numbers."},"excerpt":{"type":"string","maxLength":160}},"required":["channel","value"],"additionalProperties":false}}},"required":["value","status","sources"],"additionalProperties":false}},"contradictions":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"severity":{"type":"string","const":"critical"},"values":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string","enum":["json_ld","metadata","microdata","visible_text"]},"value":{"description":"A bounded value observed in one representation of the page. Source values retain their representation: price evidence may mix strings and numbers."}},"required":["channel","value"],"additionalProperties":false}}},"required":["field","severity","values"],"additionalProperties":false}},"coverage":{"type":"object","properties":{"corroborated":{"type":"integer","minimum":0},"conflicted":{"type":"integer","minimum":0},"single_source":{"type":"integer","minimum":0}},"required":["corroborated","conflicted","single_source"],"additionalProperties":false},"ambiguous_offer":{"type":"boolean"},"efficiency":{"type":"object","properties":{"estimate_method":{"type":"string","const":"characters_divided_by_4"},"page_characters":{"type":"integer","minimum":0},"response_characters":{"type":"integer","minimum":0},"estimated_page_tokens":{"type":"integer","minimum":0},"estimated_response_tokens":{"type":"integer","minimum":0},"estimated_tokens_avoided":{"type":"integer","minimum":0}},"required":["estimate_method","page_characters","response_characters","estimated_page_tokens","estimated_response_tokens","estimated_tokens_avoided"],"additionalProperties":false}},"required":["scope","observed_at","content_sha256","fields","contradictions","coverage","ambiguous_offer","efficiency"],"additionalProperties":false},"cached":{"type":"boolean"},"extraction_ms":{"type":"number","minimum":0}},"required":["success","data","schema_type","verification_version","verdict","verification","cached","extraction_ms"],"additionalProperties":false}}},"x-x402":{"paymentProtocol":"x402-v2","currency":"USDC","networks":["base"],"discoveryEndpoint":"/.well-known/x402"}}