{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Search Visibility & GEO Brand Monitor",
    "description": "Track brand visibility, share of voice, mention rank, and citation gaps across Google AI Overviews, ChatGPT Search, Perplexity, Gemini & Claude. Includes Turnkey + BYOK modes, weekly delta diffs, Notion/Slack alerts, Server API & MCP.",
    "version": "1.0",
    "x-build-id": "DzXgt3KYuNYTdPY5U"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/forlex~ai-search-visibility-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-forlex-ai-search-visibility-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/forlex~ai-search-visibility-monitor/runs": {
      "post": {
        "operationId": "runs-sync-forlex-ai-search-visibility-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/forlex~ai-search-visibility-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-forlex-ai-search-visibility-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",
          "queries"
        ],
        "properties": {
          "brandName": {
            "title": "🏷️ Brand Name",
            "type": "string",
            "description": "Primary brand or product name to track across AI search answers."
          },
          "brandDomain": {
            "title": "🌐 Brand Domain",
            "type": "string",
            "description": "Your brand domain (e.g. 'apify.com') to match cited URLs and sources."
          },
          "brandAliases": {
            "title": "🔖 Brand Aliases",
            "type": "array",
            "description": "Optional alternative product names or acronyms belonging to your brand.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "⚔️ Competitor Names",
            "type": "array",
            "description": "Competitor brand names to benchmark Share of Voice and mention rank against.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "competitorDomains": {
            "title": "🧭 Competitor Domains",
            "type": "array",
            "description": "Optional competitor domains (matched in order or across citations).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "queries": {
            "title": "🔎 Prompts / Search Queries",
            "type": "array",
            "description": "Buyer-intent prompts or search queries to test across selected AI engines.",
            "items": {
              "type": "string"
            }
          },
          "engines": {
            "title": "AI Engines",
            "type": "array",
            "description": "AI answer engines to query. Supported values: google_ai_overview, perplexity, chatgpt, gemini, claude. 'google_ai_overview' runs with zero third-party keys; LLM engines work via Turnkey Apify OpenRouter or your own BYOK keys.",
            "default": [
              "google_ai_overview"
            ],
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "🌍 Country Code (ISO 2-letter)",
            "type": "string",
            "description": "Two-letter country code for localized search results (e.g. 'us', 'gb', 'de', 'id').",
            "default": "us"
          },
          "language": {
            "title": "🗣️ Language Code",
            "type": "string",
            "description": "Language code for prompts and search queries (e.g. 'en', 'id', 'es').",
            "default": "en"
          },
          "includeCitationGapReport": {
            "title": "📊 Generate Executive Citation-Gap Report (Optional Add-on)",
            "type": "boolean",
            "description": "Aggregate all checks into GEO_REPORT (JSON) and GEO_REPORT_MD (Markdown) in Key-Value Store highlighting domains that cite competitors but not you. Charges 1 'citation-gap-report' event per run.",
            "default": true
          },
          "syncKey": {
            "title": "Delta Sync Key (Optional)",
            "type": "string",
            "description": "Unique project key (e.g. 'mybrand-weekly-geo') to compare mention/citation status against the previous run.",
            "default": ""
          },
          "emitOnlyChanges": {
            "title": "Emit Only Changed Checks",
            "type": "boolean",
            "description": "When Delta Sync Key is set, write only checks whose mention, citation, or rank changed since the prior run.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL (Optional JSON Alert)",
            "type": "string",
            "description": "Optional HTTPS webhook URL to receive the aggregated GEO summary JSON after the run finishes.",
            "default": ""
          },
          "openRouterApiKey": {
            "title": "OpenRouter API Key (Secret)",
            "type": "string",
            "description": "Optional personal OpenRouter API key covering Perplexity, ChatGPT, Gemini, and Claude in BYOK mode."
          },
          "openaiApiKey": {
            "title": "OpenAI API Key (Secret)",
            "type": "string",
            "description": "Optional OpenAI API key for ChatGPT web search responses in BYOK mode."
          },
          "perplexityApiKey": {
            "title": "Perplexity API Key (Secret)",
            "type": "string",
            "description": "Optional Perplexity Sonar API key in BYOK mode."
          },
          "geminiApiKey": {
            "title": "Google Gemini API Key (Secret)",
            "type": "string",
            "description": "Optional Gemini API key with Google Search grounding in BYOK mode."
          },
          "anthropicApiKey": {
            "title": "Anthropic API Key (Secret)",
            "type": "string",
            "description": "Optional Anthropic API key for Claude in BYOK mode."
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of prompt × engine checks run in parallel.",
            "default": 3
          },
          "outputConnector": {
            "title": "Send GEO Report to Notion / Slack / Todoist (MCP Connector)",
            "type": "string",
            "description": "Optional Apify MCP Connector to post GEO_REPORT_MD after the run completes."
          },
          "deliverTarget": {
            "title": "Destination Target (Page / Channel ID)",
            "type": "string",
            "description": "Optional Notion page/database ID or Slack channel ID.",
            "default": ""
          },
          "deliverMode": {
            "title": "Connector Write Mode",
            "enum": [
              "summary",
              "perCheck"
            ],
            "type": "string",
            "description": "Choose whether to deliver the executive GEO report or individual check rows.",
            "default": "summary"
          },
          "deliverMaxItems": {
            "title": "Max Items to Deliver",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum rows delivered in perCheck mode.",
            "default": 25
          },
          "proxyConfiguration": {
            "title": "Proxy Settings (Google SERP Proxy Recommended for AI Overviews)",
            "type": "object",
            "description": "Uses Apify GOOGLE_SERP proxy for Google AI Overviews on Apify Cloud, with automatic web fallback if unavailable.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "GOOGLE_SERP"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}