{
  "openapi": "3.0.1",
  "info": {
    "title": "Competitor Marketing Change Monitor",
    "description": "Founders often miss competitor moves like pricing, messaging, or CTA changes. This actor monitors competitor websites and highlights what changed, where it changed, and why it matters—helping growth teams react faster and stay ahead.",
    "version": "0.0",
    "x-build-id": "9hVywfeRjarPiJO70"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/happitap~competitor-marketing-change-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-happitap-competitor-marketing-change-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/happitap~competitor-marketing-change-monitor/runs": {
      "post": {
        "operationId": "runs-sync-happitap-competitor-marketing-change-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/happitap~competitor-marketing-change-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-happitap-competitor-marketing-change-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs to Monitor",
            "type": "array",
            "description": "List of competitor pages to track for changes",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "URL to monitor",
                  "editor": "textfield"
                },
                "label": {
                  "type": "string",
                  "title": "Label",
                  "description": "Human-readable label for this page",
                  "editor": "textfield"
                },
                "tags": {
                  "type": "array",
                  "title": "Tags",
                  "description": "Tags for categorization",
                  "editor": "json"
                },
                "selectors": {
                  "type": "object",
                  "title": "Selectors",
                  "description": "CSS selectors for content extraction",
                  "editor": "json",
                  "properties": {
                    "content": {
                      "type": "string",
                      "title": "Content Selector",
                      "description": "Main content selector (e.g., 'main', '.pricing-table')",
                      "editor": "textfield"
                    },
                    "ignore": {
                      "type": "array",
                      "title": "Ignore Selectors",
                      "description": "Selectors to remove before comparison",
                      "editor": "json"
                    }
                  }
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "render": {
            "title": "Rendering Engine",
            "enum": [
              "playwright",
              "puppeteer",
              "raw"
            ],
            "type": "string",
            "description": "How to load pages",
            "default": "playwright"
          },
          "waitUntil": {
            "title": "Wait Until",
            "enum": [
              "load",
              "domcontentloaded",
              "networkidle"
            ],
            "type": "string",
            "description": "When to consider page loaded",
            "default": "domcontentloaded"
          },
          "waitMs": {
            "title": "Additional Wait (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Extra milliseconds to wait after page load",
            "default": 1500
          },
          "viewport": {
            "title": "Viewport Size",
            "type": "object",
            "description": "Browser viewport dimensions",
            "properties": {
              "width": {
                "type": "integer",
                "title": "Width",
                "description": "Viewport width in pixels"
              },
              "height": {
                "type": "integer",
                "title": "Height",
                "description": "Viewport height in pixels"
              }
            },
            "default": {
              "width": 1366,
              "height": 768
            }
          },
          "screenshot": {
            "title": "Capture Screenshots",
            "type": "boolean",
            "description": "Take screenshots for visual proof of changes",
            "default": true
          },
          "extract": {
            "title": "Extraction Settings",
            "type": "object",
            "description": "How to extract content from pages",
            "properties": {
              "mode": {
                "type": "string",
                "title": "Mode",
                "description": "Extraction method",
                "enum": [
                  "readability",
                  "selector",
                  "html2text"
                ],
                "default": "readability"
              },
              "includeHtml": {
                "type": "boolean",
                "title": "Include HTML",
                "description": "Save HTML snapshot",
                "default": false
              },
              "includeText": {
                "type": "boolean",
                "title": "Include Text",
                "description": "Save text snapshot",
                "default": true
              }
            },
            "default": {
              "mode": "readability",
              "includeHtml": false,
              "includeText": true
            }
          },
          "diff": {
            "title": "Diff Settings",
            "type": "object",
            "description": "Change detection configuration",
            "properties": {
              "compareWith": {
                "type": "string",
                "title": "Compare With",
                "description": "What to compare against",
                "enum": [
                  "previousRun",
                  "snapshotId"
                ],
                "default": "previousRun"
              },
              "method": {
                "type": "string",
                "title": "Method",
                "description": "Comparison method",
                "enum": [
                  "text",
                  "html"
                ],
                "default": "text"
              },
              "minChangePercent": {
                "type": "number",
                "title": "Min Change Percent",
                "description": "Minimum change % to report (reduces noise)",
                "default": 1.5,
                "minimum": 0,
                "maximum": 100
              },
              "ignorePatterns": {
                "type": "array",
                "title": "Ignore Patterns",
                "description": "Regex patterns to ignore (e.g., dates, timestamps)",
                "items": {
                  "type": "string"
                },
                "default": []
              },
              "baselineSnapshotId": {
                "type": "string",
                "title": "Baseline Snapshot ID",
                "description": "Specific snapshot ID to compare against (if compareWith=snapshotId)"
              }
            },
            "default": {
              "compareWith": "previousRun",
              "method": "text",
              "minChangePercent": 1.5,
              "ignorePatterns": []
            }
          },
          "storage": {
            "title": "Storage Settings",
            "type": "object",
            "description": "Where to store snapshots and results",
            "properties": {
              "datasetName": {
                "type": "string",
                "title": "Dataset Name",
                "description": "Dataset name for results",
                "default": "changes"
              },
              "kvPrefix": {
                "type": "string",
                "title": "KV Prefix",
                "description": "Key-Value store prefix for snapshots (only a-zA-Z0-9!-_.'())",
                "default": "snapshots-"
              }
            },
            "default": {
              "datasetName": "changes",
              "kvPrefix": "snapshots-"
            }
          },
          "alerts": {
            "title": "Alert Settings",
            "type": "object",
            "description": "Webhook and notification configuration",
            "properties": {
              "webhookUrl": {
                "type": "string",
                "title": "Webhook URL",
                "description": "Webhook URL to POST changes (Slack, Discord, custom endpoint)",
                "editor": "textfield"
              },
              "onlyWhenChanged": {
                "type": "boolean",
                "title": "Only When Changed",
                "description": "Only send alerts when changes detected",
                "default": true
              },
              "includeScreenshots": {
                "type": "boolean",
                "title": "Include Screenshots",
                "description": "Include screenshot URLs in webhook payload",
                "default": true
              }
            },
            "default": {
              "webhookUrl": "",
              "onlyWhenChanged": true,
              "includeScreenshots": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}