Agent Utilities
← Commerce data

commerce.feed-page-compare · v1.0.0

Feed Page Compare
for your agent.

Compare supplied feed identity, price, currency and availability with selected JSON-LD product evidence; preserve conflicts and unknown fields.

$0.0010 / call1000 micro-dollar credits
131,072 bytes max input65,536 bytes max output
Works on supplied inputNo external network fetch

Try this on your own data free

FREE, no key. Compare supplied feed identity, price, currency and availability with selected JSON-LD product evidence; preserve conflicts and unknown fields. Entire JSON input: 16384 UTF-8 bytes. Supplied data only; no fetch, payment or automatic paid fallback.

Hosted MCP: agent_utilities_feed_page_compare_preview. Inspect the result status, reasons and source evidence before using an answer.

POST https://agent-utilities.agent-utilities.workers.dev/v1/preview/commerce.feed-page-compare
Content-Type: application/json

{
  "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",
  "feed": {
    "sku": "COFFEE-500",
    "price": "9.49",
    "currency": "USD",
    "availability": "in_stock"
  }
}

Machine-readable trial contracts · Connect your agent

Example input

{
  "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",
  "feed": {
    "sku": "COFFEE-500",
    "price": "9.49",
    "currency": "USD",
    "availability": "in_stock"
  }
}

Example output

{
  "status": "mismatch",
  "identityStatus": "match",
  "selection": {
    "status": "selected",
    "reason": "webpage_main_entity",
    "selectedId": "product-1"
  },
  "checks": [
    {
      "field": "sku",
      "feedValue": "COFFEE-500",
      "pageValues": [
        "COFFEE-500"
      ],
      "status": "match",
      "reason": "supplied_evidence_comparison"
    },
    {
      "field": "gtin",
      "feedValue": null,
      "pageValues": [],
      "status": "not_supplied",
      "reason": "feed_field_not_supplied"
    },
    {
      "field": "mpn",
      "feedValue": null,
      "pageValues": [],
      "status": "not_supplied",
      "reason": "feed_field_not_supplied"
    },
    {
      "field": "price",
      "feedValue": "9.49",
      "pageValues": [
        "8.99"
      ],
      "status": "mismatch",
      "reason": "supplied_evidence_comparison"
    },
    {
      "field": "currency",
      "feedValue": "USD",
      "pageValues": [
        "USD"
      ],
      "status": "match",
      "reason": "supplied_evidence_comparison"
    },
    {
      "field": "availability",
      "feedValue": "in_stock",
      "pageValues": [
        "in_stock"
      ],
      "status": "match",
      "reason": "supplied_evidence_comparison"
    }
  ],
  "evidence": {
    "productSources": [
      {
        "block": 0,
        "pointer": "/@graph/1"
      }
    ],
    "offerSources": [
      {
        "productBlock": 0,
        "productPointer": "/@graph/1",
        "offerBlock": 0,
        "offerPointer": "/@graph/1/offers"
      }
    ]
  },
  "warnings": [],
  "scope": "Comparison of supplied feed and JSON-LD page evidence, not current retailer state. Price/stock comparisons require an exact supplied GTIN, SKU or MPN match; conflicting identity blocks them. Group variants, multiple conflicting offers, missing and incomplete fields stay inconclusive. No fetching, merchant-account access or live verification."
}

Generated from the actual handler using this example input; this is a preview, not a paid API call. Paid responses wrap the result with a receipt and recovery expiry.

Read this input and result as free JSON ↗

Call it from your agent

Add credits in the workspace and keep your API key in private environment storage. Use the same request ID and exact body to recover a lost response within ten minutes.

// Node.js 22+. Read the key from your private environment.
const requestId = Date.now() + '_' + crypto.randomUUID();
const response = await fetch('https://agent-utilities.agent-utilities.workers.dev/v1/tools/commerce.feed-page-compare', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer ' + process.env.AGENT_UTILITIES_API_KEY,
    'Idempotency-Key': requestId
  },
  body: JSON.stringify({
  "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",
  "feed": {
    "sku": "COFFEE-500",
    "price": "9.49",
    "currency": "USD",
    "availability": "in_stock"
  }
})
});
const data = await response.json();
if (!response.ok) throw new Error(data.error?.message ?? 'Request failed');
console.log(data);
// On response loss, retry this SAME requestId, tool and body.
// Do not rerun the line that generates requestId for a retry.
Input JSON Schema
{
  "type": "object",
  "properties": {
    "html": {
      "type": "string",
      "maxLength": 100000
    },
    "pageUrl": {
      "type": "string",
      "maxLength": 2048
    },
    "feed": {
      "type": "object",
      "properties": {
        "sku": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "gtin": {
          "type": "string",
          "pattern": "^\\d{8,14}$"
        },
        "mpn": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "price": {
          "type": "string",
          "maxLength": 30
        },
        "currency": {
          "type": "string",
          "pattern": "^[A-Z]{3}$"
        },
        "availability": {
          "type": "string",
          "maxLength": 100
        }
      },
      "required": [],
      "additionalProperties": false
    },
    "offerUrl": {
      "type": "string",
      "maxLength": 2048
    }
  },
  "required": [
    "html",
    "feed"
  ],
  "additionalProperties": false
}
Output JSON Schema
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "match",
        "mismatch",
        "identity_mismatch",
        "inconclusive"
      ]
    },
    "identityStatus": {
      "type": "string",
      "enum": [
        "match",
        "mismatch",
        "unknown"
      ]
    },
    "selection": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "selected",
            "ambiguous",
            "no_product"
          ]
        },
        "reason": {
          "type": "string"
        },
        "selectedId": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "status",
        "reason",
        "selectedId"
      ],
      "additionalProperties": false
    },
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "feedValue": {
            "type": [
              "string",
              "null"
            ]
          },
          "pageValues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "match",
              "mismatch",
              "ambiguous",
              "unknown",
              "not_supplied"
            ]
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "feedValue",
          "pageValues",
          "status",
          "reason"
        ],
        "additionalProperties": false
      }
    },
    "evidence": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "productSources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "block": {
                    "type": "number"
                  },
                  "pointer": {
                    "type": "string"
                  }
                },
                "required": [
                  "block",
                  "pointer"
                ],
                "additionalProperties": false
              }
            },
            "offerSources": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "productBlock": {
                    "type": "number"
                  },
                  "productPointer": {
                    "type": "string"
                  },
                  "offerBlock": {
                    "type": "number"
                  },
                  "offerPointer": {
                    "type": "string"
                  }
                },
                "required": [
                  "productBlock",
                  "productPointer",
                  "offerBlock",
                  "offerPointer"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "productSources",
            "offerSources"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "scope": {
      "type": "string"
    }
  },
  "required": [
    "status",
    "identityStatus",
    "selection",
    "checks",
    "evidence",
    "warnings",
    "scope"
  ],
  "additionalProperties": false
}

Before you integrate

Prices are experimental. The service currently allows 1,000 new calls per day per payment rail across all accounts. Failed operations return reserved credits. Successful results are encrypted for ten-minute retry recovery. Review data handling and service limits.

Related tools

commerce $0.0003 / call

GTIN Validate

Validate GTIN-8, UPC/GTIN-12, EAN/GTIN-13 and GTIN-14 check digits; no product lookup.

commerce.gtin-validate

commerce $0.0005 / call

Variant Compare

Compare requested product attributes with an offered variant and list missing or mismatched fields.

commerce.variant-compare

commerce $0.0008 / call

Pack Plan

Choose the lowest-cost whole-pack combination for a required count with exact prices and explicit pack limits; up to 20 interchangeable offers.

commerce.pack-plan