{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Brand Monitor: GEO / AI Search Visibility Tracker",
    "description": "Track how your brand appears in AI answers across ChatGPT, Gemini & Claude. Measure mention rate, share-of-voice vs competitors, ranking & cited sources — with multi-sample reliability. GEO / AEO visibility data for SEO agencies, brand & PR teams. Pay-as-you-go.",
    "version": "0.1",
    "x-build-id": "8mzwRIefJgrheBBiS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foxlabs~ai-brand-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foxlabs-ai-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/foxlabs~ai-brand-monitor/runs": {
      "post": {
        "operationId": "runs-sync-foxlabs-ai-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/foxlabs~ai-brand-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-foxlabs-ai-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",
        "properties": {
          "brand": {
            "title": "Brand / company name",
            "type": "string",
            "description": "The brand you want to track in AI answers (e.g. \"Notion\"). This is what we look for in each AI engine's response."
          },
          "category": {
            "title": "Category / market (for auto prompts)",
            "type": "string",
            "description": "The product category buyers ask about (e.g. \"project management software\"). Used to auto-generate realistic buyer-intent prompts. Leave the Advanced prompts field empty to use these."
          },
          "brandDomain": {
            "title": "Brand domain (optional, for citation rate)",
            "type": "string",
            "description": "Your brand's website domain (e.g. \"notion.so\"). If provided, we measure how often AI engines cite YOUR domain as a source — the citation-rate component of the Visibility Index."
          },
          "competitors": {
            "title": "Competitors (for share-of-voice)",
            "type": "array",
            "description": "Competitor brands to compare against. We measure how often each is mentioned vs your brand. Leave empty to track your brand only.",
            "items": {
              "type": "string"
            }
          },
          "engines": {
            "title": "AI engines to query",
            "type": "array",
            "description": "Which AI search engines to check. An engine is skipped automatically if no API key is available for it (yours or ours).",
            "items": {
              "type": "string",
              "enum": [
                "gemini",
                "openai",
                "anthropic",
                "perplexity"
              ],
              "enumTitles": [
                "Gemini (Google)",
                "ChatGPT (OpenAI)",
                "Claude (Anthropic)",
                "Perplexity — bring your own key"
              ]
            }
          },
          "maxPromptsPerEngine": {
            "title": "Prompts per engine",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "How many buyer-intent prompts to run per engine. More prompts = broader coverage, higher cost."
          },
          "samplesPerPrompt": {
            "title": "Samples per prompt (reliability)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "AI answers change every time you ask. We run each prompt this many times and report a mention RATE + stability — not a single noisy snapshot. 3 is recommended; higher = more statistically reliable, higher cost."
          },
          "prompts": {
            "title": "Advanced — custom prompts (overrides auto)",
            "type": "array",
            "description": "POWER USERS ONLY. Exact prompts to send to every engine. If filled, this OVERRIDES the auto-generated prompts from Category. Use {brand} and {category} as placeholders if you like.",
            "items": {
              "type": "string"
            }
          },
          "webhookUrl": {
            "title": "Advanced — webhook / alert URL (optional)",
            "type": "string",
            "description": "If set, we POST the summary scorecard (JSON) to this URL when the run finishes — wire it to Slack, Make, Zapier or n8n for AI-visibility alerts."
          },
          "openaiApiKey": {
            "title": "Advanced — your OpenAI API key (optional)",
            "type": "string",
            "description": "Bring your own OpenAI key to run ChatGPT queries on your own account (no markup). Leave empty to use ours (billed via the actor price)."
          },
          "anthropicApiKey": {
            "title": "Advanced — your Anthropic API key (optional)",
            "type": "string",
            "description": "Bring your own Anthropic key for Claude queries. Leave empty to use ours."
          },
          "perplexityApiKey": {
            "title": "Advanced — your Perplexity API key (optional)",
            "type": "string",
            "description": "Bring your own Perplexity key for Perplexity queries. Leave empty to use ours."
          },
          "geminiApiKey": {
            "title": "Advanced — your Google Gemini API key (optional)",
            "type": "string",
            "description": "Bring your own Google AI Studio (Gemini) key. Leave empty to use ours."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}