{
  "openapi": "3.0.1",
  "info": {
    "title": "GEO/AEO Brand Visibility Analyzer",
    "description": "Measure brand mentions, citations, explicit recommendation order, and run-to-run variance across AI-search observations you supply. Deterministic analysis without extra inference cost.",
    "version": "0.1",
    "x-build-id": "zqB7NRRiQ90JNAMjd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mehdi_badawi~geo-aeo-visibility/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mehdi_badawi-geo-aeo-visibility",
        "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/mehdi_badawi~geo-aeo-visibility/runs": {
      "post": {
        "operationId": "runs-sync-mehdi_badawi-geo-aeo-visibility",
        "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/mehdi_badawi~geo-aeo-visibility/run-sync": {
      "post": {
        "operationId": "run-sync-mehdi_badawi-geo-aeo-visibility",
        "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": {
          "contractVersion": {
            "title": "Contract version",
            "maxLength": 16,
            "type": "string",
            "description": "Must equal 1.0.0 when provided. The Actor stamps the current contract version when omitted.",
            "default": "1.0.0"
          },
          "evaluationTime": {
            "title": "Evaluation time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$",
            "type": "string",
            "description": "ISO-8601 instant treated as evaluation timestamp (e.g. 2026-09-21T10:00:00Z)."
          },
          "targetBrand": {
            "title": "Target brand",
            "required": [
              "name"
            ],
            "type": "object",
            "description": "Target brand name, recognized domains, and name aliases.",
            "properties": {
              "name": {
                "type": "string",
                "title": "Brand name",
                "description": "Canonical name of the target brand (e.g. 'AcmeCloud')."
              },
              "domains": {
                "type": "array",
                "title": "Domains",
                "description": "Domain names owned by the brand used to detect citation URLs (e.g. ['acmecloud.com', 'acme.io']).",
                "items": {
                  "type": "string"
                }
              },
              "aliases": {
                "type": "array",
                "title": "Aliases",
                "description": "Alternative names or abbreviations that count as brand mentions (e.g. ['Acme Cloud', 'Acme']).",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "competitors": {
            "title": "Competitor brands",
            "type": "array",
            "description": "Optional list of competitor brands to track win-share when the target brand is absent or uncited.",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "title": "Name",
                  "description": "Name value."
                },
                "domains": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "title": "Domains",
                  "description": "Domains value."
                },
                "aliases": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "title": "Aliases",
                  "description": "Aliases value."
                }
              }
            }
          },
          "queries": {
            "title": "Monitored queries",
            "type": "array",
            "description": "Declared set of target queries to track.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "query"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "title": "Id",
                  "description": "Id value."
                },
                "query": {
                  "type": "string",
                  "title": "Query",
                  "description": "Query value."
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "title": "Tags",
                  "description": "Tags value."
                }
              }
            }
          },
          "observations": {
            "title": "Query observations",
            "type": "array",
            "description": "Supplied query-result observations from AI search engines (ChatGPT, Perplexity, Gemini, Copilot, etc.).",
            "items": {
              "type": "object",
              "required": [
                "id",
                "engine",
                "query",
                "capturedAt"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "title": "Id",
                  "description": "Id value."
                },
                "engine": {
                  "type": "string",
                  "title": "Engine",
                  "description": "Engine value."
                },
                "queryId": {
                  "type": "string",
                  "title": "Query Id",
                  "description": "Query Id value."
                },
                "query": {
                  "type": "string",
                  "title": "Query",
                  "description": "Query value."
                },
                "capturedAt": {
                  "type": "string",
                  "title": "Captured At",
                  "description": "Captured At value."
                },
                "source": {
                  "type": "object",
                  "title": "Source",
                  "description": "Source value."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "success",
                    "error",
                    "timeout",
                    "blocked",
                    "rate_limited",
                    "empty"
                  ],
                  "title": "Status",
                  "description": "Status value."
                },
                "error": {
                  "type": "object",
                  "nullable": true,
                  "title": "Error",
                  "description": "Error value."
                },
                "answer": {
                  "type": "string",
                  "title": "Answer",
                  "description": "Answer value."
                },
                "citations": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  },
                  "title": "Citations",
                  "description": "Citations value."
                },
                "recommendedBrands": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  },
                  "title": "Recommended Brands",
                  "description": "Recommended Brands value."
                }
              }
            }
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Key-value store name for persisting longitudinal variance history. Null disables cross-run persistence.",
            "default": "geo-aeo-visibility-state"
          },
          "priorState": {
            "title": "Explicit prior state",
            "type": "object",
            "description": "Optional prior run state for replaying or testing cross-run variance calculations without store access."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}