{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Visibility Competitor Share of Voice",
    "description": "Compare target-brand and competitor positions across buyer-supplied AI visibility observations with transparent overall and segment metrics.",
    "version": "0.1",
    "x-build-id": "UrsPo3ieyedvy4awC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zinin~ai-visibility-competitor-share-of-voice/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zinin-ai-visibility-competitor-share-of-voice",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/zinin~ai-visibility-competitor-share-of-voice/runs": {
      "post": {
        "operationId": "runs-sync-zinin-ai-visibility-competitor-share-of-voice",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/zinin~ai-visibility-competitor-share-of-voice/run-sync": {
      "post": {
        "operationId": "run-sync-zinin-ai-visibility-competitor-share-of-voice",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "schemaVersion",
          "analysisId",
          "targetBrand",
          "competitors",
          "observations",
          "maximumSegmentsPerDimension"
        ],
        "properties": {
          "schemaVersion": {
            "title": "Input schema version",
            "enum": [
              "1.0"
            ],
            "type": "string",
            "description": "Fixed contract version. Keep 1.0.",
            "default": "1.0"
          },
          "analysisId": {
            "title": "Analysis ID",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$",
            "minLength": 1,
            "maxLength": 64,
            "type": "string",
            "description": "Stable buyer-defined identifier for this report."
          },
          "targetBrand": {
            "title": "Target brand",
            "pattern": "^(?![=+@-])(?!.*[<>])(?!.*[\\u0000-\\u001F\\u007F-\\u009F\\u200B-\\u200F\\u202A-\\u202E\\u2060\\u2066-\\u2069\\uFEFF]).+$",
            "minLength": 1,
            "maxLength": 100,
            "type": "string",
            "description": "Exact tracked brand used for all observation validation. Every observations[].brand value must match this value after normalization."
          },
          "competitors": {
            "title": "Tracked competitors",
            "minItems": 1,
            "maxItems": 10,
            "uniqueItems": true,
            "type": "array",
            "description": "One to ten exact competitor names included in share-of-voice metrics. Names must remain unique after normalization, must not equal targetBrand, and form the allowlist for every observations[].competitors value.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "pattern": "^(?![=+@-])(?!.*[<>])(?!.*[\\u0000-\\u001F\\u007F-\\u009F\\u200B-\\u200F\\u202A-\\u202E\\u2060\\u2066-\\u2069\\uFEFF]).+$"
            }
          },
          "observations": {
            "title": "Normalized AI visibility observations",
            "minItems": 2,
            "maxItems": 500,
            "type": "array",
            "description": "Two to 500 buyer-supplied normalized AI visibility observations. Use a unique observationId in every row; brand must exactly match targetBrand; row competitors must be unique members of the top-level competitors list; position must be null when mentioned is false and otherwise no greater than the row competitor count plus one.",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "required": [
                "schemaVersion",
                "observationId",
                "brand",
                "competitors",
                "modelFamily",
                "market",
                "language",
                "mentioned",
                "position"
              ],
              "properties": {
                "schemaVersion": {
                  "title": "Observation schema version",
                  "description": "Fixed normalized observation row version.",
                  "type": "string",
                  "editor": "select",
                  "enum": [
                    "1.0"
                  ]
                },
                "observationId": {
                  "title": "Observation ID",
                  "description": "Stable lowercase SHA-256 observation identity.",
                  "type": "string",
                  "editor": "textfield",
                  "minLength": 64,
                  "maxLength": 64,
                  "pattern": "^[a-f0-9]{64}$"
                },
                "brand": {
                  "title": "Tracked brand",
                  "description": "Target brand represented by mentioned and position. It must exactly match the top-level targetBrand after normalization.",
                  "type": "string",
                  "editor": "textfield",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "^(?![=+@-])(?!.*[<>])(?!.*[\\u0000-\\u001F\\u007F-\\u009F\\u200B-\\u200F\\u202A-\\u202E\\u2060\\u2066-\\u2069\\uFEFF]).+$"
                },
                "competitors": {
                  "title": "Mentioned competitors",
                  "description": "Configured competitor names in first-mention order. Every value must exactly match one top-level competitors entry, and values must remain unique after normalization.",
                  "type": "array",
                  "editor": "stringList",
                  "minItems": 0,
                  "maxItems": 10,
                  "uniqueItems": true,
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "pattern": "^(?![=+@-])(?!.*[<>])(?!.*[\\u0000-\\u001F\\u007F-\\u009F\\u200B-\\u200F\\u202A-\\u202E\\u2060\\u2066-\\u2069\\uFEFF]).+$"
                  }
                },
                "modelFamily": {
                  "title": "Model family",
                  "description": "Exact normalized AI model family segment.",
                  "type": "string",
                  "editor": "textfield",
                  "minLength": 1,
                  "maxLength": 80,
                  "pattern": "^(?![=+@-])(?!.*[<>])(?!.*[\\u0000-\\u001F\\u007F-\\u009F\\u200B-\\u200F\\u202A-\\u202E\\u2060\\u2066-\\u2069\\uFEFF]).+$"
                },
                "market": {
                  "title": "Market",
                  "description": "Exact normalized market segment.",
                  "type": "string",
                  "editor": "textfield",
                  "minLength": 1,
                  "maxLength": 80,
                  "pattern": "^(?![=+@-])(?!.*[<>])(?!.*[\\u0000-\\u001F\\u007F-\\u009F\\u200B-\\u200F\\u202A-\\u202E\\u2060\\u2066-\\u2069\\uFEFF]).+$"
                },
                "language": {
                  "title": "Language",
                  "description": "Exact normalized language segment.",
                  "type": "string",
                  "editor": "textfield",
                  "minLength": 1,
                  "maxLength": 35,
                  "pattern": "^(?![=+@-])(?!.*[<>])(?!.*[\\u0000-\\u001F\\u007F-\\u009F\\u200B-\\u200F\\u202A-\\u202E\\u2060\\u2066-\\u2069\\uFEFF]).+$"
                },
                "mentioned": {
                  "title": "Target mentioned",
                  "description": "Whether the tracked target brand was mentioned. When false, position must be null; when true, position must be a one-based integer.",
                  "type": "boolean",
                  "editor": "checkbox"
                },
                "position": {
                  "title": "Target position",
                  "description": "One-based target position when mentioned is true, capped at the row competitor count plus one; use null when mentioned is false.",
                  "type": "integer",
                  "nullable": true,
                  "editor": "number",
                  "minimum": 1,
                  "maximum": 11
                }
              }
            }
          },
          "maximumSegmentsPerDimension": {
            "title": "Maximum segments per dimension",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Retain the top one to 20 model, market and language groups; overall metrics always remain complete.",
            "default": 10
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}