{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shopsavvy-com/json-schema/shopsavvy-com-product-schema.json",
  "title": "Product",
  "description": "A product record. Fields with no value are omitted.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/shopsavvy-com-api-openapi.json#/components/schemas/Product",
  "type": "object",
  "properties": {
    "title": {
      "type": "string"
    },
    "shopsavvy": {
      "type": "string",
      "description": "ShopSavvy product id (a path such as `products/3ONn300xybP3y66ibqc1`). Accepted as an identifier by every endpoint."
    },
    "brand": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "images": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "barcode": {
      "type": "string"
    },
    "amazon": {
      "type": "string",
      "description": "Amazon ASIN."
    },
    "model": {
      "type": "string"
    },
    "mpn": {
      "type": "string"
    },
    "color": {
      "type": "string"
    },
    "title_short": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "attributes": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "rating": {
      "type": "object",
      "description": "Review-count-weighted average across retailers.",
      "properties": {
        "value": {
          "type": "number",
          "description": "Out of 5."
        },
        "count": {
          "type": "integer"
        }
      }
    },
    "score": {
      "$ref": "#/$defs/Score"
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "identifiers": {
      "type": "object",
      "additionalProperties": {},
      "description": "Every identifier known for the product, keyed by source (e.g. `amazon`, `bestbuy`, `walmart`, `barcode`)."
    },
    "match": {
      "$ref": "#/$defs/Match"
    }
  },
  "$defs": {
    "Match": {
      "type": "object",
      "description": "How the identifier you sent matched this product.",
      "properties": {
        "identifier": {
          "type": "string",
          "description": "The identifier exactly as sent."
        },
        "by": {
          "type": "string",
          "enum": [
            "barcode",
            "shopsavvy_id",
            "asin",
            "url",
            "model",
            "mpn",
            "name"
          ],
          "description": "Which field matched. Everything except `name` is an exact match; `name` is a full-text best guess."
        },
        "candidates": {
          "type": "integer",
          "description": "How many products matched on that field. More than 1 means the identifier is shared and the best-evidence product was returned."
        }
      }
    },
    "Score": {
      "type": "object",
      "description": "Expert quality scores on a 0-1 scale. `aspects` is keyed by free-form aspect names drawn from the product's professional reviews (e.g. value, features, reliability, quality) — the set of aspects varies per product. Only populated fields are included.",
      "properties": {
        "overall": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "customer": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "professional": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "aspects": {
          "type": "object",
          "additionalProperties": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        }
      }
    }
  }
}