{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Search Visibility Tracker — AEO & Citation Audit",
    "description": "Check if your domain gets cited by Perplexity, ChatGPT, Claude & Gemini. Tracks citation rank, content gaps & competing domains per keyword. AEO audit.",
    "version": "1.0",
    "x-build-id": "qXsiUdxOacTQWrmOX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~ai-search-visibility-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-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/khadinakbar~ai-search-visibility-tracker/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-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/khadinakbar~ai-search-visibility-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-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": {
          "targetDomain": {
            "title": "Target domain to track",
            "type": "string",
            "description": "The website domain whose pages you want to track as cited sources in AI search results. Enter just the domain without https:// or www (e.g., 'ahrefs.com', 'hubspot.com'). The actor checks whether any URL from this domain appears in AI citations. NOT a brand name — use the ai-search-brand-monitor actor for brand name tracking."
          },
          "keywords": {
            "title": "Keywords / topics to query",
            "type": "array",
            "description": "List of keywords or topics to ask AI platforms about. The actor submits topic-based queries (e.g., 'best resources for SEO') and checks whether your domain is cited as a source. Enter each topic as a separate item (e.g., ['SEO', 'keyword research', 'backlink analysis']). NOT brand names — use topics and categories your content covers.",
            "items": {
              "type": "string"
            }
          },
          "targetUrls": {
            "title": "Target URLs to track (optional)",
            "type": "array",
            "description": "Specific page URLs from your domain to monitor for citations (e.g., 'https://ahrefs.com/blog/seo-guide/'). When provided, the actor also tracks whether these exact pages are cited, not just the domain. Leave empty to track any page from the domain. Each URL must start with https://.",
            "items": {
              "type": "string"
            }
          },
          "competitorDomains": {
            "title": "Competitor domains to compare",
            "type": "array",
            "description": "Competitor website domains to highlight in the competing_domains field (e.g., ['semrush.com', 'moz.com']). When set, the summary's top_competing_domains list is filtered to these. Leave empty to see all domains cited alongside yours. Helps you measure share-of-voice vs specific competitors.",
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "AI platforms to query",
            "type": "array",
            "description": "Which AI search platforms to query for citations. Valid values: 'perplexity' (Sonar with real-time citations), 'chatgpt' (gpt-4o-search-preview with web search), 'claude' (Claude Sonnet 4.5 with live web_search tool), 'gemini' (Gemini 2.5 Flash with native Google Search grounding). All four run real-time web search — no static knowledge cutoff. Defaults to all four.",
            "items": {
              "type": "string"
            },
            "default": [
              "perplexity",
              "chatgpt",
              "claude",
              "gemini"
            ]
          },
          "queryTemplates": {
            "title": "Query template categories",
            "type": "array",
            "description": "Built-in topic-query templates to run for each keyword. Options: 'topic_authority' (best resources/authoritative sites for X), 'how_to' (how to do X), 'what_is' (what is X / define X), 'comparison' (top tools and resources for X), 'expert_picks' (what experts recommend for X). Use customQueries instead when you have specific questions. Defaults to topic_authority, how_to, what_is.",
            "items": {
              "type": "string"
            },
            "default": [
              "topic_authority",
              "how_to",
              "what_is"
            ]
          },
          "customQueries": {
            "title": "Custom queries (optional)",
            "type": "array",
            "description": "Specific questions to submit to AI platforms for every keyword (e.g., 'Which tools do professional SEOs recommend for {keyword}?'). These run in addition to selected queryTemplates. Use plain English questions — the actor submits them verbatim. NOT query templates — these are literal prompts sent to AI.",
            "items": {
              "type": "string"
            }
          },
          "maxQueriesPerKeyword": {
            "title": "Max queries per keyword",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of unique queries to run per keyword across all templates. Higher values give more coverage but cost more credits — each query × platform = one check at $0.09. Default is 3 queries per keyword. Set to 5 for a deeper audit.",
            "default": 3
          },
          "responseFormat": {
            "title": "Response format",
            "enum": [
              "concise",
              "detailed"
            ],
            "type": "string",
            "description": "Controls how much of the AI's answer is stored in ai_answer_excerpt. 'concise' stores the first 300 characters (fewer tokens, lower storage). 'detailed' stores the first 600 characters (richer context for manual review). Does not affect which platforms are queried or what citations are tracked.",
            "default": "detailed"
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "An HTTPS URL that receives a POST request when the run completes. The payload is the full run summary JSON — visibility_score, citation_rate, content_gaps, top_cited_pages, recommendations. Compatible with Make.com, Zapier, n8n, Slack webhooks, and any HTTP endpoint."
          },
          "demoMode": {
            "title": "Demo / health check mode",
            "type": "boolean",
            "description": "Set to true to verify the actor is functional without making any AI API calls. The actor exits successfully with a confirmation message. Use for Apify scheduling tests, connectivity checks, or MCP tool validation without consuming credits.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}