{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Brand Visibility - ChatGPT, Perplexity, Copilot, Google AI",
    "description": "Analyst-grade AI brand visibility across ChatGPT, Perplexity, Copilot, Google AI Overview & AI Mode. $0.30/query - 15 real AI interactions, ground-truth validated. AI Visibility Score, Share of Voice, competitor matrix. Built with a SEO analyst. MCP server. AI SEO/GEO/AEO audit, no subscription.",
    "version": "0.0",
    "x-build-id": "ZRGlI28PXu1jM8XfL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/doesaiknow~ai-brand-visibility---chatgpt-perplexity-copilot-google-ai/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-doesaiknow-ai-brand-visibility---chatgpt-perplexity-copilot-google-ai",
        "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/doesaiknow~ai-brand-visibility---chatgpt-perplexity-copilot-google-ai/runs": {
      "post": {
        "operationId": "runs-sync-doesaiknow-ai-brand-visibility---chatgpt-perplexity-copilot-google-ai",
        "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/doesaiknow~ai-brand-visibility---chatgpt-perplexity-copilot-google-ai/run-sync": {
      "post": {
        "operationId": "run-sync-doesaiknow-ai-brand-visibility---chatgpt-perplexity-copilot-google-ai",
        "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"
        ],
        "properties": {
          "brand": {
            "title": "Brand",
            "maxLength": 100,
            "type": "string",
            "description": "The brand you want to analyze. Unicode letters supported (e.g. 'Żabka', 'Müller', 'L'Oréal')."
          },
          "queries": {
            "title": "Queries (what people ask AI engines)",
            "minItems": 0,
            "maxItems": 15,
            "type": "array",
            "description": "REQUIRED for paid scans (tier=quick_tester / pro_auditor / agency_scale): min 3, max 15 user-submitted queries (200 chars each), written in the language your customers use. Each query is fanned out into ~4 semantic variants by the backend, executed across all selected AI engines. Total cost = N_queries × $0.30. OPTIONAL for tier=demo (cached preview, no real scan, no charge — backend ignores queries on the demo path).",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Language / country",
            "enum": [
              "us",
              "gb",
              "ca",
              "au",
              "de",
              "fr",
              "es",
              "it",
              "pl",
              "nl",
              "se",
              "no",
              "dk",
              "fi",
              "br",
              "pt",
              "jp",
              "in",
              "mx",
              "ie",
              "at",
              "ch",
              "be",
              "cz",
              "ro",
              "ae",
              "ar",
              "bg",
              "cl",
              "co",
              "ee",
              "eg",
              "gr",
              "hr",
              "hu",
              "id",
              "il",
              "kr",
              "lt",
              "lv",
              "my",
              "ng",
              "nz",
              "pe",
              "ph",
              "pk",
              "sa",
              "sg",
              "sk",
              "th",
              "tr",
              "ua",
              "vn",
              "za"
            ],
            "type": "string",
            "description": "ISO-3166 country code (lowercase, 2 chars). Drives DataForSEO geo + locale routing. 'us'=English/United States (default), 'pl'=Polish/Poland, 'de'=German/Germany, 'fr'=French/France, 'es'=Spanish/Spain, 'it'=Italian/Italy, 'gb'=English/United Kingdom, 'br'=Portuguese/Brazil, 'jp'=Japanese/Japan, etc. (53 countries supported, see app/core/geo_mapper.py). Unknown codes silently fall back to US/English. NOTE FOR MAINTAINERS: this enum is hand-mirrored from app/core/geo_mapper.py::_GEO_MAP keys — when adding a new country there, also append it here (and to the doesaiknow-visibility-apify mirror). No automated drift check exists yet; consider a CI guard if this list grows beyond 60 entries.",
            "default": "us"
          },
          "competitors": {
            "title": "Competitors (optional)",
            "maxItems": 5,
            "type": "array",
            "description": "Up to 5 tracked competitors. Leave empty to let the system pick from AI engine responses.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category (optional)",
            "maxLength": 100,
            "type": "string",
            "description": "Optional product / market category (e.g. 'CRM software', 'opony do samochodu', 'projekty domów'). Backend treats it as 'general' if omitted — paid scans use your queries verbatim and don't strictly need it. Unicode letters supported."
          },
          "platforms": {
            "title": "AI engines",
            "type": "array",
            "description": "Which AI engines to query. Default 5 covers the highest-traffic engines; full set (7) adds Grok and Google AI Mode.",
            "items": {
              "type": "string",
              "enum": [
                "chatgpt",
                "perplexity",
                "gemini",
                "copilot",
                "grok",
                "ai_overview",
                "ai_mode"
              ]
            },
            "default": [
              "chatgpt",
              "perplexity",
              "gemini",
              "copilot",
              "ai_overview"
            ]
          },
          "tier": {
            "title": "Tier",
            "enum": [
              "demo",
              "quick_tester",
              "pro_auditor",
              "agency_scale"
            ],
            "type": "string",
            "description": "demo = cached sample ($0, no real scan). quick_tester = 3-5 queries (PPE $0.30/query). pro_auditor = 5-15 queries (PPE $0.30/query, fan-out enabled). agency_scale = bulk (PPE $0.30/query).",
            "default": "pro_auditor"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}