{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Visibility Tracker for Brands | GEO / AEO Monitoring",
    "description": "Know exactly where your brand stands when buyers ask AI for recommendations. Track mentions, sentiment, and share of voice across ChatGPT, Gemini, Perplexity & Claude and what changes run after run.",
    "version": "0.1",
    "x-build-id": "GndBKYi3y7lbRX50L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leafy-dev-jr~brand-ai-visibility-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leafy-dev-jr-brand-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/leafy-dev-jr~brand-ai-visibility-tracker/runs": {
      "post": {
        "operationId": "runs-sync-leafy-dev-jr-brand-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/leafy-dev-jr~brand-ai-visibility-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-leafy-dev-jr-brand-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",
          "category"
        ],
        "properties": {
          "brand": {
            "title": "Brand name",
            "type": "string",
            "description": "The brand or company you want to track (e.g. 'CeraVe')."
          },
          "brandAliases": {
            "title": "Brand aliases",
            "type": "array",
            "description": "Alternate names or spellings that mean the same brand. These are canonicalized into a single brand when detecting mentions (e.g. 'Cera Ve').",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category / what the brand does",
            "type": "string",
            "description": "A short description of the product category. Used to auto-generate realistic buyer-intent prompts (e.g. 'affordable skincare for sensitive skin')."
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "Competitor brand names to measure share-of-voice against.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "languages": {
            "title": "Languages",
            "type": "array",
            "description": "Languages to generate and run buyer-intent prompts in. Only English (en) is enabled today — more languages (Taglish, Bahasa Indonesia, Vietnamese, Thai) are coming as a fast-follow.",
            "items": {
              "type": "string",
              "enum": [
                "en"
              ],
              "enumTitles": [
                "English (en)"
              ]
            },
            "default": [
              "en"
            ]
          },
          "country": {
            "title": "Country / market context",
            "type": "string",
            "description": "Optional. Frames the generated prompts with local market context (e.g. 'United States', 'Philippines'). Leave blank for a generic global framing."
          },
          "customPrompts": {
            "title": "Custom prompts",
            "type": "array",
            "description": "Optional. Your own buyer-intent questions to run instead of auto-generated ones. If provided, these are used verbatim for every selected language and prompt generation is skipped.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "promptCountPerLanguage": {
            "title": "Prompts per language",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many prompts to auto-generate and run per language when no custom prompts are supplied.",
            "default": 5
          },
          "engines": {
            "title": "AI assistants to check",
            "type": "array",
            "description": "Which AI assistants to query. Gemini is the free default. ChatGPT and Perplexity both run through an OpenRouter key (one key covers both); Claude uses an Anthropic key. Any engine without its key is skipped automatically — no errors.",
            "items": {
              "type": "string",
              "enum": [
                "gemini",
                "chatgpt",
                "perplexity",
                "claude"
              ],
              "enumTitles": [
                "Gemini (free, default)",
                "ChatGPT / GPT (via OpenRouter, BYOK)",
                "Perplexity (via OpenRouter, BYOK)",
                "Claude (via Anthropic, BYOK)"
              ]
            },
            "default": [
              "gemini"
            ]
          },
          "geminiApiKey": {
            "title": "Gemini API key (free)",
            "type": "string",
            "description": "Your free Google Gemini (AI Studio) API key. Get one at https://aistudio.google.com/apikey — free tier, no credit card required. Required unless you exclusively use another engine and supply your own prompts."
          },
          "openrouterApiKey": {
            "title": "OpenRouter API key (ChatGPT + Perplexity)",
            "type": "string",
            "description": "Optional. Your OpenRouter API key (https://openrouter.ai/keys). One key powers BOTH the ChatGPT and Perplexity engines. You pay OpenRouter directly for these calls."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key (Claude)",
            "type": "string",
            "description": "Optional. Your Anthropic API key (https://console.anthropic.com/). Enables the Claude engine (with web search). You pay Anthropic directly for these calls."
          },
          "chatgptModel": {
            "title": "ChatGPT model (advanced)",
            "type": "string",
            "description": "Optional. OpenRouter model slug for the ChatGPT engine. The ':online' suffix enables live web search. Override with a newer GPT model any time.",
            "default": "openai/gpt-4o-mini:online"
          },
          "perplexityModel": {
            "title": "Perplexity model (advanced)",
            "type": "string",
            "description": "Optional. OpenRouter model slug for the Perplexity engine. Perplexity Sonar models perform live web search natively.",
            "default": "perplexity/sonar"
          },
          "claudeModel": {
            "title": "Claude model (advanced)",
            "type": "string",
            "description": "Optional. Anthropic model id for the Claude engine.",
            "default": "claude-sonnet-5"
          },
          "useLlmAnalysis": {
            "title": "Deep LLM analysis (sentiment + false-positive check)",
            "type": "boolean",
            "description": "When on, each answer gets one extra lightweight Gemini call to classify sentiment toward your brand and veto false-positive mentions. Turn off to save API quota and rely on fast deterministic detection only.",
            "default": true
          },
          "enableDeltaMode": {
            "title": "Delta mode (compare to previous run)",
            "type": "boolean",
            "description": "Compare this run against the previous run for the same brand + category + languages + engines and report which prompts gained or lost a brand mention. This is what makes scheduling the actor worthwhile.",
            "default": true
          },
          "regeneratePrompts": {
            "title": "Regenerate prompts each run",
            "type": "boolean",
            "description": "By default the auto-generated prompt set is saved and reused on every run so week-over-week deltas compare the same questions. Turn this on to generate a fresh set of prompts this run (resets delta history for auto-generated prompts).",
            "default": false
          },
          "runsToKeep": {
            "title": "Historical runs to keep",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many past run snapshots to retain in the key-value store for trend tracking and delta comparison.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}