{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/compsapi-com/json-schema/compsapi-com-sold-response-schema.json",
  "title": "SoldResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/compsapi-com-openapi.json#/components/schemas/SoldResponse",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "query": {
      "type": "string"
    },
    "page": {
      "type": "integer"
    },
    "ms": {
      "type": "integer"
    },
    "count": {
      "type": "integer"
    },
    "no_results": {
      "type": "boolean"
    },
    "next_page": {
      "type": "boolean"
    },
    "days": {
      "type": "integer"
    },
    "size": {
      "type": "integer"
    },
    "cached": {
      "type": "boolean"
    },
    "cached_age_s": {
      "type": "integer"
    },
    "source": {
      "type": "string"
    },
    "filters": {
      "type": "object"
    },
    "count_before_filters": {
      "type": "integer"
    },
    "stats": {
      "$ref": "#/$defs/Stats"
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Item"
      }
    }
  },
  "$defs": {
    "Card": {
      "type": "object",
      "properties": {
        "graded": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "grader": {
          "type": [
            "string",
            "null"
          ]
        },
        "grade": {
          "type": [
            "string",
            "null"
          ]
        },
        "grade_label": {
          "type": [
            "string",
            "null"
          ]
        },
        "card_number": {
          "type": [
            "string",
            "null"
          ]
        },
        "year": {
          "type": [
            "integer",
            "null"
          ]
        },
        "language": {
          "type": [
            "string",
            "null"
          ]
        },
        "first_edition": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "flags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Item": {
      "type": "object",
      "properties": {
        "item_id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "last_sold": {
          "type": "string",
          "format": "date-time"
        },
        "price": {
          "type": "number",
          "description": "Average price actually paid per unit, USD. Accepted best offers show the real offer price."
        },
        "units_sold": {
          "type": "integer"
        },
        "total_sales": {
          "type": "number"
        },
        "format": {
          "type": "string",
          "enum": [
            "FIXED_PRICE",
            "AUCTION"
          ]
        },
        "bids": {
          "type": "integer"
        },
        "us_sale": {
          "type": "boolean",
          "description": "true when the sale was made on eBay US, false when it was made on another eBay site. The default search merges eBay US with international coverage, so this separates them. Which other site a false row came from is not reported, because eBay does not expose it per item. With site pinned, every row is true or every row is false."
        },
        "native_price": {
          "type": [
            "number",
            "null"
          ],
          "description": "Only with native_price=1. The amount in the currency the sale actually happened in. price is always USD; this is the untouched figure. null when it could not be confirmed, typically a listing that sold several units at different prices."
        },
        "native_currency": {
          "type": [
            "string",
            "null"
          ],
          "description": "Only with native_price=1. ISO 4217 code for native_price, for example GBP, EUR, AUD."
        },
        "best_offer": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Only present with the best_offer parameter. true means the sale was identified as an accepted offer; false means it was not identified as one, which is not the same as a full price sale."
        },
        "condition": {
          "type": "string",
          "description": "Only present with a single condition value."
        },
        "shipping_cost": {
          "type": [
            "number",
            "null"
          ]
        },
        "free_shipping_pct": {
          "type": "number"
        },
        "url": {
          "type": "string"
        },
        "image": {
          "type": "string"
        },
        "card": {
          "$ref": "#/$defs/Card"
        },
        "best_offer_confidence": {
          "type": "string",
          "enum": [
            "confirmed",
            "likely",
            "unlikely",
            "unknown"
          ],
          "description": "Only with best_offer=verify. confirmed: eBay identifies the sale as an accepted offer. likely: the listing accepted offers and the sale closed materially below the asking price. unlikely: neither holds. unknown: the sale was not on the public pages we read, or another marketplace was pinned, so no comparison was possible."
        },
        "asking_price": {
          "type": [
            "number",
            "null"
          ],
          "description": "Only with best_offer=verify. The price eBay's public sold page displays for this listing."
        },
        "asking_gap_pct": {
          "type": [
            "number",
            "null"
          ],
          "description": "Only with best_offer=verify. How far the asking price sits above what the sale closed at, as a percentage of the amount paid. Negative when the public page reads low."
        }
      }
    },
    "Stats": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer"
        },
        "used_for_stats": {
          "type": "integer"
        },
        "median": {
          "type": "number"
        },
        "mean": {
          "type": "number"
        },
        "p25": {
          "type": "number"
        },
        "p75": {
          "type": "number"
        },
        "min": {
          "type": "number"
        },
        "max": {
          "type": "number"
        },
        "outliers_removed": {
          "type": "integer"
        },
        "newest_sale": {
          "type": "string",
          "format": "date-time"
        },
        "oldest_sale": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}