{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Brand Visibility Tracker: ChatGPT, Perplexity, Gemini",
    "description": "AI search visibility & brand visibility tracker for GEO / AEO: run your prompts on ChatGPT, Perplexity and Gemini with web search, via official APIs and your own keys. Get brand mentions, rank position, competitors, cited URLs and share of voice in AI answers. MCP-ready.",
    "version": "1.0",
    "x-build-id": "14qhsAyS0jUQ4CmmP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ostrata~ai-search-visibility/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ostrata-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/ostrata~ai-search-visibility/runs": {
      "post": {
        "operationId": "runs-sync-ostrata-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/ostrata~ai-search-visibility/run-sync": {
      "post": {
        "operationId": "run-sync-ostrata-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": "Brand",
            "type": "string",
            "description": "Your brand or product name, as people would write it."
          },
          "brandAliases": {
            "title": "Brand aliases",
            "type": "array",
            "description": "Other spellings or product names that count as a mention of your brand (e.g. \"EU Company Check\").",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "brandDomains": {
            "title": "Brand domains",
            "type": "array",
            "description": "Your website domain(s). Used to detect when AI answers cite your site, and counted as a mention when written in the answer.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "One per line: \"Name\" or \"Name | domain.com\". Adding the domain also detects when the competitor's site is cited.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "prompts": {
            "title": "Prompts",
            "type": "array",
            "description": "Questions your customers ask AI assistants. Each prompt is sent once to each selected engine (one billable check per prompt per engine).",
            "items": {
              "type": "string"
            }
          },
          "engines": {
            "title": "Engines",
            "type": "array",
            "description": "AI engines to query. An engine without an API key below is skipped (free).",
            "items": {
              "type": "string",
              "enum": [
                "openai",
                "perplexity",
                "gemini"
              ],
              "enumTitles": [
                "ChatGPT (OpenAI Responses API + web search)",
                "Perplexity (Agent API, web search)",
                "Gemini (Grounding with Google Search)"
              ]
            },
            "default": [
              "openai",
              "perplexity",
              "gemini"
            ]
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Your own key from platform.openai.com. Stored encrypted by Apify, only sent to api.openai.com. OpenAI bills you for tokens and web-search calls."
          },
          "perplexityApiKey": {
            "title": "Perplexity API key",
            "type": "string",
            "description": "Your own key from perplexity.ai/account/api. Only sent to api.perplexity.ai."
          },
          "geminiApiKey": {
            "title": "Google Gemini API key",
            "type": "string",
            "description": "Your own key from aistudio.google.com. Only sent to generativelanguage.googleapis.com. Grounding with Google Search is billed by Google per search query beyond the free tier."
          },
          "openaiModel": {
            "title": "OpenAI model",
            "type": "string",
            "description": "Any Responses API model that supports the web_search tool (e.g. gpt-4.1-mini, gpt-5.5).",
            "default": "gpt-4.1-mini"
          },
          "perplexityModel": {
            "title": "Perplexity preset or model",
            "type": "string",
            "description": "Agent API preset (fast, low, medium, high, xhigh) or a model id such as perplexity/sonar. \"fast\" is the successor of Sonar.",
            "default": "fast"
          },
          "geminiModel": {
            "title": "Gemini model",
            "type": "string",
            "description": "Any Gemini model that supports Google Search grounding (e.g. gemini-3.5-flash-lite, gemini-3.8-flash).",
            "default": "gemini-3.5-flash-lite"
          },
          "country": {
            "title": "Country (OpenAI)",
            "type": "string",
            "description": "Optional 2-letter country code passed to OpenAI web search as the approximate user location (e.g. FR). For other engines, write the location in the prompt.",
            "default": ""
          },
          "forceWebSearch": {
            "title": "Force web search (OpenAI)",
            "type": "boolean",
            "description": "On: OpenAI must search the web before answering (closest to ChatGPT search results). Off: the model decides, like ChatGPT does by default.",
            "default": true
          },
          "resolveGeminiUrls": {
            "title": "Resolve Gemini source URLs",
            "type": "boolean",
            "description": "Gemini returns redirect links; resolve them to the real page URL (one lightweight request per source, no page download).",
            "default": true
          },
          "includeAnswerText": {
            "title": "Include the full answer text",
            "type": "boolean",
            "description": "Store the AI answer in each row (useful to review the context of mentions).",
            "default": true
          },
          "runsPerPrompt": {
            "title": "Runs per prompt",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "AI answers vary. Ask each prompt N times per engine (1-5) to measure how often you appear. Each run is a billable check.",
            "default": 1
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Checks in flight at once (1-8). Lower it if your API tier has small rate limits.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}