{
  "openapi": "3.0.1",
  "info": {
    "title": "🔍 AI Brand Monitor — Perplexity, ChatGPT, Claude & Gemini",
    "description": "Track brand mentions, citations, and AI search visibility across Perplexity, ChatGPT, Claude, and Gemini. Schedule weekly GEO monitoring runs, export via API, or integrate with Make.com, Zapier, or n8n.",
    "version": "1.1",
    "x-build-id": "ViS7b1YnzXI4vEyP2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~ai-search-brand-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-ai-search-brand-monitor",
        "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/khadinakbar~ai-search-brand-monitor/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-ai-search-brand-monitor",
        "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/khadinakbar~ai-search-brand-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-ai-search-brand-monitor",
        "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": "Use this field when the user provides their brand, company, product, or tool name to monitor (e.g., 'Ahrefs', 'HubSpot', 'Notion'). This is the primary brand to track across AI search results. Do NOT use this for competitor names — use the competitors field for those."
          },
          "brandDomain": {
            "title": "Brand domain",
            "type": "string",
            "description": "The primary website domain of the brand (e.g., 'ahrefs.com', 'hubspot.com'). Used to detect when the brand is cited as a source in AI search results. Leave empty if you only want to track text mentions."
          },
          "brandAliases": {
            "title": "Brand aliases",
            "type": "array",
            "description": "Alternate names, acronyms, or handles the brand is known by (e.g., ['Ahrefs', 'ahrefs.com']). The actor will search for all of these in AI responses, not just the primary brand name. Useful for brands with common abbreviations.",
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "Competitor brands to track",
            "type": "array",
            "description": "Use this field when the user wants to track competitor co-mentions — which competing brands appear in the same AI responses as their brand. Provide a list of competitor names (e.g., ['Semrush', 'Moz', 'Majestic']). Up to 10 competitors. Each response will show which of these were mentioned alongside your brand.",
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "AI platforms to query",
            "type": "array",
            "description": "Use this field when the user says 'only check Perplexity', 'skip Claude', or names specific platforms. Valid values: 'perplexity' (live web search + native citations), 'chatgpt' (gpt-4o-search-preview with web search), 'claude' (knowledge-base only — no live search), 'gemini' (Google Search grounding). Defaults to all four.",
            "items": {
              "type": "string"
            },
            "default": [
              "perplexity",
              "chatgpt",
              "claude",
              "gemini"
            ]
          },
          "queryTemplates": {
            "title": "Query template categories",
            "type": "array",
            "description": "Use customQueries instead when the user provides specific questions. For standard checks, select from: 'best_tools' (category roundups), 'alternatives' (what are alternatives to X), 'recommendations' (should I use X), 'reviews' (user sentiment), 'comparisons' (X vs competitors). Defaults to best_tools, alternatives, recommendations.",
            "items": {
              "type": "string"
            },
            "default": [
              "best_tools",
              "alternatives",
              "recommendations"
            ]
          },
          "customQueries": {
            "title": "Custom queries",
            "type": "array",
            "description": "Use this field when the user provides specific questions or prompts to submit to AI platforms (e.g., 'Which SEO tool has the best backlink database?', 'What tool does Neil Patel recommend for keyword research?'). These run in addition to any selected queryTemplates. Do NOT use this when the user describes a general monitoring need — use queryTemplates for that.",
            "items": {
              "type": "string"
            }
          },
          "maxQueriesPerPlatform": {
            "title": "Max queries to run",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of unique queries to submit per platform. Higher values give more coverage but use more credits (and your AI API budget). Each query × platform pair = one brand-query-checked event ($0.08). Default is 5 queries. Set to 10 for a deeper audit.",
            "default": 5
          },
          "perplexityApiKey": {
            "title": "Perplexity API key",
            "type": "string",
            "description": "Your Perplexity AI API key (starts with 'pplx-'). Get one at perplexity.ai/api. Perplexity is recommended as it provides native source citations, showing exactly which URLs the AI cites when mentioning your brand. Leave empty to skip Perplexity."
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Your OpenAI API key (starts with 'sk-'). Get one at platform.openai.com. Used to query ChatGPT with web search via gpt-4o-search-preview model. Leave empty to skip ChatGPT."
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Your Anthropic API key (starts with 'sk-ant-'). Get one at console.anthropic.com. IMPORTANT: Claude uses its training knowledge — not live web search. Results measure how Claude's model was trained to perceive your brand, which is a different GEO signal than Perplexity/Gemini (live search). Leave empty to skip."
          },
          "geminiApiKey": {
            "title": "Google Gemini API key",
            "type": "string",
            "description": "Your Google AI Studio API key for Gemini. Get one free at aistudio.google.com. Used to query Gemini 2.0 Flash with Google Search grounding, which provides real-time web search results. Leave empty to skip Gemini."
          },
          "industry": {
            "title": "Industry / category",
            "type": "string",
            "description": "Your brand's industry or product category (e.g., 'SEO', 'CRM', 'email marketing', 'AI writing'). Used to make query templates more specific and relevant. If left empty, queries will use generic category language."
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "An optional HTTPS URL to receive a POST request when the actor run completes. The payload will be the full run summary JSON including GEO score, mention rates, and recommendations. Useful for triggering downstream automation in Make.com, Zapier, n8n, or Slack."
          },
          "demoMode": {
            "title": "Demo / health check mode",
            "type": "boolean",
            "description": "Set to true to run a health check without making any AI API calls. The actor will exit successfully with an informational message. Useful for testing actor connectivity and Apify scheduling without consuming API credits.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}