{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/workingproxysites-info/json-schema/workingproxysites-info-quote-result-schema.json",
  "title": "QuoteResult",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/workingproxysites-info-openapi.json#/components/schemas/QuoteResult",
  "type": "object",
  "properties": {
    "type": {
      "$ref": "#/$defs/ProxyType"
    },
    "pricing_model": {
      "type": "string",
      "enum": [
        "per_gb",
        "per_ip",
        "per_port",
        "per_request",
        "unlimited"
      ]
    },
    "quantity": {
      "type": "number"
    },
    "unit": {
      "type": "string",
      "description": "What quantity counts: GB, IP, port, 1k requests, or port or plan."
    },
    "months": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Months priced for per_ip, per_port and unlimited; null for per_gb and per_request."
    },
    "ip_version": {
      "type": "string",
      "enum": [
        "ipv4",
        "ipv6",
        "any"
      ],
      "description": "The ip_version filter applied (the type default when not given)."
    },
    "shared": {
      "type": [
        "boolean",
        "string"
      ],
      "enum": [
        true,
        false,
        "any"
      ],
      "description": "The shared filter applied: true, false or \"any\" (default)."
    },
    "listing_status": {
      "type": "string"
    },
    "total": {
      "type": "integer",
      "description": "Providers quoted (before limit)."
    },
    "limit": {
      "type": "integer"
    },
    "quotes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Quote"
      },
      "description": "Cheapest first; at equal totals exact quotes come before estimates, then rank order."
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Ignored parameters, providers priced in another model, unpriced products, products left out because no tier matches ip_version / shared, how many quotes are estimates."
    },
    "caveats": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "How to read the quotes."
    }
  },
  "required": [
    "type",
    "pricing_model",
    "quantity",
    "unit",
    "months",
    "ip_version",
    "shared",
    "listing_status",
    "total",
    "limit",
    "quotes",
    "warnings",
    "caveats"
  ],
  "$defs": {
    "PriceTier": {
      "type": "object",
      "title": "PriceTier",
      "description": "One step of a published price ladder, at the regular list price.",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "volume",
            "plan",
            "graduated"
          ],
          "description": "volume: buying at least `quantity` units costs `unit_price_usd` each. plan: a fixed package of `quantity` units for `total_usd`. graduated: one band of a marginal ladder; units from this band's `quantity` up to the next graduated band's (same billing_period, ip_version and shared) cost `unit_price_usd` each, the lowest band starts at 0 (its `quantity` is the smallest purchase), and `total_usd` on the lowest band is a minimum charge per billing period."
        },
        "quantity": {
          "type": "number",
          "description": "Units, counted in the product's pricing unit: GB (per_gb), IPs (per_ip), ports (per_port), thousands of requests (per_request), ports or plans (unlimited).",
          "exclusiveMinimum": 0
        },
        "unit_price_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Price per unit in USD for the billing period (required for volume and graduated tiers; null when a plan does not state one).",
          "minimum": 0
        },
        "total_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Price of the whole tier in USD for the billing period (required for plans). On the lowest graduated band: the minimum charge per period.",
          "minimum": 0
        },
        "billing_period": {
          "type": "string",
          "enum": [
            "one_time",
            "day",
            "week",
            "month",
            "quarter",
            "year"
          ],
          "description": "one_time (pay as you go, a top-up or a pack that does not renew), day, week, month, quarter or year. Prices are for this period, not converted."
        },
        "note": {
          "type": "string",
          "description": "Promotions, conditions or what the plan includes, as published. Empty when none."
        },
        "once": {
          "type": "boolean",
          "description": "true for a trial, intro or new-user offer that can be bought only once. Such tiers are shown but never used in price quotes or in the derived price_from_usd and entry_price_usd."
        },
        "ip_version": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "ipv4",
            "ipv6",
            null
          ],
          "description": "IP version the tier sells (ipv4 or ipv6); null when the ladder does not say. Quotes count null as IPv4."
        },
        "shared": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "true: shared IPs; false: dedicated (private) IPs; null when the ladder does not say."
        }
      },
      "required": [
        "kind",
        "quantity",
        "unit_price_usd",
        "total_usd",
        "billing_period",
        "note",
        "once",
        "ip_version",
        "shared"
      ],
      "additionalProperties": false
    },
    "ProxyType": {
      "type": "string",
      "enum": [
        "residential",
        "mobile",
        "datacenter",
        "isp"
      ]
    },
    "Quote": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "total_usd": {
          "type": "number",
          "minimum": 0,
          "description": "USD required for the quantity, raised to entry_price_usd when higher (list price, excluding taxes and promotions). Notes distinguish an initial funding minimum from the tier charge."
        },
        "effective_unit_price_usd": {
          "type": "number",
          "minimum": 0,
          "description": "total_usd per requested unit (per unit per month for per_ip, per_port and unlimited)."
        },
        "pricing_model": {
          "type": "string",
          "enum": [
            "per_gb",
            "per_ip",
            "per_port",
            "per_request",
            "unlimited",
            "other"
          ]
        },
        "price_unit": {
          "type": "string",
          "description": "Canonical unit of the product (GB, IP/month, port/month, 1k requests, month)."
        },
        "tier": {
          "oneOf": [
            {
              "$ref": "#/$defs/PriceTier"
            },
            {
              "type": "null"
            }
          ]
        },
        "billing_period": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "one_time",
            "day",
            "week",
            "month",
            "quarter",
            "year",
            null
          ],
          "description": "The tier's billing period; null for estimates."
        },
        "ip_version": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "ipv4",
            "ipv6",
            null
          ],
          "description": "The IP version of the tier used; null when the ladder does not say (counted as IPv4) and for estimates."
        },
        "shared": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether the tier used sells shared (true) or dedicated (false) IPs; null when the ladder does not say and for estimates."
        },
        "purchased_quantity": {
          "type": "number",
          "description": "Units actually bought: more than requested when a plan or a volume minimum makes that cheaper."
        },
        "estimate": {
          "type": "boolean",
          "description": "true when the provider publishes no usable price ladder: price_from_usd × quantity (× months), raised to entry_price_usd when higher. A lower bound."
        },
        "notes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "How the price was built (plans bought several times, volume minimums, graduated bands and minimum charges, daily or weekly prices converted at 30 days or 4.345 weeks a month, quarterly or yearly billing, estimates)."
        },
        "pricing_url": {
          "type": "string",
          "format": "uri",
          "description": "The provider's pricing page (its website when none is recorded)."
        },
        "checked_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "When the prices were last checked."
        }
      },
      "required": [
        "slug",
        "name",
        "total_usd",
        "effective_unit_price_usd",
        "pricing_model",
        "price_unit",
        "tier",
        "billing_period",
        "ip_version",
        "shared",
        "purchased_quantity",
        "estimate",
        "notes",
        "pricing_url",
        "checked_at"
      ]
    }
  }
}