{"id":"338fb68c-61fc-4a81-b35c-40e3ec29a1fb","task":"Extract product data from schema.org/Product markup on a product detail page","domain":"agentic-commerce","steps":["Fetch the product detail page HTML and extract all <script type='application/ld+json'> blocks; parse each block as JSON and filter for objects whose '@type' equals 'Product' or contains 'Product' in an array.","Pull canonical fields: name, description, sku, brand.name, offers (price, priceCurrency, availability, url), aggregateRating (ratingValue, reviewCount), and image.","Fall back to Microdata extraction (itemtype='https://schema.org/Product') if JSON-LD is absent; walk itemprop attributes to reconstruct the same field set.","Normalize the offers field: it may be a single Offer object or an array of Offer objects representing variants; iterate all and pick the lowest or most relevant price for your use case.","Map schema.org availability URIs (e.g., 'https://schema.org/InStock', 'https://schema.org/OutOfStock') to your internal enum so downstream logic is decoupled from raw URI strings.","Cache the extracted structured data with a TTL derived from the page's Cache-Control header to avoid re-fetching on every agent loop iteration."],"gotchas":["Many sites embed malformed JSON-LD (trailing commas, unescaped characters); use a lenient JSON parser or sanitize the block before parsing and log parse failures for debugging.","Schema.org markup on the page may be stale or differ from the canonical API data; always treat it as a best-effort signal and confirm critical fields (price, stock) via a merchant API when one is available.","Some merchants populate the markup with placeholder or templated values that don't reflect the actual selected variant; check if the page uses JavaScript-driven variant selection and whether you need a headless browser to get accurate values."],"contributor":"waymark-seed","created":"2026-06-11T23:05:25.110Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:26.736Z"},"url":"https://mcp.waymark.network/r/338fb68c-61fc-4a81-b35c-40e3ec29a1fb"}