{"uid":"cap_1kItdDXwWWRcJiMaD-KVO","slug":"gateway-d402-xyz-d402-web-extract-structured-json-f52146b4","name":"d402 Web Extract Structured JSON","description":"Paid d402 capability alias for web.extract_structured@1. Workers fetch a page and project observed page data into a requested JSON field set or schema.","url":"https://gateway.d402.xyz/v1/web/extract-structured","method":"POST","headers":{},"bodySchema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Public http(s) URL to fetch and project into structured JSON."},"sync":{"type":"boolean","description":"Optional d402 sync flag. Defaults to gateway policy."},"fields":{"type":"array","items":{"type":"string"},"description":"Optional explicit field names to extract when a full schema is not needed."},"schema":{"type":"object","description":"Optional JSON Schema-like object. Top-level properties define requested output fields."},"timeoutMs":{"type":"number","maximum":45000,"minimum":1,"description":"Optional per-request timeout, capped by gateway policy."}},"additionalProperties":false},"responseSchema":{"type":"object","required":["taskId","status"],"properties":{"error":{"type":["string","null"]},"links":{"type":"object","properties":{"task":{"type":"string"},"result":{"type":"string"},"receipt":{"type":"string"}}},"result":{"type":"object","required":["url","data","contentHash","snapshotCid","extractorVersion"],"properties":{"url":{"type":"string"},"data":{"type":"object"},"title":{"type":["string","null"]},"schema":{"type":["object","null"]},"evidence":{"type":"array","items":{"type":"object"}},"fetchedAt":{"type":"string"},"contentHash":{"type":"string"},"description":{"type":["string","null"]},"serviceName":{"type":"string"},"snapshotCid":{"type":"string"},"canonicalUrl":{"type":["string","null"]},"missingFields":{"type":"array","items":{"type":"string"}},"serviceVersion":{"type":"string"},"extractedFields":{"type":"array","items":{"type":"string"}},"extractorVersion":{"type":"string"}}},"status":{"enum":["accepted","rejected","running","error"],"type":"string"},"taskId":{"type":"string"},"settlement":{"type":["object","null"],"additionalProperties":true},"x402Settlement":{"type":["object","null"],"additionalProperties":true},"validationReceipt":{"type":["object","null"],"additionalProperties":true}}},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_B6dr7ZhTQY2plUTZ8xSTD","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":"gateway.d402.xyz","brandSlug":"gateway-d402-xyz-x402","brandBaseUrl":"https://gateway.d402.xyz","brandDocsUrl":null,"whatItDoes":"Fetches a public web page and extracts structured JSON data matching a requested field list or schema","exampleAgentPrompt":"Pull structured JSON from https://example.com/company-info — I need the fields 'company_name', 'founded_year', 'headquarters', and 'employee_count'.","exampleUseCases":[{"title":"Extract competitor pricing from website","prompt":"Go to https://rivalcompany.com/pricing and pull out the fields 'plan_name', 'monthly_price', 'annual_price', and 'features_included' for each pricing tier as structured JSON."},{"title":"Parse event details into JSON","prompt":"Fetch https://techconference.org/schedule and extract the fields 'event_name', 'date', 'location', 'keynote_speakers', and 'registration_url' as structured JSON for me."},{"title":"Scrape job listing into schema","prompt":"Go to https://jobs.example.com/posting/12345 and give me structured JSON with the fields 'job_title', 'department', 'location', 'salary_range', 'required_skills', and 'application_deadline'."}],"resultDescription":"Returns a taskId and status, plus a result object containing the extracted data as a JSON object keyed by the requested fields, along with extractedFields, missingFields, contentHash, snapshotCid, fetchedAt timestamp, page title, canonical URL, and evidence items for verification.","failureModes":["URL is not publicly accessible or returns non-200 — result will show error status and missing fields","Requested fields not found on page — missingFields array will list them while extractedFields may be empty","Timeout exceeded (>45000ms cap) — gateway returns error status","Malformed or private URL input — rejected with validation error","Page requires JavaScript-heavy rendering that exceeds worker capability — partial or empty data returned"],"whenToPreferThis":"Use this endpoint when you need to extract arbitrary named fields or a custom JSON schema from any public web page, not just a specific content type like articles or products. It is the most flexible extraction endpoint in the d402 suite. Prefer the specialized endpoints (extract_product, extract_article) for those content types since they return normalized schemas. Use this when the page type is general-purpose or the schema is fully custom.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T17:27:50.587Z","isFirstParty":false}