{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cite42-dev/json-schema/cite42-dev-post-api-v1-compare-response-schema.json",
  "title": "PostApiV1CompareResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/cite42-dev-openapi-generated.yml#/components/schemas/PostApiV1CompareResponse",
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "brand": {
      "type": "string"
    },
    "rankings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "competitor": {
            "type": "string"
          },
          "mentionRate": {
            "type": "number"
          },
          "avgPosition": {
            "type": "integer"
          },
          "byModel": {
            "type": "object",
            "properties": {
              "chatgpt": {
                "type": "integer"
              },
              "claude": {
                "type": "integer"
              },
              "perplexity": {
                "type": "integer"
              },
              "gemini": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "google_ai_overview": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      }
    },
    "coMentions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "a": {
            "type": "string"
          },
          "b": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          }
        }
      }
    },
    "measurement": {
      "type": "object",
      "properties": {
        "methodologyVersion": {
          "type": "string"
        },
        "surfaces": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "model": {
                "type": "string"
              },
              "provider": {
                "type": "string"
              },
              "access": {
                "type": "string"
              },
              "webSearch": {
                "type": "string"
              },
              "status": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "metrics": {
      "type": "object",
      "properties": {
        "definitionVersion": {
          "type": "string"
        },
        "checkedAnswers": {
          "type": "integer"
        },
        "requestedAnswers": {
          "type": "integer"
        },
        "excludedAnswers": {
          "type": "integer"
        },
        "note": {
          "type": "string"
        },
        "mentions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "brand": {
                "type": "string"
              },
              "numerator": {
                "type": "integer"
              },
              "denominator": {
                "type": "integer"
              },
              "percentage": {
                "type": "integer"
              },
              "label": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "requestId": {
      "type": "string"
    },
    "billing": {
      "type": "object",
      "properties": {
        "cost": {
          "type": "object",
          "properties": {
            "microCredits": {
              "type": "integer"
            },
            "usd": {
              "type": "string"
            }
          }
        },
        "balance": {
          "type": "object",
          "properties": {
            "microCredits": {
              "type": "integer"
            },
            "usd": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}