{
  "openapi": "3.0.1",
  "info": {
    "title": "Local AI Answer Visibility Checker: ChatGPT, Perplexity, Gemini",
    "description": "Does ChatGPT, Perplexity or Gemini recommend your local business, or your competitors? Bring your own API keys. Get share of voice, positions, cited sources, a citation-gap list and a client-ready report.",
    "version": "0.1",
    "x-build-id": "2wQA7X4e4k8WwnRoh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shanmukhkiransagar~ai-answer-visibility-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shanmukhkiransagar-ai-answer-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/shanmukhkiransagar~ai-answer-visibility-checker/runs": {
      "post": {
        "operationId": "runs-sync-shanmukhkiransagar-ai-answer-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/shanmukhkiransagar~ai-answer-visibility-checker/run-sync": {
      "post": {
        "operationId": "run-sync-shanmukhkiransagar-ai-answer-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": "Business or brand name",
            "type": "string",
            "description": "The business you want to check, as people would write it (e.g. \"Northgate Plumbing\")."
          },
          "brandDomain": {
            "title": "Business website domain",
            "type": "string",
            "description": "Used to detect when the AI engines cite your own site (e.g. northgateplumbing.co.uk)."
          },
          "brandAliases": {
            "title": "Other names for the business",
            "type": "array",
            "description": "Short names or old names the AI might use instead (e.g. \"Northgate\").",
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "Up to 25 competitor names. Optionally add the domain after a pipe: \"Aire Valley Plumbers | airevalleyplumbers.co.uk\".",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Trade or category",
            "type": "string",
            "description": "What customers search for, e.g. \"emergency plumber\", \"dentist\", \"wedding photographer\". Used to auto-generate buyer-style questions when you give no prompts."
          },
          "location": {
            "title": "Town or city (local mode)",
            "type": "string",
            "description": "Set this for local businesses. Questions become local (\"Who is the best emergency plumber in Leeds?\") and the city is passed to OpenAI's web search as the user location."
          },
          "countryCode": {
            "title": "Country (ISO 2-letter)",
            "type": "string",
            "description": "Optional, e.g. GB, US, IE. Passed to OpenAI web search as the approximate user location."
          },
          "prompts": {
            "title": "Your own questions (optional)",
            "type": "array",
            "description": "Buyer-style questions to ask each engine. Leave empty to auto-generate from the category and town.",
            "items": {
              "type": "string"
            }
          },
          "maxPrompts": {
            "title": "Max questions",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Cap on questions per run. Each question is asked once per selected engine, so checks = questions × engines.",
            "default": 10
          },
          "providers": {
            "title": "AI engines",
            "type": "array",
            "description": "Which engines to ask. An engine is skipped if you don't supply its key.",
            "items": {
              "type": "string",
              "enum": [
                "openai",
                "perplexity",
                "gemini"
              ],
              "enumTitles": [
                "ChatGPT (OpenAI API + web search)",
                "Perplexity (Agent API)",
                "Gemini (Google Search grounding)"
              ]
            },
            "default": [
              "openai",
              "perplexity",
              "gemini"
            ]
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Your own key from platform.openai.com. Stored encrypted; you pay OpenAI directly."
          },
          "perplexityApiKey": {
            "title": "Perplexity API key",
            "type": "string",
            "description": "Your own key from the Perplexity API console. Stored encrypted; you pay Perplexity directly."
          },
          "geminiApiKey": {
            "title": "Gemini API key",
            "type": "string",
            "description": "Your own key from Google AI Studio. Stored encrypted; you pay Google directly."
          },
          "agencyName": {
            "title": "Agency name for the report (optional)",
            "type": "string",
            "description": "Adds \"Prepared by <name>\" to REPORT_MD so you can send it to a client."
          },
          "openaiModel": {
            "title": "OpenAI model",
            "type": "string",
            "description": "Any Responses API model that supports the web_search tool.",
            "default": "gpt-5.5"
          },
          "perplexityPreset": {
            "title": "Perplexity preset",
            "enum": [
              "fast",
              "low",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "Agent API preset. \"fast\" is the documented replacement for Sonar.",
            "default": "fast"
          },
          "geminiModel": {
            "title": "Gemini model",
            "type": "string",
            "description": "Any Gemini model that supports Grounding with Google Search. The default (Gemini 3.x) needs a key from a billing-enabled Google project, because search grounding is not on the free tier for 3.x.",
            "default": "gemini-3.8-flash"
          },
          "forceWebSearch": {
            "title": "Force OpenAI to search the web",
            "type": "boolean",
            "description": "Sets tool_choice to required so every ChatGPT answer is grounded in a live search (closer to what local searchers see).",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Lower this if your API keys hit rate limits.",
            "default": 3
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "How long to wait for each AI engine to answer one question before marking the check as failed (failed checks are not charged).",
            "default": 90
          },
          "demoMode": {
            "title": "Demo mode (no keys, free)",
            "type": "boolean",
            "description": "Ignores your inputs and runs a sample local business against canned API responses so you can see the output format. Never charged.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}