{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Brand Visibility Tracker — AI Overview & Perplexity",
    "description": "Track whether ChatGPT, Google AI Overview, Perplexity, Gemini and Copilot mention your brand when buyers ask for a recommendation. Repeat checks give a real mention rate with a margin of error, plus who gets named instead, what changed since last week, and what each gap is worth.",
    "version": "1.0",
    "x-build-id": "qrfLjYTbmg6cZuIe4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/aitorsm~ai-visibility-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-aitorsm-ai-visibility-tracker",
        "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/aitorsm~ai-visibility-tracker/runs": {
      "post": {
        "operationId": "runs-sync-aitorsm-ai-visibility-tracker",
        "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/aitorsm~ai-visibility-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-aitorsm-ai-visibility-tracker",
        "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"
        ],
        "properties": {
          "brand": {
            "title": "Brand to track",
            "minLength": 1,
            "maxLength": 200,
            "type": "string",
            "description": "Exact name as it would appear in an AI answer, e.g. \"Apify\". Case-insensitive matching.",
            "default": "Apify"
          },
          "brandDomain": {
            "title": "Brand domain (optional)",
            "type": "string",
            "description": "e.g. \"apify.com\". Used to measure citation of your own site, separately from being named in the answer text."
          },
          "queries": {
            "title": "Questions to ask (direct)",
            "maxItems": 100,
            "type": "array",
            "description": "Exact questions/prompts to check, one per entry — e.g. \"what are the best web scraping tools\". Combines with promptPanel and seedTopic below; duplicates are merged.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          "seedTopic": {
            "title": "Seed topic (auto-discover questions)",
            "type": "string",
            "description": "A topic, not a question — e.g. \"web scraping tools\". Expanded into relevant long-tail questions for measurement."
          },
          "maxDiscoveredPrompts": {
            "title": "Max questions to discover from seedTopic",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Upper bound on questions generated from seedTopic. Each one multiplies cost (questions x surfaces x samples).",
            "default": 1
          },
          "promptPanel": {
            "title": "Prompt panel (inline, versioned)",
            "type": "object",
            "description": "A stable prompt panel supplied inline. Accepts user-authored prompts or a GEO Prompt Research panel. Source panel labels remain visible while the exact measured question set receives its own comparison-safe version.",
            "properties": {
              "panelId": {
                "title": "Panel ID",
                "type": "string",
                "description": "Stable panel label.",
                "editor": "textfield",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
              },
              "panelVersion": {
                "title": "Source panel version",
                "type": "string",
                "description": "Optional version label from GEO Prompt Research.",
                "editor": "textfield",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
              },
              "panelName": {
                "title": "Panel name",
                "type": "string",
                "description": "Human-readable panel name.",
                "editor": "textfield",
                "maxLength": 128
              },
              "prompts": {
                "title": "Panel prompts",
                "type": "array",
                "description": "Question strings or GEO Prompt Research prompt objects.",
                "editor": "json",
                "maxItems": 100
              }
            }
          },
          "promptPanelRunId": {
            "title": "GEO Prompt Research run ID (advanced)",
            "pattern": "^[A-Za-z0-9]{17}$",
            "type": "string",
            "description": "Advanced handoff from an accessible GEO Prompt Research run. Inline promptPanel transfer is the simplest option."
          },
          "promptPanelDatasetId": {
            "title": "GEO Prompt Research dataset ID (advanced)",
            "pattern": "^[A-Za-z0-9]{17}$",
            "type": "string",
            "description": "Advanced handoff from an accessible GEO Prompt Research dataset. Inline promptPanel transfer is the simplest option."
          },
          "surfaces": {
            "title": "AI surfaces to check",
            "type": "array",
            "description": "AI answer surfaces to check. Perplexity is the quick-start default. More surfaces require a longer timeout; estimates and citation overlap carry uncertainty on every surface.",
            "items": {
              "type": "string",
              "enum": [
                "aiOverview",
                "perplexity",
                "chatGpt"
              ],
              "enumTitles": [
                "Google AI Overview",
                "Perplexity",
                "ChatGPT"
              ]
            },
            "default": [
              "perplexity"
            ]
          },
          "samples": {
            "title": "Samples per question x surface",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Repeated checks per question and surface. Default 1 is indicative only; increase samples and run timeout for uncertainty estimates.",
            "default": 1
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code for search geography, e.g. \"us\", \"gb\", \"de\".",
            "default": "us"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Two-letter language code, e.g. \"en\", \"es\", \"fr\". Part of the history key — history does not carry over between languages.",
            "default": "en"
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Which device's search results to simulate. \"desktop\" is what most AI Overview and chat-surface checks are measured against; \"mobile\" can return a different AI Overview layout or presence on Google.",
            "default": "desktop"
          },
          "weightByDemand": {
            "title": "Weight by real search demand",
            "type": "boolean",
            "description": "Price each question against real Google Ads volume + CPC (our own keyword-volume actor) to compute a monthly gap value. Adds a demand-weighting event per priced question.",
            "default": false
          },
          "trackChanges": {
            "title": "Track changes over time",
            "type": "boolean",
            "description": "Compare against the last compatible complete run on your own Apify account. Brand, country, language, device and question panel must match.",
            "default": true
          },
          "report": {
            "title": "Generate the rollup report",
            "type": "boolean",
            "description": "Opt-in. Produces one readable report (dataset row + HTML record in your account storage) summarising every question checked: overall visibility, share of voice, biggest gaps, what changed. Charged only when produced.",
            "default": false
          },
          "assumedCtrPercent": {
            "title": "Assumed click-through rate (%)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Share of searchers assumed to act on being shown a brand, used only for the modelled gapValueUsd figure. Conservative default; raw missedSearchesPerMonth ships alongside it with no assumption.",
            "default": 20
          },
          "demoMode": {
            "title": "Demo mode (no live checks, nothing charged)",
            "type": "boolean",
            "description": "Returns a stored sample showing the exact output shape. No vendor calls, no charges. Turn off to measure your own brand.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}