{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/perkusai-com/json-schema/perkusai-com-ai-search-result-schema.json",
  "title": "AiSearchResult",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/perkusai-com-openapi.json#/components/schemas/AiSearchResult",
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "summary": {
      "type": "string"
    },
    "guide": {
      "type": [
        "string",
        "null"
      ],
      "description": "A one-sentence decision tip."
    },
    "needs_confirmation": {
      "type": "boolean",
      "description": "True when an exact part/fitment match is not guaranteed."
    },
    "compat": {
      "type": [
        "string",
        "null"
      ],
      "description": "The device/vehicle a part must fit, if any."
    },
    "no_match": {
      "type": "boolean"
    },
    "supported_categories": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Categories actually carried; returned alongside no_match."
    },
    "count": {
      "type": "integer"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Product"
      }
    },
    "bought_together": {
      "type": "array",
      "description": "Optional accessories for the top pick.",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the accessory is for."
          },
          "price": {
            "type": [
              "number",
              "null"
            ]
          },
          "currency": {
            "type": "string"
          },
          "buy_url": {
            "type": "string"
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "coverage": {
      "type": "object",
      "description": "Which markets the results are available in, and delivery info.",
      "properties": {
        "markets": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "note": {
          "type": "string"
        },
        "delivery": {
          "type": "string"
        },
        "sellers": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Partner stores this result set spans."
        }
      }
    },
    "markdown": {
      "type": "string",
      "description": "Paste-ready markdown with clickable affiliate buy links; it also carries the affiliate disclosure."
    }
  },
  "$defs": {
    "Product": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "brand": {
          "type": [
            "string",
            "null"
          ]
        },
        "price": {
          "type": [
            "number",
            "null"
          ]
        },
        "currency": {
          "type": "string"
        },
        "original_price": {
          "type": [
            "number",
            "null"
          ]
        },
        "discount_pct": {
          "type": [
            "integer",
            "null"
          ]
        },
        "rating": {
          "type": [
            "number",
            "null"
          ]
        },
        "stock_label": {
          "type": [
            "string",
            "null"
          ]
        },
        "market": {
          "type": "string",
          "description": "Market the product is sold into (currently LT)."
        },
        "reason": {
          "type": [
            "string",
            "null"
          ]
        },
        "tag": {
          "type": [
            "string",
            "null"
          ]
        },
        "buy_url": {
          "type": "string",
          "description": "Affiliate-tracked purchase link. Present this as the buy link."
        },
        "image_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "seller": {
          "type": [
            "string",
            "null"
          ],
          "description": "Partner store that sells this product. Results can span several stores - name it when presenting a product."
        },
        "free_shipping": {
          "type": "boolean",
          "description": "True when the selling partner delivers this product free at this price. Terms are per partner (e.g. free above a basket threshold), so two results at the same price can differ."
        }
      }
    }
  }
}