{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Search Citation & Brand Mention Tracker",
    "description": "Collect reproducible AI-search answers and citations for a fixed prompt set. Bring your own OpenAI, Perplexity, Gemini, or Anthropic key. Reports mention and citation evidence, share of voice, and change versus the previous run.",
    "version": "0.1",
    "x-build-id": "Qmafqf9vOsgBGwUo3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/plusonets~ai-search-citation-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-plusonets-ai-search-citation-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/plusonets~ai-search-citation-tracker/runs": {
      "post": {
        "operationId": "runs-sync-plusonets-ai-search-citation-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/plusonets~ai-search-citation-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-plusonets-ai-search-citation-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": {
          "brand": {
            "title": "Brand",
            "type": "string",
            "description": "Brand name to look for in the answer text.",
            "default": "Northstar Packs"
          },
          "brandAliases": {
            "title": "Brand aliases",
            "type": "array",
            "description": "Extra names. Matching is case-insensitive and does not fire inside a longer word.",
            "default": [
              "Northstar"
            ],
            "items": {
              "type": "string"
            }
          },
          "brandDomains": {
            "title": "Brand domains",
            "type": "array",
            "description": "Registrable domains. A citation of the brand site counts even when the name is not a separate word in the URL.",
            "default": [
              "northstarpacks.example"
            ],
            "items": {
              "type": "string"
            }
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "Objects with name, aliases, and domains. Used for share of voice. An empty list tracks only the brand.",
            "default": [
              {
                "name": "Trailbird",
                "aliases": [
                  "Trailbird Gear"
                ],
                "domains": [
                  "trailbird.example"
                ]
              },
              {
                "name": "Kestrel Outdoor",
                "aliases": [
                  "Kestrel"
                ],
                "domains": [
                  "kestreloutdoor.example"
                ]
              }
            ]
          },
          "prompts": {
            "title": "Prompts",
            "type": "array",
            "description": "Fixed prompts. The set is hashed. Change the wording and this run is not compared as the same sample.",
            "default": [
              "Which weekend hiking backpack brands are most often recommended?",
              "What rain jacket brands hold up on multi-day trails?"
            ],
            "items": {
              "type": "string"
            }
          },
          "promptsCsv": {
            "title": "Prompts CSV",
            "type": "string",
            "description": "Optional CSV text used only when the prompts list is empty. The first column is the prompt. A header named prompt is skipped."
          },
          "promptFileUrl": {
            "title": "Prompt file URL",
            "type": "string",
            "description": "Optional https URL used only when the prompts list and CSV are empty. JSON list or CSV. Private hosts are rejected."
          },
          "promptSetId": {
            "title": "Prompt set name",
            "type": "string",
            "description": "A stable name for this prompt set. The hash, not this label, decides whether two runs are the same version.",
            "default": "northstar-weekend-gear"
          },
          "markets": {
            "title": "Markets",
            "type": "array",
            "description": "Requested markets. Fields: code, country (ISO-2), region, city, timezone, language, latitude, longitude. Gemini sends a location only when both coordinates are set. The answer does not report the location actually used.",
            "default": [
              {
                "code": "US",
                "country": "US",
                "region": "California",
                "city": "San Francisco",
                "timezone": "America/Los_Angeles",
                "language": "en"
              }
            ]
          },
          "repetitions": {
            "title": "Repetitions per prompt",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many times to collect each prompt on each engine and market. Repeats are kept. Answers vary.",
            "default": 1
          },
          "engines": {
            "title": "Engines",
            "type": "array",
            "description": "Engines to collect. In auto demo mode an engine runs live only when its key is present. With no keys, every selected engine replays the bundled sample.",
            "items": {
              "type": "string",
              "enum": [
                "openai",
                "perplexity",
                "gemini",
                "anthropic"
              ],
              "enumTitles": [
                "OpenAI",
                "Perplexity",
                "Google Gemini",
                "Anthropic"
              ]
            },
            "default": [
              "openai",
              "perplexity",
              "gemini",
              "anthropic"
            ]
          },
          "demoMode": {
            "title": "Demo mode",
            "enum": [
              "auto",
              "on",
              "off"
            ],
            "type": "string",
            "description": "auto uses the bundled sample when no selected engine has a key. on always replays the sample. off requires a key.",
            "default": "auto"
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "Optional. Responses API with the web search tool. Unofficial, not affiliated with OpenAI. You pay OpenAI separately."
          },
          "openaiModel": {
            "title": "OpenAI model",
            "type": "string",
            "description": "Model sent to the Responses API. The model id returned by the API is stored on the observation.",
            "default": "gpt-4.1"
          },
          "openaiWebSearchTool": {
            "title": "OpenAI web search tool",
            "type": "string",
            "description": "Tool type sent to the Responses API. Stored on each OpenAI observation.",
            "default": "web_search"
          },
          "perplexityApiKey": {
            "title": "Perplexity API key",
            "type": "string",
            "description": "Optional. Sonar API. Unofficial, not affiliated with Perplexity. You pay Perplexity separately."
          },
          "perplexityModel": {
            "title": "Perplexity model",
            "type": "string",
            "description": "Sonar model id, for example sonar or sonar-pro.",
            "default": "sonar"
          },
          "geminiApiKey": {
            "title": "Gemini API key",
            "type": "string",
            "description": "Optional. generateContent with Google Search grounding. Unofficial, not affiliated with Google. You pay Google separately."
          },
          "geminiModel": {
            "title": "Gemini model",
            "type": "string",
            "description": "Model id that supports Google Search grounding, for example gemini-2.5-flash.",
            "default": "gemini-2.5-flash"
          },
          "anthropicApiKey": {
            "title": "Anthropic API key",
            "type": "string",
            "description": "Optional. Messages API with the web search tool. Unofficial, not affiliated with Anthropic. You pay Anthropic separately."
          },
          "anthropicModel": {
            "title": "Anthropic model",
            "type": "string",
            "description": "Model id sent to the Messages API, for example claude-sonnet-4-5.",
            "default": "claude-sonnet-4-5"
          },
          "anthropicWebSearchTool": {
            "title": "Anthropic web search tool",
            "type": "string",
            "description": "Server tool version sent to the Messages API, for example web_search_20250305. Direct calling is requested so the run does not depend on code execution.",
            "default": "web_search_20250305"
          },
          "monitorId": {
            "title": "Monitor id",
            "type": "string",
            "description": "Stable id for scheduled runs. Leave empty to derive one from the brand, prompt version, engines, and markets. Demo history is stored separately from live history."
          },
          "alertOnlyOnChange": {
            "title": "Dataset only when a slot changes",
            "type": "boolean",
            "description": "When on, the dataset receives changed slots only. The run summary still covers every slot. Completed live observations are still charged.",
            "default": false
          },
          "resolveCitations": {
            "title": "Resolve public citation redirects",
            "type": "boolean",
            "description": "Follow public https redirects for grounding wrapper URLs. Private and local addresses are rejected. Ignored in demo mode.",
            "default": false
          },
          "maxObservations": {
            "title": "Maximum observations",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on prompt × market × engine × repetition. A run clipped by this cap does not replace the saved baseline.",
            "default": 200
          },
          "maxOutputTokens": {
            "title": "Max output tokens",
            "minimum": 128,
            "maximum": 4000,
            "type": "integer",
            "description": "Token cap sent to each provider so one answer cannot run away. This is your provider bill, not the Actor charge.",
            "default": 1200
          },
          "requestDelaySecs": {
            "title": "Delay between live calls (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Pause between live provider calls. Demo mode does not wait."
          },
          "webhookUrl": {
            "title": "Summary webhook URL",
            "type": "string",
            "description": "Optional https URL that receives the run summary JSON. Private hosts are rejected. A webhook failure does not fail the run."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}