{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Page & Price Change Monitor",
    "description": "Monitor public competitor pages for content and price changes. Evidence-linked receipts, durable baselines, optional alerts. Static HTML only; no AI-generated summary or browser rendering in this release.",
    "version": "5.1",
    "x-build-id": "KorKQ5FqW2aQM4Ho2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kayhermes~ai-competitor-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kayhermes-ai-competitor-monitor",
        "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/kayhermes~ai-competitor-monitor/runs": {
      "post": {
        "operationId": "runs-sync-kayhermes-ai-competitor-monitor",
        "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/kayhermes~ai-competitor-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-kayhermes-ai-competitor-monitor",
        "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": [
          "targets"
        ],
        "properties": {
          "targets": {
            "title": "Pages to monitor",
            "type": "array",
            "description": "Pages to watch. Each is fetched exactly once per run.",
            "items": {
              "type": "string"
            }
          },
          "includeUrlRegex": {
            "title": "Include only URLs matching",
            "type": "string",
            "description": "Optional regular expression. Non-matching targets are rejected with a reason, never silently dropped.",
            "default": ""
          },
          "excludeUrlRegex": {
            "title": "Exclude URLs matching",
            "type": "string",
            "description": "Optional regular expression applied after the include filter.",
            "default": ""
          },
          "contentSelector": {
            "title": "Content selector (id or class)",
            "type": "string",
            "description": "Restrict extraction to one element by id or class, e.g. #main or .price-block. Leave empty for the whole visible page.",
            "default": ""
          },
          "maxTargets": {
            "title": "Maximum targets",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Reject input above this many targets rather than silently truncating.",
            "default": 1000
          },
          "requestTimeoutSecs": {
            "title": "Per-request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time to wait for each requested page before recording a failed fetch.",
            "default": 30
          },
          "maxRedirects": {
            "title": "Maximum redirect hops",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Every hop is re-checked by the network guard.",
            "default": 5
          },
          "maxConcurrency": {
            "title": "Concurrent requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of page requests processed concurrently in one run.",
            "default": 5
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "A monitor should not behave like a scraper.",
            "default": true
          },
          "minimumAlertSeverity": {
            "title": "Minimum alert severity",
            "enum": [
              "info",
              "low",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "Changes below this severity are not dispatched.",
            "default": "low"
          },
          "alertDestinations": {
            "title": "Alert destinations",
            "type": "array",
            "description": "Where to send change alerts. Suppressed alerts make no outbound call.",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "webhook",
                    "slack",
                    "discord",
                    "telegram"
                  ],
                  "title": "Destination type",
                  "description": "Alert delivery channel for this destination.",
                  "editor": "select"
                },
                "url": {
                  "type": "string",
                  "title": "Webhook URL",
                  "description": "Full HTTPS delivery endpoint where applicable.",
                  "editor": "textfield"
                },
                "token": {
                  "type": "string",
                  "title": "Integration token",
                  "description": "Optional destination token. Treat this value as a secret.",
                  "editor": "textfield"
                },
                "chatId": {
                  "type": "string",
                  "title": "Telegram chat ID",
                  "description": "Chat ID used by Telegram alert delivery.",
                  "editor": "textfield"
                },
                "severityFloor": {
                  "type": "string",
                  "enum": [
                    "info",
                    "low",
                    "medium",
                    "high"
                  ],
                  "title": "Minimum severity for destination",
                  "description": "Do not send alerts below the selected severity to this destination.",
                  "editor": "select"
                }
              },
              "required": [
                "type"
              ]
            }
          },
          "enableAiSummary": {
            "title": "AI change summary (not available)",
            "type": "boolean",
            "description": "Not available in this release: no AI model provider is connected. Leave OFF. Turning it on will not generate AI summaries or charge ai-analysis events.",
            "default": false
          },
          "maxTotalChargeUsd": {
            "title": "Run spend ceiling (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Hard ceiling on this run's settled charges. Leave empty for no ceiling. Checked BEFORE each charge, so no money is spent past it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}