{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Brand Visibility & Share of Voice: ChatGPT, Perplexity",
    "description": "Measure how often AI answers name your brand vs competitors. Repeated samples across ChatGPT, Perplexity and Gemini give visibility %, AI share of voice, answer position, cited sources and change since your last run. Pay per answer.",
    "version": "0.1",
    "x-build-id": "mvtcoTcjZ9SWoDIO4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/koalabed~ai-brand-visibility/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-koalabed-ai-brand-visibility",
        "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/koalabed~ai-brand-visibility/runs": {
      "post": {
        "operationId": "runs-sync-koalabed-ai-brand-visibility",
        "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/koalabed~ai-brand-visibility/run-sync": {
      "post": {
        "operationId": "run-sync-koalabed-ai-brand-visibility",
        "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": [
          "brand",
          "prompts"
        ],
        "properties": {
          "brand": {
            "title": "Brand to track",
            "type": "string",
            "description": "Enter the brand you want to measure in AI answers."
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "Add the brands you want to compare against. Use the names they normally appear under in AI answers.",
            "items": {
              "type": "string"
            }
          },
          "prompts": {
            "title": "Prompts (questions to ask the AI)",
            "type": "array",
            "description": "Enter the real questions your customers might ask an AI assistant. Results are measured separately for each prompt.",
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "AI platforms",
            "type": "array",
            "description": "Choose which AI platforms to measure. Each selected platform adds answers to the run cost.",
            "items": {
              "type": "string",
              "enum": [
                "chatgpt",
                "perplexity",
                "gemini"
              ],
              "enumTitles": [
                "ChatGPT",
                "Perplexity",
                "Gemini (no web search)"
              ]
            },
            "default": [
              "chatgpt",
              "perplexity"
            ]
          },
          "samplesPerPrompt": {
            "title": "Answers per prompt",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "AI answers vary from run to run, so each prompt is asked this many times on each platform. 3 is recommended. Every answer is billed.",
            "default": 3
          },
          "chatgptAlwaysSearch": {
            "title": "Always use web search for ChatGPT",
            "type": "boolean",
            "description": "Off: ChatGPT decides when to search the web, as it does for real users. On: every ChatGPT answer searches and lists its sources. The price per answer is the same.",
            "default": false
          },
          "country": {
            "title": "Target market",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "IN",
              "IE",
              "NZ",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "BR",
              "MX",
              "JP",
              "SE",
              "PL",
              "AE",
              "SG",
              "ZA"
            ],
            "type": "string",
            "description": "Used to localize applicable AI requests and reporting.",
            "default": "US"
          },
          "brandDomain": {
            "title": "Your website",
            "type": "string",
            "description": "Your site's domain (for example <code>hubspot.com</code>), used to spot when AI answers cite your own pages. If left empty, sites whose name matches your brand are counted."
          },
          "brandAliases": {
            "title": "Other names for your brand",
            "type": "array",
            "description": "Other ways people write your brand (for example <code>HubSpot CRM</code>, <code>Hubspot</code>). Capitalisation is handled automatically.",
            "items": {
              "type": "string"
            }
          },
          "includeCitations": {
            "title": "Include cited sources",
            "type": "boolean",
            "description": "List the web pages each answer cited (ChatGPT and Perplexity, when they searched). Sources come from the AI provider and differ between platforms.",
            "default": true
          },
          "includeAnswerText": {
            "title": "Include answer excerpts",
            "type": "boolean",
            "description": "Add a short excerpt (up to 300 characters) around your brand's first mention, labelled as AI-generated and always delivered with its cited sources. Off by default: you get measurements, not AI answers. Never included for Gemini.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name this measurement (for example <code>HubSpot US weekly</code>) to compare every run with the previous one, even if you edit the prompts. Without a name, runs with identical settings are compared automatically."
          },
          "compareWithPrevious": {
            "title": "Compare with previous run",
            "type": "boolean",
            "description": "Show gains and losses since the last run of this monitor. History is kept in your own Apify account.",
            "default": true
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}