{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Search Visibility Audit: ChatGPT & Perplexity",
    "description": "Measure how often ChatGPT, Perplexity and Gemini recommend your brand: the Actor reads your site, writes 30 buyer-intent questions and samples each engine several times. HTML report with mention and citation rates (95% CI), competitor share of voice, cited sources and every sentence about you.",
    "version": "0.1",
    "x-build-id": "vlnZ8gptOaQTVVG1q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kyungminlee~ai-search-visibility-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kyungminlee-ai-search-visibility-audit",
        "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/kyungminlee~ai-search-visibility-audit/runs": {
      "post": {
        "operationId": "runs-sync-kyungminlee-ai-search-visibility-audit",
        "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/kyungminlee~ai-search-visibility-audit/run-sync": {
      "post": {
        "operationId": "run-sync-kyungminlee-ai-search-visibility-audit",
        "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": [
          "websiteUrl",
          "brandName"
        ],
        "properties": {
          "websiteUrl": {
            "title": "Website URL",
            "type": "string",
            "description": "Homepage of the brand to audit. The Actor reads the homepage and up to five key pages (about, products, pricing, blog) to understand what the brand sells."
          },
          "brandName": {
            "title": "Brand name",
            "type": "string",
            "description": "How the brand is written in text, for example 'Apify'. Mentions are matched case-insensitively together with the website domain."
          },
          "brandAliases": {
            "title": "Brand aliases",
            "type": "array",
            "description": "Other spellings or product names that count as a brand mention (optional).",
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "Competitor brand names to measure share of voice against (0-10).",
            "items": {
              "type": "string"
            }
          },
          "businessDescription": {
            "title": "Business description",
            "type": "string",
            "description": "Optional one-paragraph description of what the brand offers and who buys it. Improves prompt generation; leave empty to rely on the crawled site."
          },
          "promptCount": {
            "title": "Number of prompts",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "How many buyer-intent questions to generate and test (5-60). With a free Gemini key use 10-15.",
            "default": 30
          },
          "samplesPerPrompt": {
            "title": "Samples per prompt",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many times each prompt is asked per engine. AI answers vary, so 3 samples give a more stable citation rate. With a free Gemini key use 1.",
            "default": 3
          },
          "engines": {
            "title": "AI engines",
            "type": "array",
            "description": "Which answer engines to sample. Each engine needs its own API key below; engines without a key are skipped (or mocked when Mock mode is on). Cheapest live setup: Gemini only with a free Google AI Studio key and a small audit (about 15 answers per day).",
            "items": {
              "type": "string",
              "enum": [
                "openai",
                "perplexity",
                "gemini"
              ],
              "enumTitles": [
                "ChatGPT (OpenAI)",
                "Perplexity (sonar)",
                "Gemini (Google)"
              ]
            },
            "default": [
              "openai"
            ]
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Enables the ChatGPT engine (Responses API with web search when available, chat completions otherwise) and, when present, generates the questions. Optional: with only a Gemini key, Gemini generates the questions. Get one at platform.openai.com. Typical cost per audit with defaults: under $1."
          },
          "openaiModel": {
            "title": "OpenAI model",
            "type": "string",
            "description": "OpenAI model for prompt generation and the ChatGPT engine.",
            "default": "gpt-4o-mini"
          },
          "perplexityApiKey": {
            "title": "Perplexity API key",
            "type": "string",
            "description": "Enables the Perplexity engine (model 'sonar'), which returns web citations. Get one at perplexity.ai/settings/api."
          },
          "geminiApiKey": {
            "title": "Gemini API key",
            "type": "string",
            "description": "Enables the Gemini engine (with Google Search grounding when your key has grounding quota) and generates the questions when no OpenAI key is given. Paid tier (billing enabled in Google AI Studio): a default 30 x 3 audit costs about $0.20 in Gemini 3.x Flash tokens and grounding is within the 5,000 free searches per month (Sept 2026 prices). Free tier is small (observed: 20 requests per day per model, no grounding): keep prompts x samples at or below about 15."
          },
          "geminiModel": {
            "title": "Gemini model",
            "type": "string",
            "description": "Gemini model for the Gemini engine and (without an OpenAI key) prompt generation. 'gemini-flash-latest' is Google's alias for the newest stable Flash; if a model is retired, overloaded or has no quota on your key, the Actor switches to another available Flash model automatically.",
            "default": "gemini-flash-latest"
          },
          "mockMode": {
            "title": "Mock mode (no API calls)",
            "type": "boolean",
            "description": "Generate a demo report with simulated answers instead of calling any AI API. Automatically used when no API key is provided. Mock audits are not charged.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}