{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Visibility Monitor",
    "description": "Track ChatGPT brand mentions, Gemini answers, and Google AI Overviews. Compare share of voice and citation changes for generative engine optimization.",
    "version": "0.1",
    "x-build-id": "fsqzxSlyP0aD3MluE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/suslabs~ai-visibility-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-suslabs-ai-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/suslabs~ai-visibility-monitor/runs": {
      "post": {
        "operationId": "runs-sync-suslabs-ai-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/suslabs~ai-visibility-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-suslabs-ai-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": [
          "brand"
        ],
        "properties": {
          "preset": {
            "title": "Preset",
            "enum": [
              "brand-vs-competitors",
              "category-leaders",
              "product-comparison",
              "buying-questions"
            ],
            "type": "string",
            "description": "Optional prompt set. If you leave Prompts empty, the preset fills them and the run writes that list to EFFECTIVE_CONFIG."
          },
          "brand": {
            "title": "Brand",
            "required": [
              "name"
            ],
            "type": "object",
            "description": "The brand to look for. Matching is whole-word and case-insensitive, including aliases.",
            "properties": {
              "name": {
                "title": "Name",
                "type": "string",
                "editor": "textfield",
                "description": "Brand name to match as a whole word.",
                "prefill": "Notion"
              },
              "aliases": {
                "title": "Aliases",
                "type": "array",
                "editor": "stringList",
                "description": "Other names for the same brand.",
                "prefill": [
                  "Notion AI"
                ],
                "items": {
                  "type": "string"
                }
              },
              "domains": {
                "title": "Domains",
                "type": "array",
                "editor": "stringList",
                "description": "Domains that count as a citation of this brand.",
                "prefill": [
                  "notion.so"
                ],
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "Names and domains to compare. Positions are the order the names first appear in the answer.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "title": "Name",
                  "type": "string",
                  "description": "Competitor name to match as a whole word."
                },
                "aliases": {
                  "title": "Aliases",
                  "type": "array",
                  "description": "Other names for this competitor.",
                  "items": {
                    "type": "string"
                  }
                },
                "domains": {
                  "title": "Domains",
                  "type": "array",
                  "description": "Domains that count as a citation of this competitor.",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "name"
              ]
            }
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Used by the Category leaders preset, for example CRM or note taking."
          },
          "prompts": {
            "title": "Prompts",
            "type": "array",
            "description": "Questions a customer would ask. One check is one prompt on one engine, once per repeat.",
            "items": {
              "type": "string",
              "maxLength": 2000
            }
          },
          "engines": {
            "title": "Engines",
            "type": "array",
            "description": "Default engines are Google AI Overviews, Gemini and ChatGPT. The saved input below leaves ChatGPT off so the first run stays cheap. Perplexity and Google AI Mode are off until you add them.",
            "items": {
              "type": "string",
              "enum": [
                "google_ai_overviews",
                "gemini",
                "chatgpt",
                "perplexity",
                "google_ai_mode"
              ],
              "enumTitles": [
                "Google AI Overviews",
                "Gemini",
                "ChatGPT",
                "Perplexity",
                "Google AI Mode"
              ]
            },
            "default": [
              "google_ai_overviews",
              "gemini",
              "chatgpt"
            ]
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two-letter country code passed to sources that accept one. The official Google AI Overviews Actor accepts queries only, so that route records the country without sending it.",
            "default": "US"
          },
          "repeats": {
            "title": "Repeats",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Ask each prompt this many times per engine. The stable mention rate is the share of those repeats that name the brand.",
            "default": 1
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "When set, the run keeps history for these prompts and engines and emits change rows. Editing the brand or competitors does not reset history."
          },
          "resetMonitor": {
            "title": "Reset monitor",
            "type": "boolean",
            "description": "Clear saved history for this monitor name.",
            "default": false
          },
          "positionMoveThreshold": {
            "title": "Position move threshold",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Emit a position change when the brand's rank among named brands moves by at least this many places.",
            "default": 1
          },
          "publicFeed": {
            "title": "Public change feed",
            "type": "boolean",
            "description": "Write RSS, Atom and JSON files of change events. SUMMARY.feedUrls lists them. Anyone with the link can read the feed.",
            "default": false
          },
          "sentiment": {
            "title": "Local sentiment",
            "type": "boolean",
            "description": "Score sentences that name the brand with a small word list. No model call.",
            "default": true
          },
          "allowPremiumSources": {
            "title": "Allow premium sources",
            "type": "boolean",
            "description": "When a primary source fails, a $0.20 fallback (Apify's ChatGPT, Gemini or Perplexity scrapers) is used only if this is on.",
            "default": false
          },
          "maxSourceCostUsd": {
            "title": "Max source cost (USD)",
            "minimum": 0.001,
            "maximum": 25,
            "type": "number",
            "description": "Cap on source-Actor charges for this run. A call that would pass the cap is not started. Default $0.50. The saved input uses $0.05.",
            "default": 0.5
          },
          "unavailableSources": {
            "title": "Skip these source Actors",
            "type": "array",
            "description": "Actor ids to skip, for example apify/google-ai-overviews-scraper. The next source for that engine is used. Use this when a source is returning empty rows.",
            "items": {
              "type": "string"
            }
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Incoming webhook for change and status rows."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Discord incoming webhook for change and status rows."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "JSON POST with a delivery id. Optional HMAC in X-SusLabs-Signature."
          },
          "webhookSecret": {
            "title": "Webhook secret",
            "type": "string",
            "description": "When set, each POST is signed. The signature is sha256 over deliveryId.timestamp.body."
          },
          "webhookAuthorization": {
            "title": "Webhook Authorization header",
            "type": "string",
            "description": "Sent only to the generic webhook, not to Slack or Discord."
          },
          "webhookMode": {
            "title": "Webhook mode",
            "enum": [
              "item",
              "digest"
            ],
            "type": "string",
            "description": "Send one alert per row, or a digest of up to 10.",
            "default": "item"
          },
          "alertMaxAttempts": {
            "title": "Alert attempts",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many times a failed alert is retried.",
            "default": 5
          },
          "alertRetentionDays": {
            "title": "Alert retention (days)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How long a pending alert is kept for retry.",
            "default": 14
          },
          "webhookMaxItems": {
            "title": "Max alerts per run",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many queued alerts this run will try to send.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}