{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/utilify-io/json-schema/utilify-io-comparison-response-schema.json",
  "title": "ComparisonResponse",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/utilify-io-openapi.json#/components/schemas/ComparisonResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "electricityPricesAsOf": {
          "$ref": "#/$defs/PriceDateSummary"
        },
        "officialElectricityPlanSource": {
          "$ref": "#/$defs/OfficialElectricityPlanSource"
        },
        "providers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "scores": {
                "type": "object",
                "description": "fit (plans at the ZIP and signup methods) and value (cheapest plan's estimated cost), combined as overall = (fit*0.5 + value*0.2) / 0.7. There is no provider quality or rating score: Utilify holds no customer-rating or complaint data.",
                "properties": {
                  "fit": {
                    "type": "integer"
                  },
                  "value": {
                    "type": "integer"
                  },
                  "overall": {
                    "type": "integer"
                  },
                  "rationale": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "$defs": {
    "OfficialElectricityPlanSource": {
      "type": "object",
      "description": "Present when the ZIP's electricity market outcome is choice or split; absent where residents cannot choose (no_choice) or the market is not confirmed. Points to Power to Choose, the official plan comparison site of the Public Utility Commission of Texas, a separate state website where current electricity plans and prices are listed. Link to the home page as given.",
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "note": {
          "type": "string"
        }
      }
    },
    "PriceDateSummary": {
      "type": "object",
      "description": "Present when the response contains electricity prices. Dates are of the electricity plans returned.",
      "properties": {
        "oldest": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "newest": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "undatedPlans": {
          "type": "integer"
        },
        "note": {
          "type": "string"
        }
      }
    }
  }
}