{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Brand Visibility Tracker – ChatGPT, Claude, Gemini",
    "description": "AI visibility tracker and LLM visibility tool for GEO/AEO. Track brand mentions in ChatGPT, Claude, Gemini, Perplexity and Grok answers: visibility score, share of voice vs competitors, rank, sentiment, cited domains and change vs last run. Bring your own API key, no AI markup.",
    "version": "1.0",
    "x-build-id": "OpGfHW49in5cze03w"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/signalwharf~ai-brand-visibility-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-signalwharf-ai-brand-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/signalwharf~ai-brand-visibility-tracker/runs": {
      "post": {
        "operationId": "runs-sync-signalwharf-ai-brand-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/signalwharf~ai-brand-visibility-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-signalwharf-ai-brand-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",
          "models"
        ],
        "properties": {
          "brand": {
            "title": "Your brand",
            "type": "string",
            "description": "Brand name, optional aliases and website domain separated by <code>|</code>, e.g. <code>HubSpot | HubSpot CRM | hubspot.com</code>. The domain is used to detect when AI answers cite your site."
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "Same format as the brand, one per line, e.g. <code>Salesforce | salesforce.com</code>.",
            "items": {
              "type": "string"
            }
          },
          "prompts": {
            "title": "Prompts (questions people ask AI)",
            "type": "array",
            "description": "The questions your customers would ask an AI assistant, e.g. 'What is the best CRM for a small business?'.",
            "items": {
              "type": "string"
            }
          },
          "models": {
            "title": "AI models",
            "type": "array",
            "description": "One per line as <code>provider:model-id</code>. Providers: <code>openai</code>, <code>anthropic</code>, <code>gemini</code>, <code>perplexity</code>, <code>openrouter</code>, <code>xai</code>, <code>custom</code> (any OpenAI-compatible endpoint). The prefilled models are cheap current models on OpenRouter (one OpenRouter key covers all four). Add <code>openrouter:perplexity/sonar</code> for a search-based answer engine. Native ids work too, e.g. <code>openai:gpt-6-luna</code> with an OpenAI key. Model ids change often; use the ids your provider lists today.",
            "items": {
              "type": "string"
            }
          },
          "samplesPerPrompt": {
            "title": "Samples per prompt",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "AI answers vary between runs. Ask each prompt several times per model to get a reliable mention rate (3-5 recommended for tracking).",
            "default": 1
          },
          "webSearch": {
            "title": "Use web search / grounding",
            "type": "boolean",
            "description": "Let models search the web where the provider supports it (OpenAI web search tool, Anthropic web search, Gemini Google Search grounding, OpenRouter web plugin; Perplexity always searches). Gives citation data but costs more on your provider bill.",
            "default": false
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Needed for <code>openai:</code> models. Your key is encrypted by Apify, never logged or stored in results. You pay OpenAI directly for usage."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Needed for <code>anthropic:</code> models."
          },
          "geminiApiKey": {
            "title": "Google Gemini API key",
            "type": "string",
            "description": "Needed for <code>gemini:</code> models (Google AI Studio key)."
          },
          "perplexityApiKey": {
            "title": "Perplexity API key",
            "type": "string",
            "description": "Needed for <code>perplexity:</code> models."
          },
          "openrouterApiKey": {
            "title": "OpenRouter API key",
            "type": "string",
            "description": "Needed for <code>openrouter:</code> models. One key gives access to models from OpenAI, Anthropic, Google, Meta, Mistral and more."
          },
          "xaiApiKey": {
            "title": "xAI API key",
            "type": "string",
            "description": "Needed for <code>xai:</code> (Grok) models."
          },
          "customBaseUrl": {
            "title": "Custom OpenAI-compatible base URL",
            "type": "string",
            "description": "For provider <code>custom</code>, e.g. <code>https://api.groq.com/openai/v1</code> or your own gateway. Requests go to <code>{baseUrl}/chat/completions</code>."
          },
          "customApiKey": {
            "title": "Custom endpoint API key",
            "type": "string",
            "description": "Bearer key for the custom endpoint (optional if it needs none)."
          },
          "trackingId": {
            "title": "Tracking ID",
            "type": "string",
            "description": "Name for this tracking project. Reports compare against the previous run with the same tracking ID (default: the brand name)."
          },
          "stateStoreName": {
            "title": "History store name",
            "type": "string",
            "description": "Named key-value store that keeps report history between runs.",
            "default": "ai-brand-visibility-state"
          },
          "locationHint": {
            "title": "User location hint",
            "type": "string",
            "description": "Optional, e.g. 'Germany' or 'Austin, Texas'. Added to the system prompt so answers reflect a market."
          },
          "systemPrompt": {
            "title": "System prompt",
            "type": "string",
            "description": "Optional. Leave empty to see the model's default behaviour (closest to what real users get)."
          },
          "temperature": {
            "title": "Temperature",
            "type": "string",
            "description": "Optional, e.g. 0.7. Empty = provider default (recommended; some models only accept the default)."
          },
          "maxAnswerTokens": {
            "title": "Max answer tokens",
            "minimum": 100,
            "maximum": 8000,
            "type": "integer",
            "description": "Upper limit for answer length (also limits your provider cost).",
            "default": 1200
          },
          "includeAnswerText": {
            "title": "Include answer text",
            "type": "boolean",
            "description": "Store the full AI answer in each result.",
            "default": true
          },
          "maxAnswers": {
            "title": "Max answers per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap on AI calls per run (prompts x samples x models).",
            "default": 300
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many AI requests run at the same time.",
            "default": 3
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries for rate limits (429), server errors and network errors.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}