{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/viralnote-app/json-schema/viralnote-app-ai-visibility-result-schema.json",
  "title": "AiVisibilityResult",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/viralnote-app-openapi.json#/components/schemas/AiVisibilityResult",
  "type": "object",
  "properties": {
    "promptId": {
      "type": "string"
    },
    "cluster": {
      "type": "string"
    },
    "engine": {
      "type": "string",
      "enum": [
        "openai",
        "gemini",
        "claude",
        "google"
      ]
    },
    "sample": {
      "type": "integer"
    },
    "ok": {
      "type": "boolean"
    },
    "error": {
      "type": "string"
    },
    "model": {
      "type": [
        "string",
        "null"
      ]
    },
    "ambiguousMentions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Entity IDs whose ambiguous names lacked supporting product context"
    },
    "extractionOk": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "null for earlier results; false means recommendation analysis is incomplete"
    },
    "attempts": {
      "type": [
        "integer",
        "null"
      ]
    },
    "measurement": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "version": {
          "type": "integer"
        },
        "country": {
          "type": "string",
          "description": "Requested country"
        },
        "marketApplied": {
          "type": "boolean",
          "description": "Whether the provider supports and received the country hint"
        },
        "mode": {
          "type": "string",
          "enum": [
            "web-enabled-api",
            "google-search"
          ],
          "description": "google-search: read from Google's signed-out AI Mode results through a search-data provider"
        },
        "inputTokens": {
          "type": "integer"
        },
        "outputTokens": {
          "type": "integer"
        },
        "searchCalls": {
          "type": "integer"
        }
      }
    },
    "text": {
      "type": "string"
    },
    "truncated": {
      "type": "boolean"
    },
    "citations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "owner": {
            "type": [
              "string",
              "null"
            ],
            "description": "\"brand\", a competitor id, or null"
          }
        }
      }
    },
    "searchQueries": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "mentioned": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "brandMentioned": {
      "type": "boolean"
    },
    "brandPosition": {
      "type": [
        "integer",
        "null"
      ]
    },
    "recommended": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "entity": {
            "type": [
              "string",
              "null"
            ]
          },
          "evidence": {
            "type": "string",
            "description": "Exact supporting quote from the answer, when available"
          }
        }
      }
    },
    "brandSentiment": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "positive",
        "neutral",
        "negative",
        null
      ]
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}