UCP Output

Universal Commerce Protocol compatible output for standardized commerce data interchange.

What is UCP?

The Universal Commerce Protocol (UCP) defines a standard schema for representing commerce data across systems. ShopGraph can output extraction results in UCP line_item format, making it directly consumable by any UCP-compatible system.

UCP Schema Compatible — Validated against ucp-schema v1.1.0

Using UCP Output

Add format=ucp to any extraction request:

Request
{
  "url": "https://www.allbirds.com/products/mens-tree-runners",
  "format": "ucp"
}

UCP Line Item Output

UCP Response
{
  "line_item": {
    "id": "shopgraph::allbirds::mens-tree-runners",
    "name": "Men's Tree Runners",
    "description": "Lightweight, breathable sneakers...",
    "unit_price": {
      "amount": 9800,
      "currency": "USD"
    },
    "quantity": 1,
    "sku": "TR-M-001",
    "brand": "Allbirds",
    "category": "Footwear > Sneakers",
    "image_url": "https://cdn.allbirds.com/image/fetch/...",
    "product_url": "https://www.allbirds.com/products/mens-tree-runners",
    "availability": "in_stock",
    "_extensions": {
      "shopgraph": {
        "extraction_method": "schema_org",
        "confidence_score": 0.93,
        "field_confidence": {
          "name": 0.98,
          "unit_price": 0.97,
          "brand": 0.94,
          "availability": 0.91
        }
      }
    }
  },
  "_extraction_status": "complete"
}

Key Differences from Standard Output

Standard FieldUCP FieldNotes
product.titleline_item.nameDirect mapping
product.priceline_item.unit_price.amountConverted to cents (integer)
product.currencyline_item.unit_price.currencyISO 4217
_shopgraph.*_extensions.shopgraph.*Metadata in UCP extensions

Graceful Degradation

When extraction is partial, the _extraction_status field indicates quality:

StatusMeaning
completeAll core fields extracted successfully
partialSome fields missing or below confidence threshold
minimalOnly name and URL available
failedExtraction failed entirely
See the full UCP Line Item schema reference for all fields and types.