{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Search Visibility Tracker (ChatGPT, Perplexity, Gemini)",
    "description": "Is your brand mentioned, ranked and cited in AI search answers? Asks OpenAI, Perplexity, Gemini and Anthropic through their official APIs with your own keys. Share of voice vs competitors; monitor mode reports only changes plus a weekly summary.",
    "version": "0.1",
    "x-build-id": "STT5QupvL5bbfefOe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datafeed~ai-visibility-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datafeed-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/datafeed~ai-visibility-tracker/runs": {
      "post": {
        "operationId": "runs-sync-datafeed-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/datafeed~ai-visibility-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-datafeed-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": [
          "brandName"
        ],
        "properties": {
          "brandName": {
            "title": "Brand name",
            "type": "string",
            "description": "The brand to track, exactly as people write it (e.g. Acme). Matched as a whole word, case-insensitive."
          },
          "brandAliases": {
            "title": "Brand aliases",
            "type": "array",
            "description": "Other names of the brand or its products (up to 10), e.g. Acme Cloud.",
            "items": {
              "type": "string"
            }
          },
          "brandDomains": {
            "title": "Brand domains",
            "type": "array",
            "description": "Your own domains (up to 10), e.g. acme.com. Used to detect when an AI answer cites your site (subdomains count).",
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "Up to 25. One per line: 'Name' or 'Name | alias | competitor.com' (entries that look like domains are also used to detect citations).",
            "items": {
              "type": "string"
            }
          },
          "prompts": {
            "title": "Prompts",
            "type": "array",
            "description": "Questions buyers ask AI search, without naming your brand, e.g. 'What is the best web scraping platform?'. Up to 100 prompts per run in total (with generated ones).",
            "items": {
              "type": "string"
            }
          },
          "seedTopics": {
            "title": "Seed topics (generate prompts)",
            "type": "array",
            "description": "Optional. Each topic (e.g. 'web scraping tools') is turned into variantsPerTopic fixed question templates, the same every run so history stays comparable.",
            "items": {
              "type": "string"
            }
          },
          "variantsPerTopic": {
            "title": "Prompt variants per topic",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many template questions per seed topic.",
            "default": 3
          },
          "engines": {
            "title": "AI engines",
            "type": "array",
            "description": "Each is asked through its official API with your own key: openai (Responses API + web search), perplexity (Agent API), gemini (Gemini API + Google Search grounding), anthropic (Messages API + web search).",
            "items": {
              "type": "string",
              "enum": [
                "openai",
                "perplexity",
                "gemini",
                "anthropic"
              ]
            },
            "default": [
              "openai",
              "perplexity",
              "gemini"
            ]
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Your own key (platform.openai.com). Needed when 'openai' is selected. Secret input: sent only in a request header to api.openai.com, never stored or shown. You pay OpenAI for the calls."
          },
          "perplexityApiKey": {
            "title": "Perplexity API key",
            "type": "string",
            "description": "Your own key (perplexity.ai API settings). Needed when 'perplexity' is selected. Secret input, sent only to api.perplexity.ai."
          },
          "geminiApiKey": {
            "title": "Google Gemini API key",
            "type": "string",
            "description": "Your own key (Google AI Studio). Needed when 'gemini' is selected. Secret input, sent only to generativelanguage.googleapis.com. Grounding with Google Search may be billed by Google."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Your own key (console.anthropic.com). Needed when 'anthropic' is selected. Web search is on unless an admin disabled it for your organization. Secret input, sent only to api.anthropic.com."
          },
          "openaiModel": {
            "title": "OpenAI model",
            "type": "string",
            "description": "A model that supports the web_search tool. Default: gpt-5-mini (check that it is still offered on your account)."
          },
          "perplexityModel": {
            "title": "Perplexity model",
            "type": "string",
            "description": "An Agent API preset (fast, low, medium, high, xhigh) or a direct provider/model such as openai/gpt-5.5. Default: fast (the docs map sonar to fast). sonar* values use the legacy Sonar API (being retired), fallback only."
          },
          "geminiModel": {
            "title": "Gemini model",
            "type": "string",
            "description": "Default: gemini-2.5-flash."
          },
          "anthropicModel": {
            "title": "Anthropic model",
            "type": "string",
            "description": "Default: claude-haiku-4-5."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "check",
              "monitor"
            ],
            "type": "string",
            "description": "check = one row per prompt x engine plus a share-of-voice summary row. monitor = compare with the previous run (named key-value store) and output only changes, plus a summary row every summaryEveryDays. Schedule monitor runs in Apify Console, one schedule per store.",
            "default": "check"
          },
          "analyzeSentiment": {
            "title": "Rule-based sentiment",
            "type": "boolean",
            "description": "Tag the tone of the sentences that mention the brand (positive, negative, mixed, neutral) with a small word list. No extra API call.",
            "default": true
          },
          "includeAnswerText": {
            "title": "Include the answer text",
            "type": "boolean",
            "description": "Add the AI answer (first 4,000 characters) to each row. Never stored in the monitor store.",
            "default": true
          },
          "discoverBrands": {
            "title": "Discover unlisted brands",
            "type": "boolean",
            "description": "List the capitalised brand-like names that AI answers mention but you did not track (top 15, heuristic) in the summary row. No extra charge.",
            "default": false
          },
          "minRankChange": {
            "title": "Monitor: minimum rank change to report",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "AI answers vary from run to run: a rank move smaller than this is ignored (default 2 places).",
            "default": 2
          },
          "confirmRuns": {
            "title": "Monitor: confirm a change on this many runs",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "A mention, citation or rank change is reported (and charged) only after it was seen on this many consecutive runs; a one-off flicker is ignored. 1 = report at once.",
            "default": 2
          },
          "summaryEveryDays": {
            "title": "Monitor: summary every (days)",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "A summary row (share of voice, mention and citation rates per engine, change since the previous summary) is output on the first run and then once per this many days.",
            "default": 7
          },
          "emitUnchanged": {
            "title": "Monitor: output unchanged checks too",
            "type": "boolean",
            "description": "Off: unchanged checks produce no dataset row (their state and history are still updated).",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor: key-value store name",
            "type": "string",
            "description": "Named store that keeps the state between runs. Use one per brand/project and one schedule per store.",
            "default": "ai-visibility-tracker"
          },
          "delayBetweenCallsMs": {
            "title": "Pause between API calls (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Calls are made one at a time; this pause keeps you under low rate limits.",
            "default": 500
          },
          "dryRun": {
            "title": "Dry run (no API keys, no calls, free)",
            "type": "boolean",
            "description": "Uses built-in sample answers instead of calling any API, charges nothing and never writes the monitor store. Use it to see the output format. Pre-ticked in the Console form so a first try is free: untick it after adding your keys.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}