{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Visibility Tracker: ChatGPT, Perplexity, Gemini, Claude",
    "description": "Track if ChatGPT, Perplexity, Gemini and Claude mention and cite your brand vs competitors: rank, citations, share of voice, HTML report. Official APIs.",
    "version": "0.0",
    "x-build-id": "XBjmQb5MSKczyyxHy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rjmacarthy~ai-search-visibility-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rjmacarthy-ai-search-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/rjmacarthy~ai-search-visibility-tracker/runs": {
      "post": {
        "operationId": "runs-sync-rjmacarthy-ai-search-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/rjmacarthy~ai-search-visibility-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-rjmacarthy-ai-search-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": {
          "mockMode": {
            "title": "Demo mode (free sample data, no AI calls)",
            "type": "boolean",
            "description": "When ticked, the Actor runs the full pipeline on realistic <strong>generated sample answers</strong> instead of calling the AI engines, and nothing is charged. <strong>Untick to track your brand with real ChatGPT, Perplexity, Gemini and Claude answers.</strong> Runs started via API, schedules or integrations default to real checks (off) unless you set this to true.",
            "default": false
          },
          "brand": {
            "title": "Your brand",
            "required": [
              "name"
            ],
            "type": "object",
            "description": "The brand to track. Add aliases for product names, short names or common spellings. Matching is case-insensitive and whole-word (\"Hub\" never matches \"GitHub\").",
            "properties": {
              "name": {
                "title": "Brand name",
                "type": "string",
                "description": "For example: HubSpot",
                "editor": "textfield"
              },
              "aliases": {
                "title": "Aliases",
                "type": "array",
                "description": "Other names that count as a mention of your brand.",
                "editor": "stringList",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "brandDomains": {
            "title": "Your domains",
            "type": "array",
            "description": "Domains you own, used to detect when an AI answer cites your site. Subdomains count (blog.example.com matches example.com).",
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "Competitors to benchmark against. Each item: <code>{\"name\": \"Salesforce\", \"aliases\": [\"Sales Cloud\"], \"domains\": [\"salesforce.com\"]}</code>. Plain strings like <code>\"Pipedrive\"</code> also work. Up to 25."
          },
          "prompts": {
            "title": "Prompts",
            "type": "array",
            "description": "Buyer-intent questions your customers ask AI assistants. Do not include your brand name unless you want to test a branded query. Each prompt is checked once per selected engine (times \"Runs per prompt\"). Up to 200.",
            "items": {
              "type": "string"
            }
          },
          "engines": {
            "title": "AI engines",
            "type": "array",
            "description": "Which AI engines to check. Each prompt x engine is one check.",
            "items": {
              "type": "string",
              "enum": [
                "chatgpt",
                "perplexity",
                "gemini",
                "claude"
              ],
              "enumTitles": [
                "ChatGPT (OpenAI)",
                "Perplexity",
                "Gemini (Google)",
                "Claude (Anthropic)"
              ]
            },
            "default": [
              "chatgpt",
              "perplexity",
              "gemini",
              "claude"
            ]
          },
          "country": {
            "title": "Country (location hint)",
            "pattern": "^([A-Za-z]{2})?$",
            "type": "string",
            "description": "Two-letter ISO country code (US, GB, DE, FR...) passed to each engine's web search as the user's approximate location. Gemini has no location parameter, so it gets a one-line system hint instead. Leave empty for no location hint."
          },
          "runsPerPrompt": {
            "title": "Runs per prompt",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "AI answers vary from call to call. Running each prompt 2-3 times gives steadier mention rates. Every run is a separate check.",
            "default": 1
          },
          "compareWithPreviousRun": {
            "title": "Compare with previous run",
            "type": "boolean",
            "description": "Saves this run's summary in a named key-value store in your account and shows changes (mention rate, rank, citation rate, share of voice) versus the previous run with the same brand, prompts, engines and country. Ideal for weekly schedules.",
            "default": true
          },
          "historyKey": {
            "title": "History key (optional)",
            "type": "string",
            "description": "Key under which the summary is stored for comparisons. Leave empty to derive it from the brand, prompts, engines and country. Set it to keep comparing after you edit prompts."
          },
          "historyStoreName": {
            "title": "History store name",
            "type": "string",
            "description": "Named key-value store that keeps run history.",
            "default": "ai-visibility-history"
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Optional. Use your own OpenAI key for ChatGPT checks and pay the much lower bring-your-own-key price. Stored encrypted, never logged or saved to the output."
          },
          "perplexityApiKey": {
            "title": "Perplexity API key",
            "type": "string",
            "description": "Optional. Your own Perplexity API key."
          },
          "geminiApiKey": {
            "title": "Gemini API key",
            "type": "string",
            "description": "Optional. Your own Google AI Studio (Gemini API) key."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Optional. Your own Anthropic (Claude) API key."
          },
          "useBuiltInKeys": {
            "title": "Use built-in API keys for engines without your own key",
            "type": "boolean",
            "description": "Untick to run only the engines for which you supplied your own key (so you are only ever charged the bring-your-own-key price).",
            "default": true
          },
          "openaiModel": {
            "title": "ChatGPT model",
            "type": "string",
            "description": "OpenAI model with web search support. With built-in keys only these are allowed: gpt-6-luna (default), gpt-5.6-luna, gpt-5-nano, gpt-5-mini, gpt-4.1-mini, gpt-4o-mini. With your own key, any model."
          },
          "perplexityModel": {
            "title": "Perplexity model",
            "type": "string",
            "description": "Perplexity Agent API model, default perplexity/sonar. With your own key you can use any Agent API model, or a preset written as preset:fast."
          },
          "geminiModel": {
            "title": "Gemini model",
            "type": "string",
            "description": "Gemini model with Google Search grounding. Built-in keys: gemini-3.5-flash-lite (default), gemini-2.5-flash-lite, gemini-2.5-flash."
          },
          "claudeModel": {
            "title": "Claude model",
            "type": "string",
            "description": "Claude model with the web search tool. Built-in keys: claude-haiku-5-5 (default)."
          },
          "maxSearchesPerCheck": {
            "title": "Max web searches per check",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Upper limit on web searches per answer for ChatGPT and Claude (other engines decide themselves). Capped at 3 on built-in keys.",
            "default": 2
          },
          "encourageWebSearch": {
            "title": "Ask engines to search and cite",
            "type": "boolean",
            "description": "Adds one brand-neutral instruction (\"search the web for current information and cite your sources\"), so answers are grounded like the consumer search experience. Your brand and competitors are never mentioned to the engines.",
            "default": true
          },
          "caseSensitive": {
            "title": "Case-sensitive brand matching",
            "type": "boolean",
            "description": "Turn on for brand names that are also common words (e.g. Notion, Monday).",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many checks run in parallel.",
            "default": 4
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 10,
            "maximum": 600,
            "type": "integer",
            "description": "Timeout for each API call. Web-search answers can take 30-90 seconds.",
            "default": 120
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Retries per check on rate limits (429), server errors (5xx) and timeouts, with exponential backoff.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}