{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Visibility Rank Tracker — ChatGPT, Perplexity, Gemini",
    "description": "Track brand ranking and share-of-voice across ChatGPT, Perplexity, Claude, and Gemini over time. Monitors prompt sets, detects citations, scores sentiment, compares competitors, and reports run-over-run position changes. Schedule it for daily AI-search visibility tracking.",
    "version": "1.0",
    "x-build-id": "0GR7NVCyynIaHRdRo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/muhammadafzal~ai-visibility-rank-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-muhammadafzal-ai-visibility-rank-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/muhammadafzal~ai-visibility-rank-tracker/runs": {
      "post": {
        "operationId": "runs-sync-muhammadafzal-ai-visibility-rank-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/muhammadafzal~ai-visibility-rank-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-muhammadafzal-ai-visibility-rank-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",
        "required": [
          "brandName"
        ],
        "properties": {
          "brandName": {
            "title": "Brand Name",
            "type": "string",
            "description": "The brand, company, or product to track in AI answers (e.g., 'Notion', 'Tesla'). This is the primary entity scored for visibility, position, and share-of-voice.",
            "default": "Notion"
          },
          "brandDomain": {
            "title": "Brand Domain",
            "type": "string",
            "description": "Your brand's website domain (e.g., 'notion.so'). Used to detect when an AI engine cites your site as a source. Leave empty to skip citation-by-domain matching.",
            "default": "notion.so"
          },
          "industry": {
            "title": "Industry / Category",
            "type": "string",
            "description": "Your category (e.g., 'productivity software', 'electric vehicles'). Used ONLY to auto-generate a sensible prompt set when you do not supply your own prompts below. Ignored if 'prompts' is provided.",
            "default": "productivity software"
          },
          "prompts": {
            "title": "Tracked Prompts",
            "type": "array",
            "description": "The exact questions your buyers ask AI engines (e.g., 'What is the best note-taking app?'). Provide your own list for precise tracking. If left empty, prompts are auto-generated from 'industry'. Each prompt is checked on every selected platform.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "platforms": {
            "title": "AI Platforms to Track",
            "type": "array",
            "description": "Which AI answer engines to query. All engines run through OpenRouter using a single OPENROUTER_API_KEY (set as an environment variable). Defaults: perplexity→perplexity/sonar, chatgpt→openai/gpt-4o-mini, claude→anthropic/claude-sonnet-4, gemini→google/gemini-2.5-flash. Override slugs via the 'models' field.",
            "items": {
              "type": "string"
            },
            "default": [
              "perplexity",
              "chatgpt",
              "claude",
              "gemini"
            ]
          },
          "competitors": {
            "title": "Competitor Brands",
            "type": "array",
            "description": "Competitor brand names to compare against (e.g., 'Evernote', 'Obsidian'). Used to compute your position (rank order) and share-of-voice within each AI answer.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "extractCitations": {
            "title": "Add-on: Extract Citations",
            "type": "boolean",
            "description": "Enable to extract the source URLs each AI answer references and flag whether your domain is cited. Adds a per-check charge.",
            "default": true
          },
          "analyzeSentiment": {
            "title": "Add-on: Analyze Sentiment",
            "type": "boolean",
            "description": "Enable to classify the sentiment (positive / neutral / negative) of how your brand is mentioned. Adds a per-mention charge.",
            "default": true
          },
          "trackingId": {
            "title": "Tracking ID",
            "type": "string",
            "description": "Optional stable identifier used to store and compare history across scheduled runs. Defaults to a slug of the brand name. Use distinct IDs to track multiple brands separately.",
            "default": ""
          },
          "useWebSearch": {
            "title": "Use Web Search",
            "type": "boolean",
            "description": "Enable live web search for models that support it via OpenRouter's web plugin (Perplexity Sonar already searches natively). Keep on for accurate AI-search visibility; turn off to test the models' built-in knowledge only.",
            "default": true
          },
          "webSearchResults": {
            "title": "Web Search Results",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many web results the OpenRouter web plugin should fetch per query (more = richer answers but higher cost). Applies to non-native-search models.",
            "default": 3
          },
          "models": {
            "title": "Model Overrides",
            "type": "object",
            "description": "Optional. Map each platform to a specific OpenRouter model slug, e.g. {\"chatgpt\": \"openai/gpt-4o\", \"claude\": \"anthropic/claude-sonnet-4\"}. Any platform not listed uses its default model.",
            "default": {}
          },
          "maxPrompts": {
            "title": "Max Prompts",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Safety cap on how many prompts are checked per run (controls cost). Extra prompts beyond this limit are ignored.",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}