{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Search Visibility Tracker for ChatGPT and Perplexity",
    "description": "Track how often AI search answers from the OpenAI and Perplexity APIs mention your brand vs competitors: mention rate, position, share of voice and cited sources, with trend runs. Bring your own API key. Pay per answer; failures are free. Not affiliated with OpenAI or Perplexity.",
    "version": "0.1",
    "x-build-id": "jZGRpzU7kLQ3gkU9t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tan-solutions~ai-visibility/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tan-solutions-ai-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/tan-solutions~ai-visibility/runs": {
      "post": {
        "operationId": "runs-sync-tan-solutions-ai-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/tan-solutions~ai-visibility/run-sync": {
      "post": {
        "operationId": "run-sync-tan-solutions-ai-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",
        "properties": {
          "brand": {
            "title": "Brand",
            "type": "string",
            "description": "Your brand or product name, as people write it (for example Notion). Matching ignores case and accents and needs whole words."
          },
          "brandAliases": {
            "title": "Other names of the brand",
            "type": "array",
            "description": "Optional other spellings or product names that count as your brand (at most 10).",
            "items": {
              "type": "string"
            }
          },
          "domain": {
            "title": "Brand website",
            "type": "string",
            "description": "Optional. Your website (for example notion.com). Citations of this site or its subdomains count as 'brand site cited'."
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "Up to 10 competitor names. Add other names after a bar: 'Google Workspace | Google Docs'.",
            "items": {
              "type": "string"
            }
          },
          "prompts": {
            "title": "Prompts (questions)",
            "type": "array",
            "description": "The questions your buyers ask an AI assistant, at most 50, each at most 300 characters. Leave empty to use the built-in questions for your category.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Used when Prompts is empty: your product category (for example 'CRM tools'). Fills the built-in questions such as 'What are the best {category}?'."
          },
          "promptTemplates": {
            "title": "Prompt templates",
            "type": "array",
            "description": "Optional own templates used when Prompts is empty. Placeholders: {category}, {brand}, {country}.",
            "items": {
              "type": "string"
            }
          },
          "openaiApiKey": {
            "title": "OpenAI API key (your own)",
            "type": "string",
            "description": "Your own OpenAI API key (platform.openai.com). Needed to ask OpenAI. It is stored encrypted, used only inside your run and never logged or saved in the results. You pay OpenAI for your usage."
          },
          "perplexityApiKey": {
            "title": "Perplexity API key (your own)",
            "type": "string",
            "description": "Your own Perplexity API key. Needed to ask Perplexity. It is stored encrypted, used only inside your run and never logged or saved in the results. You pay Perplexity for your usage. Give at least one of the two keys."
          },
          "openaiModel": {
            "title": "OpenAI model",
            "type": "string",
            "description": "Optional. Empty = gpt-6-luna (the cheapest model with web search). gpt-6-astra is the stronger option."
          },
          "perplexityModel": {
            "title": "Perplexity model",
            "type": "string",
            "description": "Optional. Leave empty for Perplexity's fast preset (Perplexity picks the model; web search on). Or name a model such as openai/gpt-6-luna; web search stays on."
          },
          "repeats": {
            "title": "Repeats per prompt",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "AI answers change from one ask to the next. Each prompt is asked this many times per engine (1-10). Default 3."
          },
          "concurrencyPerEngine": {
            "title": "Parallel answers per engine",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many answers each engine works on at the same time (1-8). Default 3. Higher is faster; if an engine answers 'too many requests', the Actor waits as the engine asks and tries again (failed answers are free).",
            "default": 3
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "2-letter country code for the web search location, for example US, GB or DE. Default US."
          },
          "language": {
            "title": "Answer language",
            "type": "string",
            "description": "Optional. Ask for answers in this language, for example German."
          },
          "monitorId": {
            "title": "Monitor ID (trend runs)",
            "type": "string",
            "description": "Optional name for a tracked series, for example 'notion-weekly'. Runs with the same ID and brand report the change vs the previous run. Letters, digits, '_', '-' and '.' only."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}