{
  "openapi": "3.0.1",
  "info": {
    "title": "The Persian Eye",
    "description": "The Persian Eye is a real-time intelligence monitoring tool developed by Pristine Traders. It tracks geopolitical risk by combining Signal Intelligence (SIGINT) from aircraft telemetry with Open-Source Intelligence (OSINT) from regional communication channels",
    "version": "0.0",
    "x-build-id": "AZUvLFySW75Bc6WRN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/signalfoundry~the-persian-eye/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-signalfoundry-the-persian-eye",
        "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/signalfoundry~the-persian-eye/runs": {
      "post": {
        "operationId": "runs-sync-signalfoundry-the-persian-eye",
        "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/signalfoundry~the-persian-eye/run-sync": {
      "post": {
        "operationId": "run-sync-signalfoundry-the-persian-eye",
        "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": [
          "boundingBoxes",
          "telegramChannels",
          "watchList"
        ],
        "properties": {
          "boundingBoxes": {
            "title": "📍 SIGINT Bounding Boxes",
            "type": "array",
            "description": "Geographic areas to monitor for GPS jamming and aircraft anomalies. Format: lat_min,lon_min,lat_max,lon_max",
            "default": [
              "24.0,44.0,40.0,64.0"
            ],
            "items": {
              "type": "string"
            }
          },
          "telegramChannels": {
            "title": "📡 Telegram Channels",
            "type": "array",
            "description": "Channels to monitor for OSINT. Supports @channel, channel, or https://t.me/channel formats",
            "default": [
              "isnafarsi",
              "sepah_pasdaran",
              "mizannews"
            ],
            "items": {
              "type": "string"
            }
          },
          "watchList": {
            "title": "👁️ Watchlist Keywords",
            "type": "array",
            "description": "Keywords to monitor (supports semantic matching in v2)",
            "default": [
              "explosion",
              "drone",
              "blackout",
              "missile",
              "انفجار",
              "پهپاد",
              "موشک"
            ],
            "items": {
              "type": "string"
            }
          },
          "slackWebhook": {
            "title": "💬 Slack Webhook URL",
            "type": "string",
            "description": "Slack incoming webhook for alerts"
          },
          "telegramBotToken": {
            "title": "🤖 Telegram Bot Token",
            "type": "string",
            "description": "Bot token for Telegram alerts (optional)"
          },
          "telegramAlertChannel": {
            "title": "📢 Telegram Alert Channel",
            "type": "string",
            "description": "Channel ID or username for Telegram alerts (e.g., @kinetic_alerts)"
          },
          "discordWebhook": {
            "title": "🎮 Discord Webhook URL",
            "type": "string",
            "description": "Discord webhook for alerts (optional)"
          },
          "maxPostsPerChannel": {
            "title": "📊 Max Posts Per Channel",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum posts to scan per channel per run",
            "default": 20
          },
          "minIntervalSecs": {
            "title": "⏱️ Minimum Run Interval",
            "minimum": 60,
            "maximum": 86400,
            "type": "integer",
            "description": "Minimum seconds between runs (backoff protection)",
            "default": 300
          },
          "llmModel": {
            "title": "🧠 LLM Model",
            "enum": [
              "gpt-4o-mini",
              "gpt-4o",
              "claude-3-haiku",
              "claude-3-sonnet"
            ],
            "type": "string",
            "description": "AI model for threat analysis",
            "default": "gpt-4o-mini"
          },
          "semanticMatching": {
            "title": "🔍 Semantic Watchlist Matching",
            "type": "boolean",
            "description": "Use AI embeddings for semantic similarity instead of exact keyword matching",
            "default": true
          },
          "similarityThreshold": {
            "title": "📏 Semantic Similarity Threshold",
            "minimum": 0.5,
            "maximum": 1,
            "type": "number",
            "description": "Minimum similarity score (0-1) for semantic matches",
            "default": 0.82
          },
          "multiSourceFusion": {
            "title": "🔗 Multi-Source SIGINT Fusion",
            "type": "boolean",
            "description": "Cross-reference multiple ADS-B sources before alerting",
            "default": true
          },
          "fusionThreshold": {
            "title": "🎯 Fusion Corroboration Threshold",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Minimum number of sources to corroborate an anomaly",
            "default": 2
          },
          "enableVisionAnalysis": {
            "title": "👁️ Enable AI Vision Analysis",
            "type": "boolean",
            "description": "Analyze images with multimodal AI",
            "default": true
          },
          "escalationDetection": {
            "title": "📈 Escalation Pattern Detection",
            "type": "boolean",
            "description": "Detect temporal escalation patterns in hits",
            "default": true
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "Apify proxy settings for scraping"
          },
          "debugMode": {
            "title": "🐛 Debug Mode",
            "type": "boolean",
            "description": "Enable verbose logging and skip external API calls",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}