{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Search Visibility & GEO Rank Tracker: ChatGPT, Gemini",
    "description": "AI search visibility tracker for GEO/AEO: see if ChatGPT, Perplexity, Gemini, Claude, Grok and Google AI Overviews mention, rank and cite your brand vs competitors. Share of voice, sentiment, cited sources, gap prompts, HTML report, trend alerts. $0.015/check + AI at cost.",
    "version": "1.0",
    "x-build-id": "qKpvzXgIls4XnBoBL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rs-automation-labs~ai-search-visibility-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rs-automation-labs-ai-search-visibility-checker",
        "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/rs-automation-labs~ai-search-visibility-checker/runs": {
      "post": {
        "operationId": "runs-sync-rs-automation-labs-ai-search-visibility-checker",
        "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/rs-automation-labs~ai-search-visibility-checker/run-sync": {
      "post": {
        "operationId": "run-sync-rs-automation-labs-ai-search-visibility-checker",
        "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": "Your brand",
            "type": "string",
            "description": "Brand, product or company to track, exactly as people write it (e.g. 'HubSpot')."
          },
          "brandDomain": {
            "title": "Your website domain",
            "type": "string",
            "description": "Used to detect when AI engines cite your own site (e.g. hubspot.com). Subdomains count too."
          },
          "brandAliases": {
            "title": "Other spellings of your brand (optional)",
            "type": "array",
            "description": "Alternative names, product names or common misspellings, e.g. 'HubSpot CRM', 'Hub Spot'.",
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "One per line. Add the domain after a | to also track their citations: 'Pingdom | pingdom.com'. Up to 20. Extra spellings: 'Google PageSpeed Insights, PageSpeed | pagespeed.web.dev'.",
            "items": {
              "type": "string"
            }
          },
          "queries": {
            "title": "Prompts / questions to check",
            "type": "array",
            "description": "The questions your customers ask AI assistants, sent verbatim. Tip: use unbranded buyer questions ('best CRM for startups') to measure organic visibility.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords / categories for auto-generated prompts (optional)",
            "type": "array",
            "description": "E.g. 'CRM software', 'website speed test tool'. With auto-generation on, each keyword becomes up to 4 unbranded buyer prompts (best ..., top ... in your country, recommendations, how to choose) plus 'alternatives to <competitor>' prompts.",
            "items": {
              "type": "string"
            }
          },
          "autoGenerateQueries": {
            "title": "Auto-generate prompts from keywords",
            "type": "boolean",
            "description": "Generated prompts never contain your brand name, so they measure organic visibility.",
            "default": true
          },
          "maxGeneratedQueries": {
            "title": "Max generated prompts",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Upper limit for auto-generated prompts (your own prompts are always used first).",
            "default": 10
          },
          "engines": {
            "title": "AI engines to check",
            "type": "array",
            "description": "Each prompt is sent to every selected engine with live web search enabled. One successful answer = one 'query check'.",
            "items": {
              "type": "string",
              "enum": [
                "chatgpt",
                "perplexity",
                "gemini",
                "claude",
                "grok",
                "google_ai_overview"
              ],
              "enumTitles": [
                "ChatGPT (OpenAI + web search)",
                "Perplexity (Sonar)",
                "Gemini (Google Search grounding)",
                "Claude (Anthropic + web search)",
                "Grok (xAI + web search)",
                "Google AI Overviews"
              ]
            },
            "default": [
              "chatgpt",
              "perplexity",
              "gemini",
              "google_ai_overview"
            ]
          },
          "runsPerQuery": {
            "title": "Samples per prompt",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "AI answers vary between runs. 2-3 samples per prompt give more stable numbers (each sample is one check). Google AI Overviews are always fetched once.",
            "default": 1
          },
          "country": {
            "title": "Country (ISO code)",
            "type": "string",
            "description": "2-letter code such as US, IN, GB, DE. Passed to engines that support user location (ChatGPT, Perplexity) and used in auto-generated prompts. Google AI Overviews are fetched from Apify's default location."
          },
          "language": {
            "title": "Answer language (optional)",
            "type": "string",
            "description": "E.g. 'English', 'Hindi', 'German'. Leave empty to let the engine choose (usually the prompt's language)."
          },
          "maxChecks": {
            "title": "Max checks per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on prompts x engines x samples, so a long list can't create a surprise bill. Prompts beyond the cap are listed in the summary.",
            "default": 100
          },
          "useLlmAnalysis": {
            "title": "LLM analysis of sentiment & recommendations",
            "type": "boolean",
            "description": "Adds a cheap LLM pass (about $0.0003 per answer at cost) that judges sentiment, whether each brand is actually recommended and which other brands the answer suggests. Mentions, ranks and citations are always computed from the answer text itself. Off = rule-based sentiment only.",
            "default": true
          },
          "analysisModel": {
            "title": "Analysis model (OpenRouter id)",
            "type": "string",
            "description": "Model used for the LLM analysis.",
            "default": "openai/gpt-4.1-nano"
          },
          "includeFullAnswer": {
            "title": "Save the full AI answer text",
            "type": "boolean",
            "description": "Turn off for smaller datasets (an excerpt is always saved).",
            "default": true
          },
          "openRouterApiKey": {
            "title": "Your OpenRouter API key (optional)",
            "type": "string",
            "description": "One key for every LLM engine, billed by OpenRouter directly. Without any key the Actor uses Apify's official OpenRouter proxy and the model cost is billed to your Apify account at OpenRouter prices (10x on the Apify FREE plan). Stored encrypted, never logged."
          },
          "openaiApiKey": {
            "title": "OpenAI API key (ChatGPT engine)",
            "type": "string",
            "description": "Uses the official OpenAI Responses API with the web_search tool."
          },
          "perplexityApiKey": {
            "title": "Perplexity API key (Perplexity engine)",
            "type": "string",
            "description": "Uses the official Perplexity Sonar API."
          },
          "geminiApiKey": {
            "title": "Google Gemini API key (Gemini engine)",
            "type": "string",
            "description": "Free key from Google AI Studio. Uses the official Gemini API with Google Search grounding (free daily quota on the Gemini free tier)."
          },
          "modelOverrides": {
            "title": "Model overrides (advanced)",
            "type": "object",
            "description": "Pick other models per engine, e.g. {\"chatgpt\": \"openai/gpt-5.4-mini\", \"claude\": \"anthropic/claude-sonnet-4.6\"}. Use OpenRouter ids, or provider ids when you supply that provider's key."
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many AI answers to fetch at the same time.",
            "default": 4
          },
          "maxRetries": {
            "title": "Retries per check",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for temporary failures (rate limits, 5xx, timeouts) with exponential backoff. Failed checks are never charged.",
            "default": 2
          },
          "requestTimeoutSecs": {
            "title": "Timeout per answer (seconds)",
            "minimum": 30,
            "maximum": 300,
            "type": "integer",
            "description": "How long to wait for one AI answer before retrying.",
            "default": 120
          },
          "maxAnswerTokens": {
            "title": "Max answer length (tokens)",
            "minimum": 300,
            "maximum": 2000,
            "type": "integer",
            "description": "Upper limit for each AI answer. Real assistants answer in roughly 400-1200 tokens.",
            "default": 1500
          },
          "compareWithPrevious": {
            "title": "Compare with previous run (trend tracking)",
            "type": "boolean",
            "description": "Remember the summary in a named key-value store and report changes in visibility and mention rate since the last run. Ideal for weekly schedules.",
            "default": false
          },
          "historyStoreName": {
            "title": "History store name",
            "type": "string",
            "description": "Named key-value store that keeps previous summaries on your account.",
            "default": "ai-visibility-history"
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Separate histories for different clients or projects, e.g. 'client-acme'.",
            "default": "default"
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "We POST a JSON summary when the run finishes. Includes a 'text' field, so Slack / Google Chat incoming webhooks work as is (Discord uses 'content', also included). Zapier, Make and n8n work too."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}