{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Visibility Tracker: ChatGPT, Perplexity, Gemini",
    "description": "[$8 per 1,000 checks + your own LLM API cost] Is your brand mentioned, ranked and cited when buyers ask ChatGPT models, Perplexity, Gemini or Claude? Share of voice vs competitors, citations, sentiment, run-to-run changes. Official APIs, bring your own keys.",
    "version": "1.0",
    "x-build-id": "oICrm5GXkbwD2xTgB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xsi~ai-visibility-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xsi-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/xsi~ai-visibility-tracker/runs": {
      "post": {
        "operationId": "runs-sync-xsi-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/xsi~ai-visibility-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-xsi-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",
          "prompts"
        ],
        "properties": {
          "brand": {
            "title": "Your brand",
            "type": "string",
            "description": "Brand name as people write it, e.g. \"Ethias\". Matched as a whole word, case-insensitive (short all-caps names like \"AXA\" are matched case-sensitively)."
          },
          "brandDomain": {
            "title": "Your website (domain)",
            "type": "string",
            "description": "Used to detect when an answer cites your site (subdomains count, look-alike domains don't). Also counted as a mention when written in the answer."
          },
          "brandAliases": {
            "title": "Other names of your brand",
            "type": "array",
            "description": "Optional alternative spellings or product names, e.g. \"Ethias Assurance\".",
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "One per line: \"Name | domain | alias1; alias2\" (domain and aliases optional), e.g. \"AG Insurance | ag.be | AG\". Max 25.",
            "items": {
              "type": "string"
            }
          },
          "prompts": {
            "title": "Prompts (questions your buyers ask)",
            "type": "array",
            "description": "Each prompt is sent as-is to each engine. Max 200 per run. Use the words real buyers use, in their language.",
            "items": {
              "type": "string"
            }
          },
          "engines": {
            "title": "Engines",
            "type": "array",
            "description": "Engines to query. Only engines with an API key below are used (others are skipped, free).",
            "items": {
              "type": "string",
              "enum": [
                "openai",
                "perplexity",
                "gemini",
                "anthropic"
              ],
              "enumTitles": [
                "OpenAI (ChatGPT models)",
                "Perplexity (Sonar)",
                "Google Gemini",
                "Anthropic Claude"
              ]
            },
            "default": [
              "openai",
              "perplexity",
              "gemini",
              "anthropic"
            ]
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Your own key from platform.openai.com (BYOK). Stored encrypted by Apify, never written to the dataset or log. OpenAI bills the tokens and web searches to you."
          },
          "perplexityApiKey": {
            "title": "Perplexity API key",
            "type": "string",
            "description": "Your own key from perplexity.ai/settings/api."
          },
          "geminiApiKey": {
            "title": "Google Gemini API key",
            "type": "string",
            "description": "Your own key from aistudio.google.com (Gemini API)."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Your own key from console.anthropic.com. Web search must be enabled for your organization."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "2-letter ISO code (BE, FR, US…). Sent as the user's approximate location where the API supports it (OpenAI, Perplexity, Claude web search) and as a short instruction for all engines."
          },
          "language": {
            "title": "Answer language",
            "type": "string",
            "description": "Optional, e.g. \"French\". Adds \"Answer in French.\" Leave empty to let the engine follow the prompt's language."
          },
          "samplesPerPrompt": {
            "title": "Samples per prompt",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "AI answers change from one ask to the next. Ask each prompt 1–5 times per engine to get a mention rate with a 95 % confidence interval. Each sample is one billed check.",
            "default": 1
          },
          "webSearch": {
            "title": "Use live web search",
            "type": "boolean",
            "description": "On (recommended): engines search the web like their consumer apps do, and return cited sources. Off: answer from the model's memory only (cheaper on your key, no citations). Perplexity always searches.",
            "default": true
          },
          "monitor": {
            "title": "Monitor mode (compare with previous run)",
            "type": "boolean",
            "description": "Saves a small snapshot (mentions, ranks, cited domains; no answer text) in the named key-value store \"ai-visibility-tracker-state\" of your account, and adds change columns (gained / lost / rank up / rank down, new and lost cited domains). Schedule weekly for tracking.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Separate histories for the same brand, e.g. \"be-fr-weekly\". Letters, digits, - and _."
          },
          "maxChecks": {
            "title": "Max checks per run",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on prompt × engine × sample checks (protects your LLM bill and this Actor's fee). Your Apify \"Maximum cost per run\" is also respected.",
            "default": 200
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "1–5. Lower it if your provider rate-limits you.",
            "default": 2
          },
          "requestTimeoutSecs": {
            "title": "Timeout per answer (s)",
            "minimum": 20,
            "maximum": 300,
            "type": "integer",
            "description": "One retry is made on timeouts, 429 and 5xx.",
            "default": 90
          },
          "answerExcerptChars": {
            "title": "Answer excerpt length",
            "minimum": 200,
            "maximum": 20000,
            "type": "integer",
            "description": "Characters of the raw answer kept in each row (200–20,000).",
            "default": 1500
          },
          "saveReport": {
            "title": "Save HTML report",
            "type": "boolean",
            "description": "Writes REPORT.html (share of voice tables) to the run's key-value store.",
            "default": true
          },
          "openaiModel": {
            "title": "OpenAI model",
            "type": "string",
            "description": "Default gpt-6-luna (OpenAI's most efficient model, supports the web_search tool; verified on OpenAI's model page, Nov 2026). Any Responses API model that supports web_search."
          },
          "perplexityModel": {
            "title": "Perplexity model",
            "type": "string",
            "description": "Default sonar. Old Sonar names still work and are mapped for the Agent API: sonar → perplexity/sonar, sonar-pro → effort fast, sonar-reasoning-pro → effort low, sonar-deep-research → effort high. You can also give an effort level (fast, low, medium, high) or any Agent API model id such as openai/gpt-6.2-sol."
          },
          "perplexityApi": {
            "title": "Perplexity API",
            "enum": [
              "agent",
              "sonar"
            ],
            "type": "string",
            "description": "Agent API (default): Perplexity's supported API, with its web search tool. Legacy Sonar: the endpoint used before version 1.0.5. Perplexity ended support for it on 27 Sep 2026 but still serves it.",
            "default": "agent"
          },
          "geminiModel": {
            "title": "Gemini model",
            "type": "string",
            "description": "Default gemini-3.8-flash (stable, Google Search grounding). Newer: gemini-4-hydrogen."
          },
          "anthropicModel": {
            "title": "Claude model",
            "type": "string",
            "description": "Default claude-haiku-5-5 (fastest Claude, web search tool)."
          },
          "modelFallback": {
            "title": "Fall back to the default model if a model name is unknown",
            "type": "boolean",
            "description": "On (default): if a model you typed is unknown, renamed or retired (HTTP 404 / 'model not found'), the check is retried once with the default model and the row shows model_requested + model_fallback=true. Off: the check fails for free with model_not_found.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}