{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Search Visibility Tracker: ChatGPT & Perplexity",
    "description": "Track how ChatGPT and Perplexity answer your prompts through their official APIs, no scraping. Get every answer, cited URL and domain, brand mention, rank, share of voice vs competitors, sentiment, mention rate over samples and changes since your last run.",
    "version": "1.0",
    "x-build-id": "RL4EB7x3WnRMng1jl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zhtech~ai-search-visibility-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zhtech-ai-search-visibility-tracker",
        "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/zhtech~ai-search-visibility-tracker/runs": {
      "post": {
        "operationId": "runs-sync-zhtech-ai-search-visibility-tracker",
        "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/zhtech~ai-search-visibility-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-zhtech-ai-search-visibility-tracker",
        "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",
        "properties": {
          "prompts": {
            "title": "Prompts",
            "type": "array",
            "description": "Questions people ask an AI assistant, one per line. Write them the way a buyer would: \"best project management software\", \"Asana vs Trello for a small agency\", \"which CRM should a 10 person startup use\". Duplicates are merged. Max 200 prompts, 1,000 characters each.",
            "items": {
              "type": "string"
            }
          },
          "brand": {
            "title": "Your brand",
            "type": "string",
            "description": "The brand to look for in every answer, for example Asana. Matching ignores case and whole words only (Asana does not match Asanas). Add other spellings below."
          },
          "brandAliases": {
            "title": "Other names for your brand (optional)",
            "type": "array",
            "description": "Other spellings or product names that count as your brand, for example \"Asana Work Management\" or a former name.",
            "items": {
              "type": "string"
            }
          },
          "brandDomains": {
            "title": "Your domains (optional)",
            "type": "array",
            "description": "Your websites, for example asana.com. Used to tell when an answer cites YOUR site as a source (subdomains count). A brand name that is itself a domain, like Monday.com, is added automatically.",
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "Competitor names, one per line. Add other spellings after a pipe: \"Monday.com | monday\". Each answer reports which competitors were named, in what order, their share of voice and sentiment.",
            "items": {
              "type": "string"
            }
          },
          "competitorDomains": {
            "title": "Competitor domains (optional)",
            "type": "array",
            "description": "One line per competitor as \"Name: domain\", for example \"Trello: trello.com\". Citations to these domains are labeled with the competitor.",
            "items": {
              "type": "string"
            }
          },
          "engines": {
            "title": "AI engines",
            "type": "array",
            "description": "chatgpt = OpenAI Responses API with web search. perplexity = Perplexity Sonar through the official Perplexity API. Both are asked through official APIs only, never by scraping the consumer apps.",
            "items": {
              "type": "string",
              "enum": [
                "chatgpt",
                "perplexity"
              ],
              "enumTitles": [
                "ChatGPT (OpenAI API, web search on)",
                "Perplexity (Sonar, official API)"
              ]
            },
            "default": [
              "chatgpt",
              "perplexity"
            ]
          },
          "samplesPerPrompt": {
            "title": "Samples per prompt",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times each prompt is asked on each engine. AI answers vary from one ask to the next, so the summary reports a mention rate across samples (for example 2 of 3). 3 is a good balance of signal and cost. Each sample is one billed answer.",
            "default": 3
          },
          "maxAnswers": {
            "title": "Max answers per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap on billed answers in one run (prompts x engines x samples). The run also stops at the max total charge you set.",
            "default": 300
          },
          "country": {
            "title": "Country (optional)",
            "type": "string",
            "description": "Two letter country code (US, GB, DE...) passed to OpenAI web search as the approximate user location, so local results match that market. Leave empty for no location."
          },
          "monitorMode": {
            "title": "Monitor mode: report changes since the last run",
            "type": "boolean",
            "description": "Saves a snapshot after each run in a named key-value store (ai-search-visibility-monitor) on your account and adds change rows: brand mention gained or lost, mention rate or rank moved, your domain cited or dropped, competitors and cited domains that appeared or disappeared. Schedule the Actor daily or weekly with the same input.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key (optional)",
            "type": "string",
            "description": "Name of the saved snapshot. Runs with the same key are compared. Defaults to monitor-<brand>. Use different keys for different projects or markets."
          },
          "openaiApiKey": {
            "title": "OpenAI API key (bring your own key)",
            "type": "string",
            "description": "Optional. With your own key the OpenAI cost goes on your OpenAI bill and each answer is billed here at the much lower bring-your-own-key price. Stored encrypted by Apify, used only for this run, never logged or saved to the output. Create one at platform.openai.com."
          },
          "perplexityApiKey": {
            "title": "Perplexity API key (bring your own key)",
            "type": "string",
            "description": "Optional. Same as above for Perplexity. Create one in the Perplexity API settings. Never logged or saved to the output."
          },
          "openaiModel": {
            "title": "OpenAI model",
            "type": "string",
            "description": "Any OpenAI model that supports the web_search tool in the Responses API. The default is a small, low cost model. Bigger models give answers closer to the ChatGPT app but cost more on your own key (the price per answer here does not change).",
            "default": "gpt-6-luna"
          },
          "reasoningEffort": {
            "title": "OpenAI reasoning effort",
            "enum": [
              "none",
              "minimal",
              "low",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "For reasoning models only. low is fast and cheap and still searches the web.",
            "default": "low"
          },
          "searchContextSize": {
            "title": "OpenAI search context size",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "How much web search content the model reads. low is cheapest; high reads more sources.",
            "default": "low"
          },
          "perplexityMode": {
            "title": "Perplexity API mode",
            "enum": [
              "agent",
              "sonar"
            ],
            "type": "string",
            "description": "agent = Perplexity Agent API (current, recommended). sonar = legacy Sonar endpoint, only if your account still uses it.",
            "default": "agent"
          },
          "perplexityModel": {
            "title": "Perplexity model (optional)",
            "type": "string",
            "description": "Leave empty for perplexity/sonar (agent mode) or sonar (legacy mode)."
          },
          "includeAnswerText": {
            "title": "Include full answer text",
            "type": "boolean",
            "description": "Turn off to keep only the analysis and citations (smaller exports).",
            "default": true
          },
          "maxConcurrency": {
            "title": "Answers in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many API calls run at the same time. Lower it if your own key has low rate limits.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}