{"id":"commerce.main-product","version":"1.0.0","category":"commerce","description":"Identify the main Product or ProductGroup from supplied JSON-LD HTML using identity, mainEntity and canonical evidence; abstain on ambiguity.","priceMicroUsdc":0,"priceRevision":"2026-10-06-free-validation","pricingStatus":"free-validation","inputSchema":{"type":"object","properties":{"html":{"type":"string","maxLength":100000},"pageUrl":{"type":"string","maxLength":2048}},"required":["html"],"additionalProperties":false},"outputSchema":{"type":"object","properties":{"status":{"type":"string","enum":["selected","ambiguous","no_product"]},"reason":{"type":"string"},"selectedId":{"type":["string","null"]},"selected":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["Product","ProductGroup"]},"name":{"type":["string","null"]},"sku":{"type":["string","null"]},"gtin":{"type":["string","null"]},"brand":{"type":["string","null"]},"mpn":{"type":["string","null"]},"url":{"type":["string","null"]},"variantCount":{"type":"number"},"sources":{"type":"array","items":{"type":"object","properties":{"block":{"type":"number"},"pointer":{"type":"string"}},"required":["block","pointer"],"additionalProperties":false}},"offers":{"type":"array","items":{"type":"object","properties":{"productName":{"type":["string","null"]},"sku":{"type":["string","null"]},"gtin":{"type":["string","null"]},"offerType":{"type":"string"},"price":{"type":["string","null"]},"currency":{"type":["string","null"]},"lowPrice":{"type":["string","null"]},"highPrice":{"type":["string","null"]},"url":{"type":["string","null"]},"availability":{"type":["string","null"]},"itemCondition":{"type":["string","null"]},"priceValidUntil":{"type":["string","null"]},"source":{"type":"object","properties":{"productBlock":{"type":"number"},"productPointer":{"type":"string"},"offerBlock":{"type":"number"},"offerPointer":{"type":"string"}},"required":["productBlock","productPointer","offerBlock","offerPointer"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["productName","sku","gtin","offerType","price","currency","lowPrice","highPrice","url","availability","itemCondition","priceValidUntil","source","warnings"],"additionalProperties":false}}},"required":["id","kind","name","sku","gtin","brand","mpn","url","variantCount","sources","offers"],"additionalProperties":false},{"type":"null"}]},"candidates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["Product","ProductGroup"]},"name":{"type":["string","null"]},"sku":{"type":["string","null"]},"gtin":{"type":["string","null"]},"brand":{"type":["string","null"]},"mpn":{"type":["string","null"]},"url":{"type":["string","null"]},"variantCount":{"type":"number"},"sources":{"type":"array","items":{"type":"object","properties":{"block":{"type":"number"},"pointer":{"type":"string"}},"required":["block","pointer"],"additionalProperties":false}},"offers":{"type":"array","items":{"type":"object","properties":{"productName":{"type":["string","null"]},"sku":{"type":["string","null"]},"gtin":{"type":["string","null"]},"offerType":{"type":"string"},"price":{"type":["string","null"]},"currency":{"type":["string","null"]},"lowPrice":{"type":["string","null"]},"highPrice":{"type":["string","null"]},"url":{"type":["string","null"]},"availability":{"type":["string","null"]},"itemCondition":{"type":["string","null"]},"priceValidUntil":{"type":["string","null"]},"source":{"type":"object","properties":{"productBlock":{"type":"number"},"productPointer":{"type":"string"},"offerBlock":{"type":"number"},"offerPointer":{"type":"string"}},"required":["productBlock","productPointer","offerBlock","offerPointer"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["productName","sku","gtin","offerType","price","currency","lowPrice","highPrice","url","availability","itemCondition","priceValidUntil","source","warnings"],"additionalProperties":false}}},"required":["id","kind","name","sku","gtin","brand","mpn","url","variantCount","sources","offers"],"additionalProperties":false}},"distinctProducts":{"type":"number"},"canonicalUrl":{"type":["string","null"]},"pageTypes":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"scope":{"type":"string"}},"required":["status","reason","selectedId","selected","candidates","distinctProducts","canonicalUrl","pageTypes","warnings","scope"],"additionalProperties":false},"example":{"html":"<link rel=\"canonical\" href=\"https://example.com/coffee\"><script type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https://example.com/coffee\",\"mainEntity\":{\"@id\":\"#coffee\"}},{\"@type\":\"Product\",\"@id\":\"#coffee\",\"name\":\"Coffee beans\",\"sku\":\"COFFEE-500\",\"offers\":{\"@type\":\"Offer\",\"price\":\"8.99\",\"priceCurrency\":\"USD\",\"availability\":\"https://schema.org/InStock\"}},{\"@type\":\"Product\",\"name\":\"Related mug\",\"sku\":\"MUG-1\",\"offers\":{\"@type\":\"Offer\",\"price\":\"12.00\",\"priceCurrency\":\"USD\"}}]}</script>","pageUrl":"https://example.com/coffee"},"limits":{"inputBytes":131072,"outputBytes":65536,"networkTimeoutMs":0},"network":false,"sensitive":false,"route":"/v1/tools/commerce.main-product","priceMicroUsd":0,"exampleUrl":"https://agent-utilities.agent-utilities.workers.dev/v1/content/examples/commerce.main-product","page":"https://agent-utilities.agent-utilities.workers.dev/tools/commerce.main-product","execution":{"method":"POST","url":"https://agent-utilities.agent-utilities.workers.dev/v1/tools/commerce.main-product","requiredHeaders":{"Content-Type":"application/json"},"authentication":"none","paymentRequired":false,"chargedMicroUsd":"0","scope":"All available hosted tools are free during validation. Existing input, output and source-access limits apply. Full tools and the combined report share capacity limits that count attempts, including failed executions and marked checks; they are not per-user allowances. No account, API key, wallet or funding is needed. Existing credit balances are preserved. Live Reddit remains unavailable until configured. Paid billing will not resume automatically."}}