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 Field | UCP Field | Notes |
|---|---|---|
product.title | line_item.name | Direct mapping |
product.price | line_item.unit_price.amount | Converted to cents (integer) |
product.currency | line_item.unit_price.currency | ISO 4217 |
_shopgraph.* | _extensions.shopgraph.* | Metadata in UCP extensions |
Graceful Degradation
When extraction is partial, the _extraction_status field indicates quality:
| Status | Meaning |
|---|---|
complete | All core fields extracted successfully |
partial | Some fields missing or below confidence threshold |
minimal | Only name and URL available |
failed | Extraction failed entirely |
See the full UCP Line Item schema reference for all fields and types.