{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Search Visibility Tracker: ChatGPT & Perplexity (GEO)",
    "description": "ChatGPT brand monitoring and Perplexity rank tracker: see how often AI search mentions, ranks and cites your brand vs competitors for buyer prompts. LLM share of voice, cited domains, run-over-run deltas. Official APIs, Arabic-ready.",
    "version": "0.1",
    "x-build-id": "xH2X0eg7CL4bNrsyr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/chapimenge~ai-search-visibility/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-chapimenge-ai-search-visibility",
        "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/chapimenge~ai-search-visibility/runs": {
      "post": {
        "operationId": "runs-sync-chapimenge-ai-search-visibility",
        "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/chapimenge~ai-search-visibility/run-sync": {
      "post": {
        "operationId": "run-sync-chapimenge-ai-search-visibility",
        "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",
          "prompts"
        ],
        "properties": {
          "brand": {
            "title": "Your brand",
            "type": "string",
            "description": "The brand name to track, exactly as people write it (e.g. \"HubSpot\"). Matching ignores case and accents and understands Arabic spelling variants."
          },
          "brandAliases": {
            "title": "Brand aliases (optional)",
            "type": "array",
            "description": "Other names that count as a mention of your brand: product names, abbreviations, Arabic spelling (e.g. \"HubSpot CRM\", \"هب سبوت\"). Terms shorter than 2 characters are ignored.",
            "items": {
              "type": "string"
            }
          },
          "brandDomain": {
            "title": "Brand website domain (optional)",
            "type": "string",
            "description": "Your domain, e.g. \"hubspot.com\". Used to detect when AI answers cite your site (subdomains count) and when the domain is written in the answer."
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "One competitor per line in the format <code>Name | domain.com | alias 1, alias 2</code>. Domain and aliases are optional. Used for rank and share-of-voice. Up to 50.",
            "items": {
              "type": "string"
            }
          },
          "prompts": {
            "title": "Prompts (buyer-intent questions)",
            "type": "array",
            "description": "1–200 questions your customers might ask an AI assistant, e.g. \"What is the best CRM for a small business?\". Any language works, including Arabic. Each prompt is sent to each selected engine.",
            "items": {
              "type": "string"
            }
          },
          "engines": {
            "title": "AI engines",
            "type": "array",
            "description": "Which AI search engines to ask. ChatGPT = OpenAI Responses API with web search (included). Perplexity = Perplexity Agent API (Sonar) with web search — currently requires your own Perplexity API key (field below).",
            "items": {
              "type": "string",
              "enum": [
                "chatgpt",
                "perplexity"
              ],
              "enumTitles": [
                "ChatGPT (OpenAI + web search)",
                "Perplexity (Sonar + web search)"
              ]
            },
            "default": [
              "chatgpt"
            ]
          },
          "runsPerPrompt": {
            "title": "Runs per prompt",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "AI answers vary from run to run. Asking each prompt 2–3 times gives steadier averages (each run is charged as a separate check).",
            "default": 1
          },
          "language": {
            "title": "Answer language (optional)",
            "type": "string",
            "description": "ISO language code such as \"ar\" or \"en\". If set, engines are asked to answer in that language. Leave empty to let the engine answer naturally (usually in the prompt's language)."
          },
          "country": {
            "title": "Country (optional)",
            "type": "string",
            "description": "2-letter country code such as \"AE\", \"SA\", \"US\". Passed as the user location to ChatGPT web search and as a hint to the other engines."
          },
          "previousDatasetId": {
            "title": "Previous run dataset ID (optional)",
            "type": "string",
            "description": "Dataset ID of an earlier run of this Actor. The summary and each result then include changes versus that run (mention rate, share of voice, rank)."
          },
          "includeAnswer": {
            "title": "Include full answer text",
            "type": "boolean",
            "description": "Store the AI answer text in each result.",
            "default": true
          },
          "maxAnswerChars": {
            "title": "Max answer length (characters)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Truncate stored answers to this many characters (0 = no limit). Mention detection always uses the full answer.",
            "default": 4000
          },
          "openaiApiKey": {
            "title": "OpenAI API key (optional, BYOK)",
            "type": "string",
            "description": "Use your own OpenAI key for ChatGPT checks. You then pay OpenAI directly and this Actor charges the lower \"check-byok\" price."
          },
          "perplexityApiKey": {
            "title": "Perplexity API key (optional, BYOK)",
            "type": "string",
            "description": "Use your own Perplexity API key for Perplexity checks."
          },
          "openaiModel": {
            "title": "OpenAI model",
            "type": "string",
            "description": "Advanced. Default: gpt-5-mini."
          },
          "perplexityModel": {
            "title": "Perplexity model",
            "type": "string",
            "description": "Advanced. Default: perplexity/sonar."
          },
          "maxConcurrency": {
            "title": "Max parallel checks",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many AI requests run at the same time. Lower it if your own API keys hit rate limits.",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}